| Summary: | SDL_AndroidGetInternalStoragePath crashes | ||
|---|---|---|---|
| Product: | SDL | Reporter: | wu <wuchuanren> |
| Component: | file | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | 2.0.3 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
Gabriel, can you look at this ASAP? Thanks! Can you post the full log of the crash? Also, what device are you running this on and what API level you are building with. Thanks! Sorry, I've just found the reason. It was because that my android/src/org/libsdl/app/SDLActivity.java was from an old version of SDL2 release and that causes this crash. However, since there was no errors or warnings about the incompability during compiling, I didn't realize that one should also update the SDLActivity.java from the new version of SDL. |
the RWops crashes on my android because SDL_AndroidGetInternalStoragePath() crashes. the Line, which cause the crash is mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, fileObject), "getAbsolutePath", "()Ljava/lang/String;"); in the function SDL_AndroidGetInternalStoragePath() It's inconvenient to debug on the cellphone, so I've put two SDL_Log's before and after this GetMethodID line. The SDL_Log before will be shown, the one after disappears and the program crashes.