Skip to content

GladeProject: Segfault in gnome-builder when widget doesn't have a name

Opening the attached .ui file as project in glade crashes with a segfault. Both in glade itself as well as the glade integration in gnome-builder (where I first noticed this crash). The attached file is slightly modified from a work in progress branch of mine, it's in an incorrect state, however that should not crash glade imo.gbp-grep-panel.ui

While looking through the code for glade_widget_get_name and GladeWidget, I did also notice the glade_widget_ensure_name method. I'm wondering if that would prevent this crash as well if called in the spot where I now added a null check. I'm assuming that isn't done on all calls to glade_widget_get_name for performance reasons so I didn't want to add it there. Would using glade_widget_ensure_name be a better solution?

Edited by Peter Maatman

Merge request reports