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 609612 - Glade UI lockup in menu editor.
Glade UI lockup in menu editor.
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: user interface
3.6.x
Other Linux
: Normal major
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
: 589217 602436 603607 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-02-11 04:02 UTC by Nick Bowler
Modified: 2010-12-19 07:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the breakage. (35.75 KB, image/png)
2010-02-11 04:02 UTC, Nick Bowler
  Details
Fixes gladeui lokup in menu editor (671 bytes, patch)
2010-03-19 23:59 UTC, Marco Diego Aurélio Mesquita
none Details | Review
Fixes gladeui lokup in menu editor (2.01 KB, patch)
2010-03-20 03:19 UTC, Marco Diego Aurélio Mesquita
needs-work Details | Review
Fixes gladeui lockup in menu editor (1.74 KB, patch)
2010-03-23 00:02 UTC, Marco Diego Aurélio Mesquita
needs-work Details | Review
Fixes gladeui lockup in menu editor (2.02 KB, patch)
2010-03-23 00:48 UTC, Marco Diego Aurélio Mesquita
none Details | Review

Description Nick Bowler 2010-02-11 04:02:06 UTC
Created attachment 153504 [details]
Screenshot of the breakage.

When using the menu editor in glade 3.6.7, the entire UI locks up when you perform the following actions:

  * Enter a value in the name field which contains a space.
  * Click on the "Type" combo box to expand it.

at which point the message

  (glade-3:24434): Gtk-CRITICAL **: gtk_widget_event: assertion
  `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

is printed to the terminal many times, and the menu editor window looks like the attached screenshot.  All windows in the program cease responding to input, but will still redraw themselves on expose.
Comment 1 Nick Bowler 2010-02-11 04:08:00 UTC
Whoops, I just discovered that it occurs when making /any/ change to the name field at all; there is no need to insert a space.
Comment 2 Marco Diego Aurélio Mesquita 2010-03-19 23:00:01 UTC
Investigating this bug I discovered a way to not trigger it:

  * Enter a value in the name field which contains a space.
  * Click on anywhere else but the "Type" combo box.
  * Click on the "Type" combo box to expand it.

Will not trigger the bug.
Comment 3 Marco Diego Aurélio Mesquita 2010-03-19 23:59:54 UTC
Created attachment 156597 [details] [review]
Fixes gladeui lokup in menu editor

Correctly treats name changes in glade_base_editor_add_default_properties in glade-base-editor.c. The attached fixes the bug. Please commit it.
Comment 4 Marco Diego Aurélio Mesquita 2010-03-20 02:39:07 UTC
Although the latest patch works as intended, the signal emmited (by the cascade of events that follows calling glade_command_set_name) by glade_project_set_widget_name makes the entry loses focus.

Still investigating why this happens.
Comment 5 Marco Diego Aurélio Mesquita 2010-03-20 02:58:04 UTC
The signal "widget-name-changed" which is connected in glade_base_editor_set_container changes the text in the entry we are editing. I think this is what is causing the lose of the focus. If I comment this connection, we dont lose the focus anymore, but changing the name of a widget with glade editor table no longer updates the name of the widget in glade base editor.

Waiting for an idea on how to fix it...
Comment 6 Marco Diego Aurélio Mesquita 2010-03-20 03:19:16 UTC
Created attachment 156603 [details] [review]
Fixes gladeui lokup in menu editor

The attached fixes the bug. Please commit it.
Comment 7 Tristan Van Berkom 2010-03-20 17:15:35 UTC
Review of attachment 156603 [details] [review]:

Hi,
   Thanks for finding the culprit.

One problem I can see before testing the patch, you are using a static variable
to avoid the feedback loop for "widget-name-changed", this is error prone because
the GladeBaseEditor is not a singleton and can have multiple instances in memory.

Also, you may find scattered code in Glade that still does this with a boolean
variable but in general where possible we like to address this type of feedback
problem with g_signal_handlers_block/unblock_by_func() instead (this function can be easily
used to avoid firing the widget_name_changed() code when programatically updating
the entry text).

We also wont be needing the '//fixing' comment sitting beside the new "changed"
signal handler connection.
Comment 8 Tristan Van Berkom 2010-03-20 18:42:54 UTC
*** Bug 589217 has been marked as a duplicate of this bug. ***
Comment 9 Marco Diego Aurélio Mesquita 2010-03-23 00:02:35 UTC
Created attachment 156820 [details] [review]
Fixes gladeui lockup in menu editor

Changes applied. Please commit it.
Comment 10 Tristan Van Berkom 2010-03-23 00:09:42 UTC
Review of attachment 156820 [details] [review]:

Thanks thats much nicer :)
Comment 11 Tristan Van Berkom 2010-03-23 00:42:03 UTC
Review of attachment 156820 [details] [review]:

Oops sorry.

After a closer look I see that your patch obsoletes glade_base_editor_name_focus_out().

Using changed is better, agreed, but the connection to _focus_out() and the focus_out() handler
should be removed with this patch too.
Comment 12 Marco Diego Aurélio Mesquita 2010-03-23 00:48:10 UTC
Created attachment 156825 [details] [review]
Fixes gladeui lockup in menu editor

Removed uneeded code. Please commit it.
Comment 13 Tristan Van Berkom 2010-03-28 23:29:59 UTC
Thanks for fixing this.

Closing.
Comment 14 Tristan Van Berkom 2010-12-17 09:24:55 UTC
*** Bug 602436 has been marked as a duplicate of this bug. ***
Comment 15 Marco Diego Aurélio Mesquita 2010-12-19 05:34:46 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=603607 Seems like a duplicate too.
Comment 16 Tristan Van Berkom 2010-12-19 07:50:06 UTC
*** Bug 603607 has been marked as a duplicate of this bug. ***