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 88931 - nautilus hangs with 100% CPU when switching to list view
nautilus hangs with 100% CPU when switching to list view
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.0.x
Other Linux
: Normal critical
: ---
Assigned To: gtktreeview-bugs
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-07-24 07:55 UTC by James Henstridge
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0



Description James Henstridge 2002-07-24 07:55:27 UTC
Description of Problem:
With a CVS checkout from today, switching to list
view causes nautilus to hang, eating up 100% of
the CPU.

Steps to reproduce the problem:
1. choose "view as list"

Actual Results:
List headers are displayed, then nautilus hangs
(no window redraws).

Expected Results:
Display list view.

How often does this happen? 
Every time.
Comment 1 James Henstridge 2002-07-24 08:08:31 UTC
Attaching GDB to the nautilus process, I get the following repeat in
the stack trace:

  • #7 gtk_tree_view_size_request
    at gtktreeview.c line 1497
  • #8 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #9 g_type_class_meta_marshal
    at gclosure.c line 514
  • #10 g_closure_invoke
    at gclosure.c line 437
  • #11 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #12 g_signal_emit_valist
    at gsignal.c line 2100
  • #13 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #14 do_size_request
    at gtksizegroup.c line 491
  • #15 _gtk_size_group_compute_requisition
    at gtksizegroup.c line 678
  • #16 gtk_widget_size_request
    at gtkwidget.c line 2203
  • #17 do_validate_rows
    at gtktreeview.c line 4070
  • #18 validate_rows
    at gtktreeview.c line 4093
  • #19 gtk_tree_view_size_request
    at gtktreeview.c line 1497

It is caught in a loop trying to compute the size of the tree.
Comment 2 Andrew Sobala 2002-07-24 11:29:12 UTC
Gar.

James, could you post the entire stack trace into the bug please (not
as an attachment, but into the body)? It helps with debugging, and
also some automatic bug duplication tools need the entire stack trace
to work :-). Thanks a lot.
Comment 3 Andrew Sobala 2002-07-24 11:31:57 UTC
Urm... sorry, didn't realise you were a gnome hacker. Nevertheless,
the whole stack trace would help when (and if) duplicates flood in.
Comment 4 James Henstridge 2002-07-24 12:03:35 UTC
The problem was originally pointed out by a user of #gnome.  I was
able to reproduce the problem, and posted the results above.

This is not a crash, but rather a hang.  It is also a tight recursive
loop, so the stack trace is huge.  Here is the beginning of the stack
trace, omitting the repeating section of the stack.  It is not
identical to the previous trace, as I am breaking into running code,
rather than tracing a segfault.

I went through past the repeating section, and included the stack
trace up to the control boundary (I assume this is the view object). 
I noticed that there is some GtkSizeGroup related frames.  Could this
be a bad interaction between size groups and tree views?  What do you
think, jrb?

  • #0 g_utf8_strlen
    at gutf8.c line 246
  • #1 get_items_log_attrs
    at pango-layout.c line 2797
  • #2 pango_layout_check_lines
    at pango-layout.c line 2911
  • #3 pango_layout_get_extents_internal
    at pango-layout.c line 1879
  • #4 pango_layout_get_extents
    at pango-layout.c line 2004
  • #5 pango_layout_get_pixel_extents
    at pango-layout.c line 2027
  • #6 gtk_cell_renderer_text_get_size
    at gtkcellrenderertext.c line 1225
  • #7 gtk_cell_renderer_get_size
    at gtkcellrenderer.c line 341
  • #8 gtk_tree_view_column_cell_get_size
    at gtktreeviewcolumn.c line 2315
  • #9 validate_row
    at gtktreeview.c line 3661
  • #10 do_validate_rows
    at gtktreeview.c line 4038
  • #11 validate_rows
    at gtktreeview.c line 4093
  • #12 gtk_tree_view_size_request
    at gtktreeview.c line 1497
  • #13 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #14 g_type_class_meta_marshal
    at gclosure.c line 514
  • #15 g_closure_invoke
    at gclosure.c line 437
  • #16 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #17 g_signal_emit_valist
    at gsignal.c line 2100
  • #18 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #19 do_size_request
    at gtksizegroup.c line 491
  • #20 _gtk_size_group_compute_requisition
    at gtksizegroup.c line 678
  • #21 gtk_widget_size_request
    at gtkwidget.c line 2203
  • #22 do_validate_rows
    at gtktreeview.c line 4070
  • #23 validate_rows
    at gtktreeview.c line 4093
  • #1535 validate_rows
    at gtktreeview.c line 4093
  • #1536 gtk_tree_view_size_request
    at gtktreeview.c line 1497
  • #1537 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #1538 g_type_class_meta_marshal
    at gclosure.c line 514
  • #1539 g_closure_invoke
    at gclosure.c line 437
  • #1540 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #1541 g_signal_emit_valist
    at gsignal.c line 2100
  • #1542 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #1543 do_size_request
    at gtksizegroup.c line 491
  • #1544 _gtk_size_group_compute_requisition
    at gtksizegroup.c line 678
  • #1545 gtk_widget_size_request
    at gtkwidget.c line 2203
  • #1546 gtk_scrolled_window_size_request
    at gtkscrolledwindow.c line 934
  • #1547 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #1548 g_type_class_meta_marshal
    at gclosure.c line 514
  • #1549 g_closure_invoke
    at gclosure.c line 437
  • #1550 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #1551 g_signal_emit_valist
    at gsignal.c line 2100
  • #1552 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #1553 do_size_request
    at gtksizegroup.c line 491
  • #1554 _gtk_size_group_compute_requisition
    at gtksizegroup.c line 678
  • #1555 gtk_widget_size_request
    at gtkwidget.c line 2203
  • #1556 gtk_window_size_request
    at gtkwindow.c line 3385
  • #1557 bonobo_plug_size_request
    at bonobo-plug.c line 237
  • #1558 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #1559 g_type_class_meta_marshal
    at gclosure.c line 514
  • #1560 g_closure_invoke
    at gclosure.c line 437
  • #1561 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #1562 g_signal_emit_valist
    at gsignal.c line 2100
  • #1563 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #1564 do_size_request
    at gtksizegroup.c line 491
  • #1565 _gtk_size_group_compute_requisition
    at gtksizegroup.c line 678
  • #1566 gtk_widget_size_request
    at gtkwidget.c line 2203
  • #1567 gtk_socket_size_request
    at gtksocket.c line 439
  • #1568 bonobo_socket_size_request
    at bonobo-socket.c line 199

Comment 5 Jonathan Taylor 2002-07-24 14:13:27 UTC
Same thing for me except mine crashes.
Comment 6 James Henstridge 2002-07-24 14:25:07 UTC
are you seeing an immediate crash (which might be a different bug), or
a period of high CPU activity with the symptoms I described then a
crash (which might indicate that the stack was exhausted)?

If it is a crash with different symptoms, you might be seeing a
different bug.
Comment 7 James Henstridge 2002-07-24 14:27:57 UTC
Hrm.  Somehow Jonathan Taylor's email got removed from CC when I
submitted then :(
Comment 8 Jonathan Taylor 2002-07-24 14:58:15 UTC
For me it will use 100% CPU for a 10 secs or so and then crash.
Comment 9 Jonathan Blandford 2002-07-24 16:43:57 UTC
That crash is prolly due to a stack overflow.  I'm not sure what's
going on here -- even if something catastrophic happens, that loop
there should exit.  I'll try to look into it.
Comment 10 Dave Camp 2002-07-24 17:05:22 UTC
It looks like this was broken by federico's recent EelBackground
changes, particularly the stuff dealing with the style.

I'm about to replace all of the EelBackgroundStyle anyway, so this
issue will go away.  jrb, if you want to be able to reproduce this
you'll want to use eel and nautilus from 7-23.
Comment 11 Luis Villa 2002-07-24 17:58:13 UTC
Critical, high, bad, etc., etc. Sorry I'm so slow this week :/
Comment 12 James Henstridge 2002-07-25 14:16:55 UTC
Just updated eel and nautilus on my machine and performed the same
test.  The list view came up without a problem.

This gets rid of the problem in nautilus, but the bad
GtkTreeView/GtkSizeGroup interaction that jrb may want to trace.
Comment 13 Luis Villa 2002-07-26 00:39:25 UTC
Reassigning to gtk-tree-view since there is fixage in nautilus.
jrb/kris/etc, do with as you please.
Comment 14 Kristian Rietveld 2002-11-18 20:38:49 UTC
No clue what to do with this bug.

Jonathan? You got anything to add?
Comment 15 Kristian Rietveld 2002-11-26 21:54:09 UTC
Please REOPEN if needed.