After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740668 - Crash when opening a Glade-saved file
Crash when opening a Glade-saved file
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-25 01:06 UTC by Georges Basile Stavracas Neto
Modified: 2015-01-20 03:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkStack: Survive loading an empty stack (1.33 KB, patch)
2014-11-25 05:14 UTC, Matthias Clasen
committed Details | Review

Description Georges Basile Stavracas Neto 2014-11-25 01:06:24 UTC
Playing with Glade master, I created a very simple window with a headerbar and a stack. Opening it again, a Glade crashed.

Steps to reproduce this faulty behvior:

1. Open a new file
2. Insert an empty GtkStack in it (no child shoud be added)
3. Save the file 
4. Open the file again
5. Glade crashes

Naively debugging it, I've found out some info about the faulty behavior (do not entirely trust me, I'm not even close to a good debugger):

(glade:3720): Gtk-CRITICAL **: gtk_stack_set_visible_child_full: assertion 'name != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
g_type_check_instance_is_fundamentally_a (type_instance=type_instance@entry=0x20d8860, fundamental_type=fundamental_type@entry=80)
    at gtype.c:4028
4028	  node = lookup_type_node_I (type_instance->g_class->g_type)

Hope it helps.
Comment 1 Matthias Clasen 2014-11-25 05:14:27 UTC
Created attachment 291430 [details] [review]
GtkStack: Survive loading an empty stack

The code in glade_gtk_stack_add_child was not robust enough
against disappearing placeholders.
Comment 2 Matthias Clasen 2015-01-19 19:58:29 UTC
ping ? could I get a quick review here ?
Comment 3 Tristan Van Berkom 2015-01-20 01:45:06 UTC
Review of attachment 291430 [details] [review]:

Sorry I meant to test this and then lost track of it.

Yes that indeed fixes it, please commit to master thanks.
Comment 4 Matthias Clasen 2015-01-20 03:15:51 UTC
Attachment 291430 [details] pushed as c4cea7f - GtkStack: Survive loading an empty stack