The main event loop pushes itself onto the event loop stack, and so it should also pop itself when destroyed. This will surface attempts to use the event loop stack after the main event loop has been destroyed.