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 - SDL_RWops fails under Android 4 [patch]
Summary: SDL_RWops fails under Android 4 [patch]
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: All Android (All)
: P2 critical
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 10:34 UTC by Gabriel Jacobo
Modified: 2012-05-25 11:46 UTC (History)
2 users (show)

See Also:


Attachments
Replaces some Android SDL_RWops local refs for globals (3.24 KB, patch)
2012-05-18 10:34 UTC, Gabriel Jacobo
Details | Diff

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