We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1297

Summary: android gets exception from exception class instead of object
Product: SDL Reporter: jon
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Linux   

Description jon 2011-08-31 23:33:28 UTC
SDL/src/core/android/SDL_android.cpp:Android_JNI_ExceptionOccurred tries to get the exception message from the exception class instead of the object.

...
jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exceptionClass, mid);
...

should instead be

jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exception, mid);
Comment 1 jon 2011-08-31 23:35:14 UTC
Just in case further proof is required, here is the output from 'adb logcat' when the Android_JNI_ExceptionOccured is executed with its current code

W/dalvikvm( 1009): JNI WARNING: can't call Ljava/lang/Throwable;.getMessage on instance of Ljava/lang/Class;
Comment 2 Ryan C. Gordon 2011-09-01 01:43:03 UTC
This is now hg changeset b89f7f3bc9be, thanks!

--ryan.