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 - Crash in Android_JNI_SetActivityTitle - Android
Summary: Crash in Android_JNI_SetActivityTitle - Android
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: ARM Android (All)
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-20 07:23 UTC by Gueniffey
Modified: 2012-01-07 23:28 UTC (History)
1 user (show)

See Also:


Attachments
The suggested change (805 bytes, patch)
2011-08-26 05:27 UTC, Tim Angus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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