[Gambas-user] signal 11 from menus

Benoît Minisini gambas at ...1...
Tue Jan 4 03:42:46 CET 2011


> I'm not filing this as a bug as I'm not sure it is.
> 

A segfault is normally a bug. Gambas should never segfault. :-)

> The project Richard and I work on was segfaulting when opening a submenu.
> I enclose the stacktrace from GDB and a small project that elicits it.
> As you can see from the project, the cause is generating the submenu
> structure twice, the second time from within the Menu_Show () handler.
> 
> By only generating the menus once the problem is solved.
> 
> Ian

The crash comes from the fact that the Menu Show event is raised just before 
showing the menu. And during that event, you are clearing the menu that is 
being show. Qt4 does not like that (neither GTK+).

Maybe I should prevent that with a internal flag...

Regards,

-- 
Benoît Minisini




More information about the User mailing list