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 348708 - gtk_style_detach: assertion `style->attach_count > 0' failed if gtk_widget_realize in destroy handler
gtk_style_detach: assertion `style->attach_count > 0' failed if gtk_widget_re...
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: Other
2.10.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-07-25 22:21 UTC by Ed Catmur
Modified: 2006-08-05 21:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
gdetach.c (424 bytes, text/plain)
2006-07-25 22:22 UTC, Ed Catmur
Details

Description Ed Catmur 2006-07-25 22:21:34 UTC
(<unknown>:6345): Gtk-CRITICAL **: gtk_style_detach: assertion `style->attach_count > 0' failed

Observed in notification-daemon (libnotify).

Diagnosis: occurs if gtk_widget_realize() called in that widget's destroy handler. Test case to follow.
Comment 1 Ed Catmur 2006-07-25 22:22:51 UTC
Created attachment 69614 [details]
gdetach.c

Test case.

The assert happens after the destroy handler returns; adding gtk_widget_unrealize stops the crash from happening.
Comment 2 Ed Catmur 2006-07-25 22:25:18 UTC


  • #0 __kernel_vsyscall
  • #1 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #2 *__GI_abort
    at abort.c line 88
  • #3 IA__g_logv
    at gmessages.c line 497
  • #4 IA__g_log
    at gmessages.c line 517
  • #5 IA__g_return_if_fail_warning
    at gmessages.c line 532
  • #6 IA__gtk_style_detach
    at gtkstyle.c line 781
  • #7 gtk_widget_real_unrealize
    at gtkwidget.c line 7033
  • #8 gtk_window_unrealize
    at gtkwindow.c line 4425
  • #9 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #10 g_type_class_meta_marshal
    at gclosure.c line 567
  • #11 IA__g_closure_invoke
    at gclosure.c line 490
  • #12 signal_emit_unlocked_R
    at gsignal.c line 2476
  • #13 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #14 IA__g_signal_emit
    at gsignal.c line 2241
  • #15 IA__gtk_widget_unrealize
    at gtkwidget.c line 2540
  • #16 gtk_widget_dispose
    at gtkwidget.c line 6876
  • #17 gtk_window_dispose
    at gtkwindow.c line 1794
  • #18 IA__g_object_unref
    at gobject.c line 1734
  • #19 IA__g_object_run_dispose
    at gobject.c line 572
  • #20 IA__gtk_object_destroy
    at gtkobject.c line 403
  • #21 IA__gtk_widget_destroy
    at gtkwidget.c line 2158
  • #22 g_timeout_dispatch
    at gmain.c line 3420
  • #23 IA__g_main_context_dispatch
    at gmain.c line 2043
  • #24 g_main_context_iterate
    at gmain.c line 2675
  • #25 IA__g_main_loop_run
    at gmain.c line 2879
  • #26 IA__gtk_main
    at gtkmain.c line 1000
  • #27 main

Comment 3 Matthias Clasen 2006-08-05 18:16:37 UTC
Calling realize in destroy is not something that should be expected to work...
Comment 4 Ed Catmur 2006-08-05 21:41:14 UTC
Oh - notification-daemon bug is http://trac.galago-project.org/ticket/77

chipx86 applied my patch, so notification-daemon doesn't crash any more.

(Workaround is to unrealize before exiting destroy.)

Comment 5 Ed Catmur 2006-08-05 21:43:10 UTC
(In reply to comment #3)
> Calling realize in destroy is not something that should be expected to work...

OK; evil behaviour, only observed once, easy workaround. Closing.