elementary / mail

Mail app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
197 stars 48 forks source link

Mail crashes when email folders have emojis #565

Open p-monteiro opened 3 years ago

p-monteiro commented 3 years ago

What Happened

I have added my Outlook.com account to Evolution (IMAP+SMTP) and I have my folders configured with emojis and hierarchy. When opening Mail, the labels have unrecognized symbols and if I try to open a folder, Mail crashes. Note, however, one of the emojis is correctly shown (see image).

Screenshot from 2021-05-02 14 35 05

Expected Behavior

Folder labels must be correctly displayed and Mail must not crash.

Steps to Reproduce

  1. sudo apt install evolution
  2. Add and setup Outlook.com account with emojis in mail folder labels (e.g., đź”’)
  3. Open Mail
  4. Bad rendering of labels
  5. Hovering labels produces an empty tooltip
  6. Open a folder
  7. Crash

Logs

GDB Log

``` pmem@pmem-vm:~$ gdb io.elementary.mail GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from io.elementary.mail... (No debugging symbols found in io.elementary.mail) (gdb) run Starting program: /usr/bin/io.elementary.mail [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffecfe6700 (LWP 9831)] [New Thread 0x7fffe7fff700 (LWP 9832)] [New Thread 0x7fffe77fe700 (LWP 9836)] [New Thread 0x7fffdffff700 (LWP 9837)] [New Thread 0x7fffdf7fe700 (LWP 9838)] [Detaching after vfork from child process 9839] [New Thread 0x7fffde6d2700 (LWP 9844)] [New Thread 0x7fffdded1700 (LWP 9845)] (io.elementary.mail:9827): Pango-WARNING **: 14:46:09.194: Invalid UTF-8 string passed to pango_layout_set_text() (io.elementary.mail:9827): Pango-WARNING **: 14:46:09.242: Invalid UTF-8 string passed to pango_layout_set_text() (io.elementary.mail:9827): Pango-WARNING **: 14:46:09.242: Invalid UTF-8 string passed to pango_layout_set_text() [Thread 0x7fffde6d2700 (LWP 9844) exited] [Thread 0x7fffdffff700 (LWP 9837) exited] [New Thread 0x7fffdffff700 (LWP 9848)] (io.elementary.mail:9827): Gtk-WARNING **: 14:46:24.152: Failed to set text '\xed\xa0\xbd\xed\xb4\x92 — Personal' from markup due to error parsing markup: Error on line 1 char 28: Invalid UTF-8 encoded text in name — not valid “\xed\xa0\xbd\xed\xb4\x92 — Personal” (io.elementary.mail:9827): Pango-WARNING **: 14:46:24.153: Invalid UTF-8 string passed to pango_layout_set_text() [Thread 0x7fffdded1700 (LWP 9845) exited] (io.elementary.mail:9827): GLib-CRITICAL **: 14:46:38.818: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed (io.elementary.mail:9827): Pango-WARNING **: 14:46:38.828: Invalid UTF-8 string passed to pango_layout_set_text() [Thread 0x7fffdffff700 (LWP 9848) exited] (io.elementary.mail:9827): Gtk-WARNING **: 14:46:39.517: Failed to set text '\xed\xa0\xbd\xed\xb4\x92 — Personal' from markup due to error parsing markup: Error on line 1 char 28: Invalid UTF-8 encoded text in name — not valid “\xed\xa0\xbd\xed\xb4\x92 — Personal” [New Thread 0x7fffdffff700 (LWP 9851)] (io.elementary.mail:9827): Gtk-WARNING **: 14:46:40.851: Failed to set text '\xed\xa0\xbd\xed\xb4\x92 — Personal' from markup due to error parsing markup: Error on line 1 char 28: Invalid UTF-8 encoded text in name — not valid “\xed\xa0\xbd\xed\xb4\x92 — Personal” [Thread 0x7fffdded1700 (LWP 9850) exited] (io.elementary.mail:9827): Gtk-WARNING **: 14:46:43.056: Failed to set text '\xed\xa0\xbd\xed\xb4\x92 — Personal' from markup due to error parsing markup: Error on line 1 char 28: Invalid UTF-8 encoded text in name — not valid “\xed\xa0\xbd\xed\xb4\x92 — Personal” [New Thread 0x7fffdded1700 (LWP 9852)] (io.elementary.mail:9827): Gtk-WARNING **: 14:46:43.630: Failed to set text '\xed\xa0\xbd\xed\xb4\x92 — Personal' from markup due to error parsing markup: Error on line 1 char 28: Invalid UTF-8 encoded text in name — not valid “\xed\xa0\xbd\xed\xb4\x92 — Personal” (io.elementary.mail:9827): GLib-CRITICAL **: 14:46:43.829: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed (io.elementary.mail:9827): GLib-CRITICAL **: 14:46:43.830: g_variant_ref_sink: assertion 'value != NULL' failed Thread 1 "io.elementary.m" received signal SIGSEGV, Segmentation fault. 0x00007ffff7eb13f0 in g_bit_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 (gdb) backtrace #0 0x00007ffff7eb13f0 in g_bit_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #1 0x00007ffff7f1f2cc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007ffff7f24b95 in g_variant_serialiser_needed_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007ffff7f1e73f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007ffff7f1f2d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007ffff7f24c1d in g_variant_serialiser_needed_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #6 0x00007ffff7f1e73f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #7 0x00007ffff7f1f2d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #8 0x00007ffff7f24d8d in g_variant_serialiser_needed_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x00007ffff7f1e73f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x00007ffff7f1f2d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #11 0x00007ffff7f24cfd in g_variant_serialiser_needed_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #12 0x00007ffff7f1e73f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #13 0x00007ffff7f1f2d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #14 0x00007ffff7f24b95 in g_variant_serialiser_needed_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #15 0x00007ffff7f1e73f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #16 0x00007ffff7f1ee33 in g_variant_get_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #17 0x00007fffec7a151f in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so #18 0x00007fffec7a15d7 in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so #19 0x00007fffec7a2771 in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so #20 0x00007fffec79f80f in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so #21 0x00007ffff7328ba9 in ?? () from /lib/x86_64-linux-gnu/libgio-2.0.so.0 #22 0x00007ffff732d2a3 in ?? () from /lib/x86_64-linux-gnu/libgio-2.0.so.0 #23 0x00007ffff732f0b8 in g_settings_set_value () from /lib/x86_64-linux-gnu/libgio-2.0.so.0 #24 0x00005555555876bb in ?? () #25 0x00007ffff7e41802 in g_closure_invoke () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #26 0x00007ffff7e55814 in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #27 0x00007ffff7e60bbe in g_signal_emit_valist () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0 --Type for more, q to quit, c to continue without paging-- ```

Platform Information

elementary OS 6 Beta VMWare fresh install

marbetschar commented 3 years ago

This is a bug in Evolution Data Server and has been fixed in 3.38.4+: https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/300

Unfortunately the underlying Ubuntu ships Evolution Data Server 3.36.5. The only solution is to package a newer EDS using Flatpak - which is blocked by https://github.com/elementary/mail/issues/591