You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Android app may freeze while AllegroSurface.nativeOnDestroy() waits for a call to al_acknowledge_drawing_halt().
How to reproduce the issue
Open ex_android and keep switching the app in and out of context very quickly. Eventually the app will freeze. The issue is reproducible with other examples too.
Details
As can be seen below, method AllegroSurface.nativeOnDestroy() in android_display.c emits an ALLEGRO_EVENT_DISPLAY_HALT_DRAWING just before waiting for a condition variable that is signaled in android_acknowledge_drawing_halt(). The drawing halt event is handled in a different thread. If the order of operations is such that the event is handled (and the condition variable is signaled) before the other thread is waiting, the app will freeze. The signal is lost and does nothing. The freeze can be reproduced easily by adding an al_rest() call before al_wait_cond().
Summary
An Android app may freeze while
AllegroSurface.nativeOnDestroy()
waits for a call toal_acknowledge_drawing_halt()
.How to reproduce the issue
Open ex_android and keep switching the app in and out of context very quickly. Eventually the app will freeze. The issue is reproducible with other examples too.
Details
As can be seen below, method
AllegroSurface.nativeOnDestroy()
in android_display.c emits anALLEGRO_EVENT_DISPLAY_HALT_DRAWING
just before waiting for a condition variable that is signaled inandroid_acknowledge_drawing_halt()
. The drawing halt event is handled in a different thread. If the order of operations is such that the event is handled (and the condition variable is signaled) before the other thread is waiting, the app will freeze. The signal is lost and does nothing. The freeze can be reproduced easily by adding anal_rest()
call beforeal_wait_cond()
.allegro5/src/android/android_display.c
Lines 88 to 101 in 9ced31b
The text was updated successfully, but these errors were encountered: