> I/DEBUG ( 4763): #00 pc 0004102c /system/lib/libdvm.so
[...]
> OK, so that looks like a stack trace. But none of those addresses
> look like they're in my code, and they all look quite small; are they
> in fact offsets?
>
> I guess libdvm is the "dalvik virtual machine". Is there a copy of
> that that I can use to decode the symbols somewhere?
You could retrieve the library used on the device with:
adb pull /system/lib/libdvm.so .
Then run addr2line on that, and if you get a function name, look for in in the
dalvik sources at http://android.git.kernel.org/?p=platform/dalvik.git;a=tree
I've never tried it but it could work
--
Olivier
Yes, but I think that something crashes while in the process of throwing the
exception. Apparently, this is related to the stack trace. Here's the Froyo
source for dvmFillInStackTraceInternal:
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob;f=vm/Exception.c;h=13b051e50af02a0d51f0f10b94559200c0bdde75;hb=1daf86bdb630efa96147220019e1a97c853ed3d2#l982
I'm not sure that's been fixed according to the history:
http://android.git.kernel.org/?p=platform/dalvik.git;a=history;f=vm/Exception.c;h=3a73420dbe838efbbc25c0cc59537a673dde6220;hb=HEAD
Looks like a bug in Dalvik.
By the way, although they're pretty rare, I randomly get similar crashes, and I
do use OpenSL too.
--
Olivier
> Looks like a bug in Dalvik.
>
> By the way, although they're pretty rare, I randomly get similar crashes, and I
> do use OpenSL too.
s/OpenSL/OpenGL/
--
Olivier
Just an thought, but are you calling Java from C? If so, do you properly handle
exceptions as explained in:
http://java.sun.com/docs/books/jni/html/exceptions.html#26074
Because "Calling most JNI functions with a pending exception [...] may lead to
unexpected results.".
Make sure that you look at ExceptionCheck().
--
Olivier
> Thanks for the hint. I think that I probably only ever make one JNI
> call at a time, so I don't think there's a way that I can call
> something new with an old exception pending. But I'll do some more
> research.
You may already know this, but it depends what you mean by "one JNI call". For
instance, calling a single Java method usually involves several JNI calls, for
example: FindClass(), GetMethodID(), and Call*Method(). If FindClass() fails
(returns NULL) then a exception is pending, and you should not call
GetMethodID(), etc.. You need to do a lot of checking. Very few JNI calls are
safe when an exception is pending:
http://java.sun.com/docs/books/jni/html/design.html#2193
--
Olivier