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
So I have this user report where closing the program on Ubuntu ends up hanging while destroying the display. (I unfortunately cannot reproduce on Mint, and don't have Ubuntu).
The root cause is probably some bad mix of other atexit handlers, since calling the allegro shutdown function directly (and then exiting) prevents any hanging.
Please excuse the mix of allegro4/5 here. This stack is just the atexit handler of allegro4 shutting down its gfx driver, which involves destroying the allegro 5 display. The application has created bitmaps with the ALLEGRO_MEMORY_BITMAP flag set, so it tries to preserve them during the shutdown process. For a reason unknown to me, the program hangs while locking the opengl bitmap. FWIW, this behavior has never been reported for Windows or OSX.
I have no idea why locking the bitmap would be hanging, so short of solving the root cause, I looked for a workaround: converting these bitmaps to memory bitmaps is a peculiar thing to do on shutdown, so I wondered how I could best suppress this behavior for the case where the program is shutting down. I considered iterating all the bitmaps and unsetting the ALLEGRO_MEMORY_BITMAP flag, but there is no public interface to get all the bitmaps (and my program does not store them anywhere).
I see that the ALLEGRO_DISPLAY struct has a bitmaps member, so my ask is: can we expose this in a public method?
The text was updated successfully, but these errors were encountered:
So I have this user report where closing the program on Ubuntu ends up hanging while destroying the display. (I unfortunately cannot reproduce on Mint, and don't have Ubuntu).
The root cause is probably some bad mix of other atexit handlers, since calling the allegro shutdown function directly (and then exiting) prevents any hanging.
ZQuestClassic/ZQuestClassic#975 (comment)
Please excuse the mix of allegro4/5 here. This stack is just the atexit handler of allegro4 shutting down its gfx driver, which involves destroying the allegro 5 display. The application has created bitmaps with the
ALLEGRO_MEMORY_BITMAP
flag set, so it tries to preserve them during the shutdown process. For a reason unknown to me, the program hangs while locking the opengl bitmap. FWIW, this behavior has never been reported for Windows or OSX.I have no idea why locking the bitmap would be hanging, so short of solving the root cause, I looked for a workaround: converting these bitmaps to memory bitmaps is a peculiar thing to do on shutdown, so I wondered how I could best suppress this behavior for the case where the program is shutting down. I considered iterating all the bitmaps and unsetting the
ALLEGRO_MEMORY_BITMAP
flag, but there is no public interface to get all the bitmaps (and my program does not store them anywhere).I see that the
ALLEGRO_DISPLAY
struct has abitmaps
member, so my ask is: can we expose this in a public method?The text was updated successfully, but these errors were encountered: