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 706152 - g_object_notify called with NULL priv->focus_widget
g_object_notify called with NULL priv->focus_widget
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-08-16 17:11 UTC by Stef Walter
Modified: 2013-08-17 08:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Some protection against nested set_focus() calls (1.09 KB, patch)
2013-08-16 19:22 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-08-16 17:11:18 UTC
By tabbing around the gnome-control-center password change dialog, entering passwords, clearing them, which enables/disables widgets, I've managed to arrive at the following CRITICAL:

(gnome-control-center:17409): GLib-GObject-CRITICAL **: g_object_notify: assertion 'G_IS_OBJECT (object)' failed

gtk_window_real_set_focus() is calling g_object_notify with a NULL gobject on line 7514:

      g_object_notify (G_OBJECT (priv->focus_widget), "is-focus");
Comment 1 Stef Walter 2013-08-16 17:12:57 UTC
(gdb) bt
  • #0 g_logv
    at gmessages.c line 989
  • #1 g_log
    at gmessages.c line 1025
  • #2 g_return_if_fail_warning
  • #3 g_object_notify
    at gobject.c line 1162
  • #4 gtk_window_real_set_focus
    at gtkwindow.c line 7514
  • #5 g_cclosure_marshal_VOID__OBJECTv
    at gmarshal.c line 1312
  • #6 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #7 _g_closure_invoke_va
    at gclosure.c line 840
  • #8 g_signal_emit_valist
    at gsignal.c line 3234
  • #9 g_signal_emit
    at gsignal.c line 3382
  • #10 _gtk_window_internal_set_focus
    at gtkwindow.c line 2057
  • #11 gtk_widget_real_grab_focus
    at gtkwidget.c line 7512
  • #12 _gtk_entry_grab_focus
    at gtkentry.c line 4761
  • #13 gtk_entry_grab_focus
    at gtkentry.c line 4780
  • #14 g_cclosure_marshal_VOID__VOIDv
    at gmarshal.c line 115
  • #15 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #16 _g_closure_invoke_va
  • #17 g_signal_emit_valist
    at gsignal.c line 3234
  • #18 g_signal_emit
    at gsignal.c line 3382
  • #19 gtk_widget_grab_focus
    at gtkwidget.c line 7426
  • #20 gtk_widget_real_focus
    at gtkwidget.c line 7615
  • #21 _gtk_marshal_BOOLEAN__ENUM
    at gtkmarshalers.c line 269
  • #22 g_type_class_meta_marshal
    at gclosure.c line 970
  • #23 g_closure_invoke
    at gclosure.c line 777
  • #24 signal_emit_unlocked_R
  • #25 g_signal_emit_valist
    at gsignal.c line 3336
  • #26 g_signal_emit
    at gsignal.c line 3382
  • #27 gtk_widget_child_focus
    at gtkwidget.c line 10149
  • #28 gtk_container_focus_move
    at gtkcontainer.c line 2982
  • #29 gtk_container_focus
    at gtkcontainer.c line 2503
  • #30 _gtk_marshal_BOOLEAN__ENUM
    at gtkmarshalers.c line 269
  • #31 g_type_class_meta_marshal
    at gclosure.c line 970
  • #32 g_closure_invoke
    at gclosure.c line 777
  • #33 signal_emit_unlocked_R
    at gsignal.c line 3620
  • #34 g_signal_emit_valist
    at gsignal.c line 3336
  • #35 g_signal_emit
    at gsignal.c line 3382
  • #36 gtk_widget_child_focus
    at gtkwidget.c line 10149
  • #37 gtk_container_focus_move
    at gtkcontainer.c line 2975
  • #38 gtk_container_focus
    at gtkcontainer.c line 2503
  • #39 _gtk_marshal_BOOLEAN__ENUM
    at gtkmarshalers.c line 269
  • #40 g_type_class_meta_marshal
    at gclosure.c line 970
  • #41 g_closure_invoke
  • #42 signal_emit_unlocked_R
    at gsignal.c line 3620
  • #43 g_signal_emit_valist
    at gsignal.c line 3336
  • #44 g_signal_emit
    at gsignal.c line 3382
  • #45 gtk_widget_child_focus
    at gtkwidget.c line 10149
  • #46 gtk_container_focus_move
    at gtkcontainer.c line 2975
  • #47 gtk_container_focus
    at gtkcontainer.c line 2503
  • #48 _gtk_marshal_BOOLEAN__ENUM
    at gtkmarshalers.c line 269
  • #49 g_type_class_meta_marshal
    at gclosure.c line 970
  • #50 g_closure_invoke
    at gclosure.c line 777
  • #51 signal_emit_unlocked_R
    at gsignal.c line 3620
  • #52 g_signal_emit_valist
    at gsignal.c line 3336
  • #53 g_signal_emit
    at gsignal.c line 3382
  • #54 gtk_widget_child_focus
    at gtkwidget.c line 10149
  • #55 gtk_window_focus
    at gtkwindow.c line 7396
  • #56 _gtk_marshal_BOOLEAN__ENUM
    at gtkmarshalers.c line 269
  • #57 g_type_class_meta_marshal
    at gclosure.c line 970
  • #58 g_closure_invoke
    at gclosure.c line 777
  • #59 signal_emit_unlocked_R
    at gsignal.c line 3620
  • #60 g_signal_emit_valist
    at gsignal.c line 3336
  • #61 g_signal_emit
    at gsignal.c line 3382
  • #62 gtk_widget_child_focus
    at gtkwidget.c line 10149
  • #63 gtk_window_move_focus
    at gtkwindow.c line 7442
  • #64 g_cclosure_marshal_VOID__ENUM
    at gmarshal.c line 668
  • #65 g_type_class_meta_marshal
    at gclosure.c line 970
  • #66 g_closure_invoke
  • #67 signal_emit_unlocked_R
    at gsignal.c line 3620
  • #68 g_signal_emitv
    at gsignal.c line 3059
  • #69 gtk_binding_entry_activate
    at gtkbindings.c line 652
  • #70 binding_activate
    at gtkbindings.c line 1524
  • #71 gtk_bindings_activate_list
    at gtkbindings.c line 1585
  • #72 gtk_bindings_activate_event
    at gtkbindings.c line 1672
  • #73 gtk_widget_real_key_press_event
    at gtkwidget.c line 6672
  • #74 gtk_window_key_press_event
    at gtkwindow.c line 7048
  • #75 _gtk_marshal_BOOLEAN__BOXEDv
  • #76 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #77 _g_closure_invoke_va
    at gclosure.c line 840
  • #78 g_signal_emit_valist
    at gsignal.c line 3234
  • #79 g_signal_emit
    at gsignal.c line 3382
  • #80 gtk_widget_event_internal
    at gtkwidget.c line 7143
  • #81 gtk_widget_event
    at gtkwidget.c line 6805
  • #82 propagate_event
    at gtkmain.c line 2489
  • #83 gtk_propagate_event
    at gtkmain.c line 2535
  • #84 gtk_main_do_event
    at gtkmain.c line 1715
  • #85 _gdk_event_emit
    at gdkevents.c line 69
  • #86 gdk_event_source_dispatch
    at gdkeventsource.c line 364
  • #87 g_main_dispatch
    at gmain.c line 3065
  • #88 g_main_context_dispatch
    at gmain.c line 3641
  • #89 g_main_context_iterate
    at gmain.c line 3712
  • #90 g_main_context_iteration
    at gmain.c line 3773
  • #91 g_application_run
    at gapplication.c line 1635
  • #92 main
    at main.c line 49

Comment 2 Stef Walter 2013-08-16 17:14:53 UTC
jhbuilt gtk and gnome-control-center with these patches: bug #702476

Prerequisite: have a second user on the system

In User accounts panel, Unlock, Click the user's password to change it. Type a new password that validates, type a confirm password. Then delete the confirm password <shift-tab> and delete the original password.
Comment 3 Matthias Clasen 2013-08-16 19:05:02 UTC
that code you're talking about has focus-changed handlers. thats a big red flag - I would assume the bug is over there...
Comment 4 Stef Walter 2013-08-16 19:22:43 UTC
Created attachment 251934 [details] [review]
window: Some protection against nested set_focus() calls

Since set_focus() can triger events, have a check to make
sure state is still valid before firing is-focus signal.
Comment 5 Matthias Clasen 2013-08-17 05:04:00 UTC
Review of attachment 251934 [details] [review]:

sure
Comment 6 Stef Walter 2013-08-17 08:05:40 UTC
Attachment 251934 [details] pushed as 6a837c6 - window: Some protection against nested set_focus() calls