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 1500

Summary: SDL_RWops fails under Android 4 [patch]
Product: SDL Reporter: Gabriel Jacobo <gabomdq>
Component: *don't know*Assignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2 CC: everywherewind, joseba.gar
Version: HG 2.0   
Hardware: All   
OS: Android (All)   
Attachments: Replaces some Android SDL_RWops local refs for globals

Description Gabriel Jacobo 2012-05-18 10:34:19 UTC
Created attachment 859 [details]
Replaces some Android SDL_RWops local refs for globals

It seems that Android > v4.0 has a stricter policy referring to stale local references, as such some issues that before weren't obvious have arised.
For confirmation (besides my own experience) see:

http://forums.libsdl.org/viewtopic.php?t=8042
http://forums.libsdl.org/viewtopic.php?t=8057

The attached patch replaces those stale local references (references that are local but they are stored in the context anyway and are being used later, after they were freed) with global references. I think I've added the required global releases as well, and now SDL_RWops is working for me under Android.
Comment 1 Gabriel Jacobo 2012-05-25 11:46:21 UTC
Fixed in changeset 263e2c049c22