GNOME Bugzilla – Bug 300696
Crash (100%CPU) on paste into mail editor
Last modified: 2005-08-08 04:43:21 UTC
Version details: 2.2.2 I got a lockup when pasting from the mail editor back into itself. The message looked like this (numbers shown for reference only): 1: > Quoted text 1 2: > Quoted text 2 3: 4: Non-quoted text 5: 6: > Quoted text 3 7: > Quoted text 4 I selected lines 6-7, cut, moved to line 3, and pasted. Evolution started taking 100% CPU. The backtrace obtained by attaching gdb is as follows: 0x06ef9535 in html_engine_get_insert_level_for_object (e=0xa0dc240, o=0x149523c0) at htmlengine-edit.c:776 776 while (clue && clue->parent && (HTML_IS_CLUEV (clue->parent) || HTML_IS_TABLE_CELL (clue->parent))) (gdb) bt
+ Trace 58203
The source surrounding the line in the top stack frame is: 771 772 if (level > 3) { 773 if (e && e->cursor->object && e->cursor->object->parent && e->cursor->object->parent->parent && html_object_is_clue (e->cursor->object->parent->parent)) { 774 HTMLObject *clue = e->cursor->object->parent->parent; 775 776 while (clue && clue->parent && (HTML_IS_CLUEV (clue->parent) || HTML_IS_TABLE_CELL (clue->parent))) 777 cursor_level ++; 778 } 779 } 780 The code appears stuck in lines 776-777. cursor_level is not even referenced in the while condition, so this is an infinite loop if it can be executed even once, as long as the two macros referenced don't contain references to cursor_level. If they do, there is a loop in the data structure somewhere. Thanks!
Luke: I am not able to replicate the bug as mentioned by you. I followed the steps as described in the bug report but was unable to replicate the bug. My gtkhtml versions are: gtkhtml2-3.6.2.0.200505010300-0.snap.novell.0.1 libgtkhtml-2.6.1-2.1
Evolution uses gtkhtml3, not gtkhtml2, but maybe SUSE's package names are just weird, because the version numbers line up: $ rpm -qa | grep gtkhtml gtkhtml3-3.6.2-1 gtkhtml3-debuginfo-3.6.2-1 gtkhtml2-2.6.3-1 gnome-python2-gtkhtml2-2.10.0-2.1 In CVS it appears that the module "gtkhtml" is actually gtkhtml3, and gtkhtml2 is what you have as libgtkhtml... Anyway, I checked gtkhtml in GNOME CVS: http://cvs.gnome.org/viewcvs/gtkhtml/src/htmlengine-edit.c?view=markup It appears this has not been fixed in CVS head, at least in theory -- look at the very end: int html_engine_get_insert_level_for_object (HTMLEngine *e, HTMLObject *o) { int cursor_level = 3, level = html_object_get_insert_level (o); if (level > 3) { if (e && e->cursor->object && e->cursor->object->parent && e->cursor->object->parent->parent && html_object_is_clue (e->cursor->object->parent->parent)) { HTMLObject *clue = e->cursor->object->parent->parent; while (clue && clue->parent && (HTML_IS_CLUEV (clue->parent) || HTML_IS_TABLE_CELL (clue->parent))) cursor_level ++; } } return MIN (level, cursor_level); } I used to remember what to do to replicate this 100%, but a quick test failed to turn up anything. I know I've seen this again recently though, but it seems harder to trigger now.
The code you are poiting out is same as the bug for #272976. I hope to commit a fix for this soon.
*** This bug has been marked as a duplicate of 272976 ***
Re-opening.
Fixed in the cvs Head. Kindly verify in the next release.