mail icon indicating copy to clipboard operation
mail copied to clipboard

Segmentation fault on FreeBSD

Open ivan-volnov opened this issue 2 years ago • 1 comments

What Happened?

❯ io.elementary.mail
[1]    2202 segmentation fault  io.elementary.mail

Steps to Reproduce

FreeBSD 13.1-RELEASE

git clone ... && cd mail
pkg install evolution-data-server folks libgee granite libhandy webkit2-gtk3 vala meson ninja
meson build --prefix=/usr/local
cd build
ninja
sudo ninja install
io.elementary.mail

Expected Behavior

A good mail client

OS Version

Other Linux

Software Version

Compiled from git

Log Output

❯ G_MESSAGES_DEBUG=all io.elementary.mail
(process:24131): GLib-GIO-DEBUG: 21:24:58.178: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ?gsettings-backend?
(process:24131): dconf-DEBUG: 21:24:58.178: watch_fast: "/io/elementary/mail/" (establishing: 0, active: 0)
(process:24131): GLib-DEBUG: 21:24:58.179: unsetenv() is not thread-safe and should not be used after threads are created
(io.elementary.mail:24131): dconf-DEBUG: 21:24:58.182: watch_established: "/io/elementary/mail/" (establishing: 1)
(io.elementary.mail:24131): GLib-DEBUG: 21:24:58.196: unsetenv() is not thread-safe and should not be used after threads are created
(io.elementary.mail:24131): Gtk-DEBUG: 21:24:58.196: Connecting to session manager
(io.elementary.mail:24131): Gtk-DEBUG: 21:24:58.196: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
(io.elementary.mail:24131): Gtk-DEBUG: 21:24:58.197: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned
(io.elementary.mail:24131): Gtk-DEBUG: 21:24:58.197: Failed to get an inhibit portal proxy: The name org.freedesktop.portal.Desktop is not owned
(io.elementary.mail:24131): GLib-GIO-DEBUG: 21:24:58.198: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[1]    24131 segmentation fault  G_MESSAGES_DEBUG=all io.elementary.mail
❯ lldb io.elementary.mail
(lldb) target create "io.elementary.mail"
Current executable set to 'io.elementary.mail' (x86_64).
(lldb) r
Process 15914 launched: '/usr/local/bin/io.elementary.mail' (x86_64)
Process 15914 stopped
* thread #1, name = 'io.elementary.ma', stop reason = signal SIGSEGV: invalid address (fault address: 0x323140)
    frame #0: 0x000000083115be54 libc.so.7`strlen + 36
libc.so.7`strlen:
->  0x83115be54 <+36>: movq   (%rdi), %r11
    0x83115be57 <+39>: shlq   $0x3, %rcx
    0x83115be5b <+43>: movq   $-0x1, %rdx
    0x83115be62 <+50>: shlq   %cl, %rdx
(lldb) bt
* thread #1, name = 'io.elementary.ma', stop reason = signal SIGSEGV: invalid address (fault address: 0x323140)
  * frame #0: 0x000000083115be54 libc.so.7`strlen + 36
    frame #1: 0x00000008280f9041 libgtk-3.so.0`gtk_accelerator_parse_with_keycode + 97
    frame #2: 0x0000000828109371 libgtk-3.so.0`___lldb_unnamed_symbol11543 + 129
    frame #3: 0x00000008281071d4 libgtk-3.so.0`gtk_application_set_accels_for_action + 148
    frame #4: 0x0000000000235b6e io.elementary.mail`mail_main_window_constructor(type=36556863296, n_construct_properties=4, construct_properties=0x0000000882f9e540) at MainWindow.vala:110:4
    frame #5: 0x0000000822fb87da libgobject-2.0.so.0`___lldb_unnamed_symbol870 + 650
    frame #6: 0x0000000822fb8394 libgobject-2.0.so.0`g_object_new_valist + 1156
    frame #7: 0x0000000822fb7c5f libgobject-2.0.so.0`g_object_new + 159
    frame #8: 0x0000000000234e1b io.elementary.mail`mail_main_window_construct(object_type=36556863296, application=0x0000000882ebc0f0) at MainWindow.vala:78:27
    frame #9: 0x0000000000234e5d io.elementary.mail`mail_main_window_new(application=0x0000000882ebc0f0) at MainWindow.vala:77:9
    frame #10: 0x0000000000234014 io.elementary.mail`mail_application_real_activate(base=0x0000000882ebc0f0) at Application.vala:109:12
    frame #11: 0x0000000822fb23dd libgobject-2.0.so.0`___lldb_unnamed_symbol835 + 205
    frame #12: 0x0000000822fc85a6 libgobject-2.0.so.0`g_signal_emit_valist + 1190
    frame #13: 0x0000000822fc9006 libgobject-2.0.so.0`g_signal_emit + 134
    frame #14: 0x00000000002335f2 io.elementary.mail`mail_application_real_command_line(base=0x0000000882ebc0f0, command_line=0x000000088db5f040) at Application.vala:61:2
    frame #15: 0x0000000829bf2ee6 libgio-2.0.so.0`___lldb_unnamed_symbol4845 + 150
    frame #16: 0x0000000822fb23dd libgobject-2.0.so.0`___lldb_unnamed_symbol835 + 205
    frame #17: 0x0000000822fc85a6 libgobject-2.0.so.0`g_signal_emit_valist + 1190
    frame #18: 0x0000000822fc9006 libgobject-2.0.so.0`g_signal_emit + 134
    frame #19: 0x0000000829c4f1b4 libgio-2.0.so.0`___lldb_unnamed_symbol5928 + 116
    frame #20: 0x0000000829c50faf libgio-2.0.so.0`___lldb_unnamed_symbol5947 + 1679
    frame #21: 0x0000000829c4ef2a libgio-2.0.so.0`g_application_run + 378
    frame #22: 0x000000000023341f io.elementary.mail`_vala_main(args=0x00000008203bd7a0, args_length1=1) at Application.vala:150:11
    frame #23: 0x00000000002333d2 io.elementary.mail`main(argc=1, argv=0x00000008203bd7a0) at Application.vala:148:9
    frame #24: 0x0000000000233010 io.elementary.mail`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
(lldb) q
Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y


### Hardware Info


`FreeBSD 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64`

No Desktop Environment, a BSPWM rice.

ivan-volnov avatar Jun 03 '22 13:06 ivan-volnov

Problem comes from their action_accelerators loop in src/MainWindow.vala. See my fix.

This problem exists also in tasks, and videos applications (we have patch for this one in ports tree).

OlivierDuchateau avatar Jun 25 '22 20:06 OlivierDuchateau