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 73301 - nautilus-gtkhtml-view crashes if closed while loading a page
nautilus-gtkhtml-view crashes if closed while loading a page
Status: RESOLVED FIXED
Product: gtkhtml2
Classification: Deprecated
Component: General
unspecified
Other other
: High critical
: ---
Assigned To: Anders Carlsson
Anders Carlsson
: 81113 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-03-03 18:39 UTC by Christoph Hippchen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A proposed patch. I have not tested it so it may not be correct. (705 bytes, patch)
2002-04-23 18:35 UTC, Damon Chaplin
none Details | Review
revised patch which also fixes other destruction problems (2.27 KB, patch)
2002-04-24 18:07 UTC, Damon Chaplin
none Details | Review
Patch to fix destruction of nautilus-gtkhtml-view (863 bytes, patch)
2002-04-24 18:28 UTC, Damon Chaplin
none Details | Review

Description Christoph Hippchen 2002-03-03 18:39:47 UTC
nautilus-gtkhtml-view crashes if the nautilus window is closed while the
view is download a webpage.

this is always reproducable for me, as long as i close the window while the
webpage is loading.

Stack trace:
[New Thread 1024 (LWP 10786)]
[New Thread 2049 (LWP 10787)]
[New Thread 1026 (LWP 10788)]
[New Thread 2051 (LWP 10789)]
[New Thread 3076 (LWP 10790)]
[New Thread 4101 (LWP 10791)]
[New Thread 5126 (LWP 10792)]
[New Thread 6151 (LWP 10793)]
[New Thread 7176 (LWP 10794)]
[New Thread 8201 (LWP 10795)]
[New Thread 9226 (LWP 10796)]
[New Thread 10251 (LWP 10797)]
0x410d2c89 in __wait4 () from /lib/libc.so.6

Thread 1 (Thread 1024 (LWP 10786))

  • #0 __wait4
    from /lib/libc.so.6
  • #1 __DTOR_END__
    from /lib/libc.so.6
  • #2 waitpid
    at wrapsyscall.c line 172
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 598
  • #4 pthread_sighandler
    at signals.c line 97
  • #5 <signal handler called>
  • #6 g_type_check_instance_cast
    at gtype.c line 2600
  • #7 update_combo_list
    at htmlboxembeddedselect.c line 57
  • #8 html_box_embedded_select_relayout
    at htmlboxembeddedselect.c line 77
  • #9 html_box_relayout
    at htmlbox.c line 599
  • #10 html_line_box_add_inlines
    at htmllinebox.c line 301
  • #11 html_box_block_create_inline_lines
    at htmlboxblock.c line 168
  • #12 html_box_block_create_lines
    at htmlboxblock.c line 312
  • #13 html_box_block_relayout
    at htmlboxblock.c line 467
  • #14 html_box_relayout
    at htmlbox.c line 599
  • #15 html_line_box_add_block
    at htmllinebox.c line 439
  • #16 html_box_block_create_block_line
    at htmlboxblock.c line 249
  • #17 html_box_block_create_lines
    at htmlboxblock.c line 308
  • #18 html_box_block_relayout
    at htmlboxblock.c line 467
  • #19 html_box_table_cell_relayout
    at htmlboxtablecell.c line 244
  • #20 html_box_relayout
    at htmlbox.c line 599
  • #21 html_box_table_cell_get_min_width
    at htmlboxtablecell.c line 74
  • #22 update_min_max
    at htmlboxtable.c line 982
  • #23 html_box_table_relayout
    at htmlboxtable.c line 1111
  • #24 html_box_relayout
    at htmlbox.c line 599
  • #25 html_line_box_add_block
    at htmllinebox.c line 439
  • #26 html_box_block_create_block_line
    at htmlboxblock.c line 249
  • #27 html_box_block_create_lines
    at htmlboxblock.c line 308
  • #28 html_box_block_relayout
    at htmlboxblock.c line 467
  • #29 html_box_table_cell_relayout
    at htmlboxtablecell.c line 244
  • #30 html_box_relayout
    at htmlbox.c line 599
  • #31 html_box_table_cell_get_min_width
    at htmlboxtablecell.c line 74
  • #32 update_min_max
    at htmlboxtable.c line 982
  • #33 html_box_table_relayout
    at htmlboxtable.c line 1111
  • #34 html_box_relayout
    at htmlbox.c line 599
  • #35 html_line_box_add_block
    at htmllinebox.c line 439
  • #36 html_box_block_create_block_line
    at htmlboxblock.c line 249
  • #37 html_box_block_create_lines
    at htmlboxblock.c line 308
  • #38 html_box_block_relayout
    at htmlboxblock.c line 467
  • #39 html_box_relayout
    at htmlbox.c line 599
  • #40 html_line_box_add_block
    at htmllinebox.c line 439
  • #41 html_box_block_create_block_line
    at htmlboxblock.c line 249
  • #42 html_box_block_create_lines
    at htmlboxblock.c line 308
  • #43 html_box_block_relayout
    at htmlboxblock.c line 467
  • #44 html_box_root_relayout
    at htmlboxroot.c line 107
  • #45 html_box_relayout
    at htmlbox.c line 599
  • #46 html_view_relayout
    at htmlview.c line 197
  • #47 relayout_timeout_callback
    at htmlview.c line 227
  • #48 g_timeout_dispatch
    at gmain.c line 2979
  • #49 g_main_dispatch
    at gmain.c line 1616
  • #50 g_main_context_dispatch
    at gmain.c line 2160
  • #51 g_main_context_iterate
    at gmain.c line 2241
  • #52 g_main_loop_run
    at gmain.c line 2461
  • #53 gtk_main
    at gtkmain.c line 882
  • #54 nautilus_view_standard_main_multi
    at nautilus-view-standard-main.c line 228
  • #55 nautilus_view_standard_main
    at nautilus-view-standard-main.c line 311
  • #56 main
    at main.c line 52
  • #57 __libc_start_main
    at ../sysdeps/generic/libc-start.c line 129
  • #0 __wait4
    from /lib/libc.so.6
  • #0 __wait4
    from /lib/libc.so.6
  • #1 __DTOR_END__
    from /lib/libc.so.6
  • #2 waitpid
    at wrapsyscall.c line 172
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 598
  • #4 pthread_sighandler
    at signals.c line 97
  • #5 <signal handler called>
  • #6 g_type_check_instance_cast
    at gtype.c line 2600
  • #7 update_combo_list
    at htmlboxembeddedselect.c line 57

Comment 1 Luis Villa 2002-03-13 23:11:41 UTC
I get the same behavior, but with a different trace:
----
[New Thread 1024 (LWP 6979)]
[New Thread 2049 (LWP 6982)]
[New Thread 1026 (LWP 6983)]
[New Thread 2051 (LWP 6984)]
[New Thread 3076 (LWP 6985)]
[New Thread 4101 (LWP 6986)]
[New Thread 5126 (LWP 6987)]
[New Thread 6151 (LWP 6988)]
[New Thread 7176 (LWP 6989)]
[New Thread 8201 (LWP 6990)]
[New Thread 9226 (LWP 6991)]
[New Thread 10251 (LWP 6992)]
0x40893e29 in __wait4 () from /lib/libc.so.6

Thread 1 (Thread 1024 (LWP 6979))

  • #0 __wait4
    from /lib/libc.so.6
  • #1 __DTOR_END__
    from /lib/libc.so.6
  • #2 waitpid
    at wrapsyscall.c line 172
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 598
  • #4 pthread_sighandler
    at signals.c line 97
  • #5 <signal handler called>
  • #6 g_datalist_id_set_data_full
    at gdataset.c line 218
  • #7 g_object_real_dispose
    at gobject.c line 389
  • #8 gtk_object_dispose
    at gtkobject.c line 378
  • #9 gtk_widget_dispose
    at gtkwidget.c line 5602
  • #10 g_object_last_unref
    at gobject.c line 423
  • #11 g_object_unref
    at gobject.c line 1320
  • #12 gtk_widget_unref
    at gtkwidget.c line 6049
  • #13 gtk_container_real_set_focus_child
    at gtkcontainer.c line 1356
  • #14 g_cclosure_marshal_VOID__OBJECT
    at gmarshal.c line 636
  • #15 g_type_class_meta_marshal
    at gclosure.c line 514
  • #16 g_closure_invoke
    at gclosure.c line 437
  • #17 signal_emit_unlocked_R
    at gsignal.c line 2270
  • #18 g_signal_emit_valist
    at gsignal.c line 2099
  • #19 gtk_signal_emit
    at gtksignal.c line 355
  • #20 gtk_container_set_focus_child
    at gtkcontainer.c line 1246
  • #21 gtk_window_set_focus
    at gtkwindow.c line 974
  • #22 gtk_widget_unparent
    at gtkwidget.c line 1495
  • #23 gtk_bin_remove
    at gtkbin.c line 144
  • #24 g_cclosure_marshal_VOID__OBJECT
    at gmarshal.c line 636
  • #25 g_type_class_meta_marshal
    at gclosure.c line 514
  • #26 g_closure_invoke
    at gclosure.c line 437
  • #27 signal_emit_unlocked_R
    at gsignal.c line 2270
  • #28 g_signal_emit_valist
    at gsignal.c line 2099
  • #29 gtk_signal_emit
    at gtksignal.c line 355
  • #30 gtk_container_remove
    at gtkcontainer.c line 882
  • #31 bonobo_plug_dispose
    at bonobo-plug.c line 148
  • #32 g_object_run_dispose
    at gobject.c line 468
  • #33 gtk_object_destroy
    at gtkobject.c line 358
  • #34 gtk_widget_destroy
    at gtkwidget.c line 1581
  • #35 gtk_plug_filter_func
    at gtkplug.c line 1069
  • #36 gdk_event_apply_filters
    at gdkevents-x11.c line 267
  • #37 gdk_event_translate
    at gdkevents-x11.c line 531
  • #38 _gdk_events_queue
    at gdkevents-x11.c line 1690
  • #39 gdk_event_dispatch
    at gdkevents-x11.c line 1746
  • #40 g_main_dispatch
    at gmain.c line 1617
  • #41 g_main_context_dispatch
    at gmain.c line 2161
  • #42 g_main_context_iterate
    at gmain.c line 2242
  • #43 g_main_loop_run
    at gmain.c line 2462
  • #44 gtk_main
    at gtkmain.c line 915
  • #45 nautilus_view_standard_main_multi
    at nautilus-view-standard-main.c line 229
  • #46 nautilus_view_standard_main
    at nautilus-view-standard-main.c line 312
  • #47 main
    at main.c line 52
  • #48 __libc_start_main
    at ../sysdeps/generic/libc-start.c line 129
  • #0 __wait4
    from /lib/libc.so.6
  • #0 __wait4
    from /lib/libc.so.6
  • #1 __DTOR_END__
    from /lib/libc.so.6
  • #2 waitpid
    at wrapsyscall.c line 172
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 598
  • #4 pthread_sighandler
    at signals.c line 97
  • #5 <signal handler called>
  • #6 g_datalist_id_set_data_full
    at gdataset.c line 218
  • #7 g_object_real_dispose
    at gobject.c line 389

Comment 2 Gediminas Paulauskas 2002-03-26 13:22:08 UTC
may be a gtkhtml2 bug, or a bug related to bad use of gnome-vfs

hmm, it uses 13 threads, but it may be a gnome-vfs behavior we cannot
fix in nautilus-gtkhtml.
Comment 3 Luis Villa 2002-03-27 22:10:59 UTC
Gediminas: any idea on who should be cc'd to see if we can get a grip
on this? gnome-vfs people? hallski for gtkhtml?
Comment 4 Damon Chaplin 2002-04-23 18:29:03 UTC
I think gtkhtml2 isn't removing the timeout callback when it is
destroyed, so when the timeout eventually gets called the widget is
not valid. The idle callback should also be removed.

So to fix it I think you need to add this to finalize() in htmlview.c:

	if (view->relayout_timeout_id != 0) {
		gtk_timeout_remove (view->relayout_timeout_id);
		view->relayout_timeout_id = 0;
	}

	if (view->relayout_timeout_id != 0) {
		gtk_timeout_remove (view->relayout_timeout_id);
		view->relayout_timeout_id = 0;
	}

(Moving to gtkhtml2.)
Comment 5 Damon Chaplin 2002-04-23 18:35:46 UTC
Created attachment 7896 [details] [review]
A proposed patch. I have not tested it so it may not be correct.
Comment 6 Anders Carlsson 2002-04-23 18:37:52 UTC
The patch looks good to me. Damon, go ahead and commit if you want.
Comment 7 Damon Chaplin 2002-04-24 18:07:39 UTC
Created attachment 7930 [details] [review]
revised patch which also fixes other destruction problems
Comment 8 Damon Chaplin 2002-04-24 18:28:15 UTC
Created attachment 7931 [details] [review]
Patch to fix destruction of nautilus-gtkhtml-view
Comment 9 Damon Chaplin 2002-04-24 18:45:47 UTC
With the above 2 patches added, it no longer SEGVs for me.

There are other minor problems that I've reported - bug 79782 and
bug 79783.

OK to commit the gtkhtml patch?
Comment 10 Anders Carlsson 2002-04-24 21:05:16 UTC
Yes, feel free to commit. 
Comment 11 Luis Villa 2002-05-01 09:41:56 UTC
2.0.0 mainly as a reminder to damon to commit when he returns.
Comment 12 Damon Chaplin 2002-05-07 21:00:11 UTC
Patch applied to cvs. closing.
Comment 13 Damon Chaplin 2002-05-16 20:31:21 UTC
*** Bug 81113 has been marked as a duplicate of this bug. ***