allegro5 icon indicating copy to clipboard operation
allegro5 copied to clipboard

Crash on Allegro 5.2.8 for Android when returning from background mode

Open alemart opened this issue 2 years ago • 0 comments

Whenever an Android app powered by Allegro 5.2.8 returns from background mode, receives an ALLEGRO_EVENT_DISPLAY_RESUME_DRAWING and calls al_acknowledge_drawing_resume, it crashes. Allegro 5.2.7 works fine. I compiled both versions from the sources (arm64-v8a). I see the problem in ex_android and in other examples.

After investigating the issue, I found that it's already solved by SiegeLord with a change made in October. I think that the crash was related to this commit. Once you apply this patch, the problem vanishes.

I could not find any information about this crash, so I just opened this issue in case anyone else struggles with Allegro 5.2.8 on Android. :+1:

backtrace

12-09 22:35:52.238 24474 24474 F DEBUG   : backtrace:
12-09 22:35:52.238 24474 24474 F DEBUG   :     #00 pc 000000000005c378  /data/app/org.liballeg.ex_android-FSYOpTnS2qvoKzgGIT-L9A==/lib/arm64/liballegro.so (_al_create_default_shader+16)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #01 pc 00000000000969c8  /data/app/org.liballeg.ex_android-FSYOpTnS2qvoKzgGIT-L9A==/lib/arm64/liballegro.so (android_acknowledge_drawing_resume+164)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #02 pc 0000000000001e2c  /data/app/org.liballeg.ex_android-FSYOpTnS2qvoKzgGIT-L9A==/lib/arm64/libnative-lib.so (main+1652)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #03 pc 000000000009a210  /data/app/org.liballeg.ex_android-FSYOpTnS2qvoKzgGIT-L9A==/lib/arm64/liballegro.so (android_app_trampoline+216)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #04 pc 000000000005ce20  /data/app/org.liballeg.ex_android-FSYOpTnS2qvoKzgGIT-L9A==/lib/arm64/liballegro.so (thread_func_trampoline+152)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #05 pc 000000000009265c  /data/app/org.liballeg.ex_android-FSYOpTnS2qvoKzgGIT-L9A==/lib/arm64/liballegro.so (thread_proc_trampoline+28)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #06 pc 0000000000081b70  /system/lib64/libc.so (__pthread_start(void*)+36)
12-09 22:35:52.238 24474 24474 F DEBUG   :     #07 pc 00000000000235f8  /system/lib64/libc.so (__start_thread+68)

alemart avatar Dec 10 '22 03:12 alemart