On Mar 31, 9:15 am, eyal zmora <
eyalzm...@gmail.com> wrote:
> Yes, I saw this discussion already. I'd like to have a deeper understanding
> of what detachCurrentThread does under the hood, why it causes a crash and
> why the crash is not consistent. Anyone?
This log message is the significant one:
ERROR/dalvikvm(24118): ERROR: detaching thread with interp frames
(count=18)
Your native function was called from a thread that had been executing
interpreted code. That is, something in interpreted code called your
native method, and then your method tried to detach the thread.
Because the thread might be holding mutexes (e.g. one of the methods
in the call chain was synchronized) or might have cleanup code in
"finally" blocks that is expected to run, you're not allowed to simply
detach the thread. You have to return all the way up the call stack
before you can do that.
In this case:
INFO/dalvikvm(24118): at <my_package>(Native Method)
INFO/dalvikvm(24118): at android.os.AsyncTask.finish(AsyncTask.java:
590)
Looks like you're trying to detach an async task thread.