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 605596 - evolution crash while searching text if new compose window is open
evolution crash while searching text if new compose window is open
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.30.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
: 604887 607288 608407 608672 609033 615009 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-12-28 11:20 UTC by Ruchir Brahmbhatt
Modified: 2013-09-13 01:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (1.94 KB, patch)
2010-01-28 07:12 UTC, Milan Crha
needs-work Details | Review
evo patch ][ (565 bytes, patch)
2010-02-05 14:45 UTC, Milan Crha
committed Details | Review

Description Ruchir Brahmbhatt 2009-12-28 11:20:14 UTC
OS: opensuse 11.2
Evolution: 2.29.4

Steps:
1. Open evolution.
2. Hit ctrl+n to compose new mail then leave it as is.
3. Open main evolution window.
4. Search for any text. (you may have to do it several times until you get crash)

Expected result:
Messages should be filtered as per the search string.

Actual result: 
crash

Backtrace:

Thread 1 (Thread 0x7ffff7fb07f0 (LWP 23650))

  • #0 html_tokenizer_write
    from /usr/lib64/libgtkhtml-3.14.so.19
  • #1 ??
    from /usr/lib64/libgtkhtml-3.14.so.19
  • #2 emhs_sync_write
    at em-html-stream.c line 73
  • #3 emss_process_message
    at em-sync-stream.c line 71
  • #4 g_main_dispatch
    at gmain.c line 1960
  • #5 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #6 g_main_context_iterate
    at gmain.c line 2591
  • #7 IA__g_main_loop_run
    at gmain.c line 2799
  • #8 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 main
    at main.c line 593

Comment 1 Fabio Durán Verdugo 2009-12-28 11:36:42 UTC
Could be related to bug 574157 ?
Comment 2 Ruchir Brahmbhatt 2009-12-28 11:46:48 UTC
(In reply to comment #1)
> Could be related to bug 574157 ?

Backtraces look similar but steps are different.
Comment 3 Ruchir Brahmbhatt 2009-12-29 06:58:50 UTC
This happens even if compose widow is not opened.
Comment 4 Milan Crha 2010-01-12 18:49:15 UTC
Downstream bug report in 2.29.4 about the same:
https://bugzilla.redhat.com/show_bug.cgi?id=550407
Comment 5 Ruchir Brahmbhatt 2010-01-13 04:39:13 UTC
I think it happens even if compose window is not open.
Comment 6 Milan Crha 2010-01-15 17:34:45 UTC
I tried to reproduce this, but it doesn't want to crash on 2.29.5 for me.
I tried this:
a) have mail window with preview panel on
b) search "Subject or Sender contains" for a text being there
c) message is filtered and selected
d) search for a text being there, but on other message
e) the previous is unselected and hidden, where the other is shown and selected
f) search for something not being there
g) no message shown and selected, preview is empty

I tried this couple times, in different order, but still doesn't want to crash to me. I'm trying this in my local Inbox.

Could you try to find some steps to reproduce this, please? Thanks in advance.
Comment 7 Ruchir Brahmbhatt 2010-01-16 05:00:00 UTC
Sorry I missed to mention in my original report. I use Gmail IMAP. Can you see if you can reproduce in that inbox?
Comment 8 Ruchir Brahmbhatt 2010-01-16 09:04:10 UTC
I just upgraded to 2.29.5 and the issue was reproduced.
Comment 9 Akhil Laddha 2010-01-18 11:30:10 UTC
*** Bug 607288 has been marked as a duplicate of this bug. ***
Comment 10 Milan Crha 2010-01-18 13:46:25 UTC
(In reply to comment #7)
> Sorry I missed to mention in my original report. I use Gmail IMAP. Can you see
> if you can reproduce in that inbox?

I do something wrong (differently) for sure. It didn't do anything wrong doing similar steps as described in comment #6 in my GMail's IMAP Inbox.
Comment 11 Ruchir Brahmbhatt 2010-01-18 13:50:33 UTC
(In reply to comment #10)
> I do something wrong (differently) for sure. It didn't do anything wrong doing
> similar steps as described in comment #6 in my GMail's IMAP Inbox.

Currently I'm not able to reproduce. I'll test some more and update here.
Comment 12 Sebastian Dröge (slomo) 2010-01-18 19:30:46 UTC
I can reproduce this bug very easily here but I'm using a different IMAP server. I can reproduce it by simply going to my spam folder and delete some messages by selecting one and pressing delete a few times. Evolution tries to show one message or another and at some point it crashes.
Comment 13 Ruchir Brahmbhatt 2010-01-19 05:22:20 UTC
It just crashed on me now when I tried to search for particular sender in inbox.
Comment 14 Milan Crha 2010-01-28 05:33:52 UTC
I have a similar issue, with inline images on 2.29.5. It's not the same function, but the same file and similar occasions, so I guess it's the same issue.
My mail has few image attachments shown inline and when I delete the mail I see on console:
> gtkhtml-CRITICAL **: html_tokenizer_end: assertion `t &&
>  HTML_IS_TOKENIZER (t)' failed

plus couple more, with a trace below. When I keep the message deleted and uncheck  View->Hide deleted messages, select it, and check it back, then those messages are here again. Pretty consistently on this machine. Thus confirming.

  • #0 IA__g_logv
    at gmessages.c line 430
  • #1 IA__g_log
    at gmessages.c line 569
  • #2 IA__g_type_check_instance_cast
    at gtype.c line 3742
  • #3 html_engine_stream_end
    at htmlengine.c line 4979
  • #4 gtk_html_stream_close
    at gtkhtml-stream.c line 137
  • #5 emhs_sync_close
    at em-html-stream.c line 102
  • #6 emss_process_message
    at em-sync-stream.c line 87
  • #7 g_idle_dispatch
    at gmain.c line 4065
  • #8 g_main_dispatch
    at gmain.c line 1960
  • #9 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #10 g_main_context_iterate
    at gmain.c line 2591
  • #11 IA__g_main_loop_run
    at gmain.c line 2799
  • #12 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #13 main
    at main.c line 611

Comment 15 Milan Crha 2010-01-28 07:12:35 UTC
Created attachment 152467 [details] [review]
evo patch

for evolution;

This fixed it for me. Please give it a try (I'm committing it right now) and let me know if it will not work for you. Thanks in advance.

Just note that setting cancel on the stream is not enough, the state where it was finalized for me was a very nice coincidence, where the sync stream was doing stuff in the main thread, but was finalized in the same time in another thread, thus it got confused pretty much after such thing. Setting in_finalize and having it finish pending mainthread operation properly, and the close in the calling thread, seems to make it work better for me.
Comment 16 Milan Crha 2010-01-28 07:16:21 UTC
Created commit 866a836 in evo master (2.29.90+)
Comment 17 Sebastian Dröge (slomo) 2010-01-28 08:52:20 UTC
Thanks, seems to work for me too.
Comment 18 Milan Crha 2010-01-29 08:51:22 UTC
Err, it causes more crashes, particularly with this trace for me (see below), thus I reverted it in commit 763b775, until some better fix will be found.

Program received signal SIGSEGV, Segmentation fault.

Thread 2951707504 (LWP 2373)

  • #0 calc_min_width
    at htmltext.c line 1582
  • #1 html_object_calc_min_width
    at htmlobject.c line 1134
  • #2 calc_min_width
    at htmlclueflow.c line 678
  • #3 html_object_calc_min_width
    at htmlobject.c line 1134
  • #4 html_clue_flow_real_calc_size
    at htmlclueflow.c line 1046
  • #5 html_object_calc_size
    at htmlobject.c line 1081
  • #6 html_cluev_do_layout
    at htmlcluev.c line 209
  • #7 html_cluev_real_calc_size
    at htmlcluev.c line 316
  • #8 html_object_calc_size
    at htmlobject.c line 1081
  • #9 html_engine_calc_size
    at htmlengine.c line 5275
  • #10 html_engine_update_event
    at htmlengine.c line 4780
  • #11 html_engine_timer_event
    at htmlengine.c line 4939
  • #12 html_engine_stream_end
    at htmlengine.c line 4990
  • #13 gtk_html_stream_close
    at gtkhtml-stream.c line 137
  • #14 emhs_sync_close
    at em-html-stream.c line 99
  • #15 emss_stream_close
    at em-sync-stream.c line 171
  • #16 camel_stream_close
    at camel-stream.c line 149
  • #17 em_html_stream_finalize
    at em-html-stream.c line 128
  • #18 camel_object_unref
    at camel-object.c line 912
  • #19 efh_format_exec
    at em-format-html.c line 248
  • #20 mail_msg_proxy
    at mail-mt.c line 459
  • #21 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #22 g_thread_create_proxy
    at gthread.c line 635
  • #23 start_thread
    at pthread_create.c line 297
  • #24 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Comment 19 Sebastian Dröge (slomo) 2010-01-29 10:00:32 UTC
Yes, unfortunately you're right. I was a bit too fast...
Comment 20 Milan Crha 2010-01-29 14:49:27 UTC
*** Bug 608407 has been marked as a duplicate of this bug. ***
Comment 21 Ruchir Brahmbhatt 2010-01-29 19:04:35 UTC
I also reproduced this on 2.29.6.
Comment 22 Akhil Laddha 2010-02-01 12:46:04 UTC
*** Bug 608672 has been marked as a duplicate of this bug. ***
Comment 23 Akhil Laddha 2010-02-05 04:07:57 UTC
*** Bug 609033 has been marked as a duplicate of this bug. ***
Comment 24 Milan Crha 2010-02-05 14:45:03 UTC
Created attachment 153085 [details] [review]
evo patch ][

for evolution;

OK, I think I found it finally. This was very tricky, and maybe I didn't get it all, but first tests seem to be good.

The issue, for me, was that while one thread was formatting a message, the main thread received a change on a selected message and that was trying to change the text of a preview, to "Retrieving message XXX". It succeeded, but the previous thread was still alive, pushing data to already finalized HTMLEngine. This engine was finalized with one opened stream (I added a commit to GtkHTML to warn on console in such cases). This patch is changing the text of a preview only when the preview is not busy, thus it'll not steal the engine to the formatting thread. I can cancel the thread, but it doesn't work for a job which is processed, which is the one making crash (and I would cancel it in time of finalize call anyway, thus too late). The other reason for not able to cancel the job is that it's not in a queue already, thus no access to it any more.
Comment 25 Milan Crha 2010-02-05 14:47:38 UTC
Created commit dee4792 in evo master (2.29.90+)
Comment 26 Milan Crha 2010-02-16 19:03:01 UTC
*** Bug 604887 has been marked as a duplicate of this bug. ***
Comment 27 Fabio Durán Verdugo 2010-04-07 03:20:08 UTC
*** Bug 615009 has been marked as a duplicate of this bug. ***