A couple of thoughts. If it's not consistent when and where it
crashes, you may have some type of memory corruption, possibly even a
GC bug, though in my experience those are rare beasts. If you have JNI
code, (and you do, even if it's not yours), it's more likely in there.

Since you've been carefully building your app a little at a time, and
since you've been using JUnit, I can offer you two paths along two
dimensions, that may help.

First, backtrack. Try earlier versions until you find one that does
not exhibit this problem, and then see what changed between when you
did not, and when you do see this problem. (Since you're using JUnit,
I assume you're astute enough to also use a revision control system!)

The other approach is to enable and disable unit tests until you find
which unit tests are involved in the failure.

These should each produce a small set of code as candidates for what
triggers the problem. You might need to do things like reorder tests,
or repeat them -- it's possible to "fix" the problem by simply not
tripping over the memory corruption. Calling System.gc() twice in a
tearDown() after every test may help trigger the problem more promptly
and avoid the issue -- but it may not as well, depending on which
memory is corrupted.

(It's not certain it's a memory corruption -- it could be thread
related -- but the initial strategy would be similar).

Good luck!

On Apr 29, 4:08 am, brucko <geoff.bruck...@gmail.com> wrote:
> Nearly at my wits end. Been slowly building my app and now JUnit is
> crashing regularly with logcat as below.
>
> There are no other real hints. No relevant code as this can happen at
> multiple points of the code. There are no other errors or exceptions
> thrown. As far as I can tell there is plenty of memory left and my app
> does not appear to have any leaks I can find during a run outside of
> JUnit.
>
> Any ideas?
>
> 04-29 15:05:23.125 I/DEBUG   (10948): Build fingerprint: 'htc_asia_wwe/
> htc_hero/hero/hero:1.5/2.73.707.9/62020:user/release-keys'
> 04-29 15:05:23.125 I/DEBUG   (10948): pid: 11005, tid: 11006  >>>
> com.mydomain.myapp <<<
> 04-29 15:05:23.125 I/DEBUG   (10948): signal 11 (SIGSEGV), fault addr
> 00000004
> 04-29 15:05:23.125 I/DEBUG   (10948):  r0 00000000  r1 4356abd0  r2
> 4108dd50  r3 00000010
> 04-29 15:05:23.125 I/DEBUG   (10948):  r4 ad03dc11  r5 00156d78  r6
> 4356abd0  r7 00000000
> 04-29 15:05:23.125 I/DEBUG   (10948):  r8 100ffd00  r9 4100af98  10
> 4100af84  fp 00000001
> 04-29 15:05:23.125 I/DEBUG   (10948):  ip ad374dd0  sp 100ffcd4  lr
> ad33a6f1  pc a9d214b6  cpsr 00000030
> 04-29 15:05:23.235 D/AK8973  (   41): Compass CLOSE
> 04-29 15:05:23.305 I/DEBUG   (10948):          #00  pc 000214b6  /
> system/lib/libutils.so
> 04-29 15:05:23.305 I/DEBUG   (10948):          #01  lr ad33a6f1  /
> system/lib/libandroid_runtime.so
> 04-29 15:05:23.345 D/UserCreator(11005): onStop
> 04-29 15:05:23.345 I/ActivityManager(   63): Stopping service:
> com.mydomain.myapp/.database.UserDbAdapter
> 04-29 15:05:23.355 D/UserCreator(11005): unbind
> 04-29 15:05:23.375 I/DEBUG   (10948): stack:
> 04-29 15:05:23.375 I/DEBUG   (10948):     100ffc94  afe39dd0
> 04-29 15:05:23.375 I/DEBUG   (10948):     100ffc98  0000a000  [heap]
> 04-29 15:05:23.375 I/DEBUG   (10948):     100ffc9c  afe39dd0
> ...and so on....
> then...
> 04-29 15:36:42.557: INFO/DEBUG(12024): debuggerd committing suicide to
> free the zombie!
> 04-29 15:36:42.567: INFO/DEBUG(12175): debuggerd: Aug 28 2009 20:35:01
> 04-29 15:36:42.577: INFO/ActivityManager(63): Process
> com.mydomain.myapp (pid 12117) has died.
> 04-29 15:36:42.577: WARN/ActivityManager(63): Crash of app
> com.mydomain.myapp running instrumentation
> ComponentInfo{com.ozdroid.scanner.tests/
> android.test.InstrumentationTestRunner}
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to