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 2463 - SDL_RWFromFile fails when trying to access a file on assets directory
Summary: SDL_RWFromFile fails when trying to access a file on assets directory
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: file (show other bugs)
Version: 2.0.3
Hardware: ARM Android (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 17:41 UTC by Francisco Vallarino
Modified: 2014-03-24 19:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco Vallarino 2014-03-24 17:41:29 UTC
Trying to access a file on APK's assets directory using SDL_RWFromFile fails on SDL 2.0.3 (it worked fine on 2.0.1). 

Debugging the procedure I see that the error happens in the call to SDL_AndroidGetInternalStoragePath(), which in turn fails at:

mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, fileObject),
    "getAbsolutePath", "()Ljava/lang/String;");

displaying the following log:

F/libc    (14491): Fatal signal 6 (SIGABRT) at 0x0000389b (code=-6), thread 14504 (SDLThread)

I'm using the default SDL2 Android project, and testing on Android 4.4.2.

Regards,
Francisco
Comment 1 Francisco Vallarino 2014-03-24 19:59:46 UTC
My bad. I only updated the dependencies on src directory instead of replacing the whole Android sample project. It works fine now.