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 492389 - Evolution crashes on sorting by subjects with russian characters in some subfolder
Evolution crashes on sorting by subjects with russian characters in some subf...
Status: RESOLVED INCOMPLETE
Product: evolution
Classification: Applications
Component: Mailer
2.12.x (obsolete)
Other All
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 417816 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-11-01 15:53 UTC by vova
Modified: 2011-08-04 03:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Junk instead of data in mails list (228.70 KB, image/png)
2007-11-02 08:17 UTC, vova
  Details
[patch] allows g_utf8_collate handle not-UTF-8 8-bit characters (1.40 KB, patch)
2007-11-05 16:11 UTC, Alexandre "Sunny" Kovalenko
rejected Details | Review

Description vova 2007-11-01 15:53:38 UTC
Steps to reproduce:
1. go to some sub-folder with lots of mails
2. select sorting by subject 
3. evolution crashed
4. remove contents of .evolution/mail/config/
5. start evolution
6. select same folder again
7. evolution crashed again



Stack trace:
(gdb) bt
  • #0 strcmp
    from /lib/libc.so.7
  • #1 g_utf8_collate
    from /usr/local/lib/libglib-2.0.so.0
  • #2 e_collate_compare
    at e-util.c line 121
  • #3 e_sort_callback
    at e-table-sorting-utils.c line 92
  • #4 g_qsort_with_data
    from /usr/local/lib/libglib-2.0.so.0
  • #5 e_table_sorting_utils_tree_sort
    at e-table-sorting-utils.c line 299
  • #6 resort_node
    at e-tree-table-adapter.c line 185
  • #7 generate_tree
    at e-tree-table-adapter.c line 376
  • #8 update_node
    at e-tree-table-adapter.c line 485
  • #9 etta_proxy_node_changed
    at e-tree-table-adapter.c line 765
  • #10 g_cclosure_marshal_VOID__POINTER
    from /usr/local/lib/libgobject-2.0.so.0
  • #11 g_closure_invoke
    from /usr/local/lib/libgobject-2.0.so.0
  • #12 g_signal_handler_disconnect
    from /usr/local/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/local/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/local/lib/libgobject-2.0.so.0
  • #15 e_tree_model_node_changed
    at e-tree-model.c line 261
  • #16 e_tree_memory_thaw
    at e-tree-memory.c line 203
  • #17 build_tree
    at message-list.c line 2556
  • #18 regen_list_regened
    at message-list.c line 3945
  • #19 mail_msgport_replied
    at mail-mt.c line 473
  • #20 g_io_channel_unix_get_fd
    from /usr/local/lib/libglib-2.0.so.0
  • #21 g_main_context_dispatch
    from /usr/local/lib/libglib-2.0.so.0
  • #22 g_main_context_check
    from /usr/local/lib/libglib-2.0.so.0
  • #23 g_main_loop_run
    from /usr/local/lib/libglib-2.0.so.0
  • #24 bonobo_main
    from /usr/local/lib/libbonobo-2.so.0
  • #25 main
    at main.c line 602

Other information:
Comment 1 vova 2007-11-01 15:59:12 UTC
If it has any meaning:
LANG=ru_RU.KOI8-R
Comment 2 vova 2007-11-01 16:04:43 UTC
on stderr it shows:

(evolution:86893): GLib-CRITICAL **: g_convert: assertion `str != NULL' failed

(evolution:86893): GLib-CRITICAL **: g_convert: assertion `str != NULL' failed
Comment 3 vova 2007-11-01 16:08:29 UTC
in case when it started with 

LANG=C it does not crash
Comment 4 vova 2007-11-02 08:12:11 UTC
After unsetting LANG, I have

$ env | egrep LC_
GDM_LANG=ru_RU.KOI8-R
LC_MESSAGES=ru_RU.KOI8-R
LC_MONETARY=en_US.US-ASCII
LC_NUMERIC=en_US.US-ASCII
LC_TIME=C
$

And with such environment it also shows some junk instead of dates in mails list.
Comment 5 vova 2007-11-02 08:17:20 UTC
Created attachment 98363 [details]
Junk instead of data in mails list
Comment 6 Tobias Mueller 2007-11-02 11:59:33 UTC
Hi,
thanks for that pretty stacktrace :)

Interesting issue. Would you mind to give us such an email which produces garbage instead of dates and some mails with russian subjects?

Is this perfectly reproduceable?
Comment 7 vova 2007-11-02 13:31:26 UTC
(In reply to comment #6)
 
> Interesting issue. Would you mind to give us such an email which produces
> garbage instead of dates 

I guess, it is not due to some specific message.
Strings that are placed instead of dates are random even for same message.
Looks like runaway pointer.

Anyway I'll attach same message as on shot (date.mbox).

> and some mails with russian subjects?
russian-subject.mbox

> Is this perfectly reproduceable?

Yes. Generally, after hitting bug with sorting, I was unable to use evolution et all - it crashes just after start, 
removing .evolution/mail/config/* makes possible to read other folders

and only workaround with cleaning LANG in env "save" me.

Bug with dates also easy reproducible.
Comment 8 Alexandre "Sunny" Kovalenko 2007-11-05 16:11:28 UTC
Created attachment 98569 [details] [review]
[patch] allows g_utf8_collate handle not-UTF-8 8-bit characters

See my comment above in this thread.
Comment 9 Alexandre "Sunny" Kovalenko 2007-11-05 16:12:10 UTC
At least in my case it seems that g_utf8_collate will pass NULL strings, it has obtained from g_utf8_normalize, onto strcoll causing the core dump. Patch, attached below helped.

@vova: it is possible that you have the mix of KOI-8 and UTF-8 in your message box triggering this behavior.  
Comment 10 vova 2007-11-08 18:11:15 UTC
With the patch it does not crash any more, thanks.
Comment 11 Owen Taylor 2007-11-11 18:10:35 UTC
Comment on attachment 98569 [details] [review]
[patch] allows g_utf8_collate handle not-UTF-8 8-bit characters

You just aren't allowed to call g_utf8_collate() on non-Unicode strings.
Or it would be called g_maybe_its_utf8_collate() :-)

g_utf8_normalize() isn't defined to return NULL on UTF-8 input, it's just
as likely to crash.
Comment 12 Alexandre "Sunny" Kovalenko 2007-11-12 01:25:18 UTC
Thank you, will keep this patch local until someone fixes the real issue: how should Evolution work in the environments where UTF-8 and 8-bit non-UTF-8 strings are likely to appear together (e.g. KOI-8/UTF-8 mix).
Comment 13 Akhil Laddha 2009-05-28 06:13:04 UTC
*** Bug 417816 has been marked as a duplicate of this bug. ***
Comment 14 Milan Crha 2011-06-21 05:02:42 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> > Interesting issue. Would you mind to give us such an email which produces
> > garbage instead of dates 
> 
> I guess, it is not due to some specific message.
> Strings that are placed instead of dates are random even for same message.
> Looks like runaway pointer.
> 
> Anyway I'll attach same message as on shot (date.mbox).
> 
> > and some mails with russian subjects?
> russian-subject.mbox

The two attachments didn't get it in, unfortunately. Do you see this in the current stable, 3.0.x, or even the previous stable, the 2.32.x, please? If so, the messages for both issues will help to reevaluate and maybe fix the issue finally.
Comment 15 Akhil Laddha 2011-08-04 03:58:02 UTC
vova@fbsd.ru, could you please provide requested information as per comment#14 ?