Tested on Windows and Linux, that's all I have access to. Does the exact same thing, whether in Windows 10, or OpenSUSE 44.
It currently builds with C::B and MinGW/GCC and needs allegro installed either in the root directory in a folder called allegro or in usr/local/lib, or in your compiler directory (eww).
This is probably paranoid, but I suspect it's a heisenbug or memory corruption or something. I tried to rule out race conditions by creating a EagleLogGuard, which seems to be working fine to serialize log output.
There is some hanky panky going on in my code somewhere....
If I add in this line :
EAGLE_ASSERT(al_is_event_source_registered(window_queue , &(a5man->window_event_source)));
It passes the assert when closing the window, but then immediately fails the assert. Something is "un-registering" my window_event_source from the window queue.
There's also something fishy here in my log :
EAGLE INFO : Allegro5WindowManager::AddDisplay - adding ALLEGRO_DISPLAY* 0420c2e0 .
EAGLE INFO : A5WindowManagerProcess : Closing display 0420a0b0
I only ever created one display! Why is their address different?