[Bf-committers] [GHOST] Pending events of already destroyed windows

Wander Lairson Costa wander.lairson at gmail.com
Thu Nov 28 18:47:55 CET 2013


I've been trying to implement wayland support for ghost [1]. While
implementing fullscreen support, I noticed that the gears test
application often crashes when switching back to the normal mode.

This is what happens:

* I press 'F' key and a new window is created and goes fullscreen.
* The window is displayed fullscreen.
* Wayland periodically sends me 'redraw' events.
* Everytime I receive a 'redraw' event from wayland, I push an
'WindowUpdate' event.
* When I press 'F' again, the key event is pushed to the event queue.
* I receive a 'redraw' event from wayland, then I push an 'WindowUpdate' event.
* The 'F' key event is dispatched and the fullscreen window is destroyed.
* The 'WindowUpdate' is dispatched, but the event now carries an
invalid window object.
* Eventually the application crashes.

So, what happens to pending events when the Window is destroyed? If I
understood correctly, the events remains on the event queue, but I
think I am missing something here.


[1] https://github.com/walac/blender-wayland

Best Regards,
Wander Lairson Costa

More information about the Bf-committers mailing list