Re: [AD] non blocking menu bug

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> It seems there is a little bug with non blocking menus, where allegro will
> crash if you try to shutdown a dialog player while there is a menu player
> still active. Attached are a test program (run it, open a menu and press
> some keys without closing the menu), as well a simple fix.

I don't think we support this construct:

	p = init_dialog(dlg, -1);
	while (!keypressed())
		update_dialog(p);
	shutdown_dialog(p);

The return value of update_dialog() must be checked to ensure that we can 
safely call shutdown_dialog().

> The fix should be reviewed, because I'm not 100% sure it catches every
> variant of the bug (for example what if the user creates an unrelated
> menu_player on his own ?).

The whole non-blocking menus stuff is non-reentrant for the time being.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/