Closed deveee closed 3 years ago
For me the only possibility is that world is deleted, but m_world is not set to null. And then m_rtt is null. But anyway it seems unlikely, because m_world is set to null in destructor...
I think that in some cases (for example when STK window is in background for a long time) system kills the activity, but doesn't unload our .so library. In this case global variables are uninitialized in next run, so m_world is not null and it will cause a crash.
Typically it doesn't happen, because there is exit(0) at the end of android_main() function.
Actually I found a way how to avoid the exit(0) at the end of main function and make sure that all global variables are always initialized. We can just use small libmain.so file that only loads our libstk.so library, then executes main() and unloads libstk.so. But I think that it's too big/unsafe modification for 0.9.3.
can you try this apk: https://github.com/Benau/stk-code/releases/download/preview/SuperTuxKart-git20211004.apk
If it crashes on startup (complain about HID / USB) then this: https://github.com/Benau/stk-code/releases/download/preview/SuperTuxKart-git20211004-fix.apk
Bascially try quiting stk and then restart and see if it starts properly again, and https://github.com/Benau/stk-code/commit/835154bde227c7863d61b0fab5f937022d269678 so it may less likely to crash in background
btw only r22 ndk will work, 23 not supported by current mbedtls (fixed in master), 24 removed android 16 support
test in android 4.2 btw (and more devices better if has time)
tested in 3 phones + 1 emulator all working
It's precisely
src/graphics/shader_based_renderer.cpp:815
that is:It's most frequent crash on android that happens on multiple devices (it happened for 7 different people since 0.9.3-rc1).