GNOME Bugzilla – Bug 635436
Crash insert actiongroups in a UIManager
Last modified: 2010-11-22 23:48:46 UTC
the attached simple program crashes: Starting program: /usr/bin/python testag.py [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x000000311bf31896 in __strcmp_ssse3 () from /lib64/libc.so.6 (gdb) bt
+ Trace 224768
Created attachment 174957 [details] test program
actually here the bug is that pygi allows anonymous actiongroups. The crash is due to the fact that gtk requires actiongroups to have names: ... if (strcmp (gtk_action_group_get_name (group), group_name) == 0) { ... PyGtk does indeed error out for anon action groups: >>> import gtk >>> ag = gtk.ActionGroup() Traceback (most recent call last):
+ Trace 224769
Ah, yes. Easy fix. Make sure there is an override which requires the name parameter. This is due to the fact that we don't use constructors but instead call g_object_new. Perhaps this should be fixed in GTK to require the name property be set when constructing the object. I bet this will be a common issue and I would like to not have to write overrides for all of them.
Yeah, the main reason why I did not make a patch was because I was hoping there was a generic way to fix this scenario...
Created attachment 175072 [details] [review] patch
Comment on attachment 175072 [details] [review] patch Ha, I just fixed this. Should have said I was going to do that :)
No worries, it wasn't an hour of work :-)