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 1186

Summary: Crash in Android_JNI_SetActivityTitle - Android
Product: SDL Reporter: Gueniffey <pierre-yves>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: tim
Version: HG 2.0   
Hardware: ARM   
OS: Android (All)   
Attachments: The suggested change

Description Gueniffey 2011-04-20 07:23:20 UTC
If there is garbage collection after the call of SDL_Android_Init, the variable mActivityClass is no longer available.
I've got a patch but I won't post it since the last one I posted was not commited to the trunk.
So please fix Android crashes.
Comment 1 Tim Angus 2011-07-22 07:20:07 UTC
(In reply to comment #0)
> I've got a patch but I won't post it since the last one I posted was not
> commited to the trunk.

That's a bit childish.
Comment 2 Gueniffey 2011-08-04 07:31:17 UTC
(In reply to comment #1)
> That's a bit childish.
Indeed. But anyway, it's a one-liner. Just put it at the right position: 
mActivityClass = (jclass)env->NewGlobalRef(cls);
Comment 3 Tim Angus 2011-08-26 05:27:27 UTC
Created attachment 686 [details]
The suggested change
Comment 4 Sam Lantinga 2012-01-07 23:28:10 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/b5a665fbaedc