I am using Ubuntu 19.04. I had GnuCash 3.4 from the Ubuntu repositories but it crashed regularly (I could get it to load up just fine but within a minute of using it or trying to change a transaction it would crash). So I downloaded the source package for 3.6 from Debian sid and compiled it on Ubuntu. The segfault problems persisted. I don't have a lot of experience debugging segfaults, but I am happy to follow instructions. Here is the output from gdb. In this particular case, I was able to load up GnuCash, open an account, click on a transaction, change the view to "Auto-Split Ledger", and then as soon as I hit Tab or Ctrl (don't remember which key), I got a segfault. (gdb) run Starting program: /usr/bin/gnucash [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffebc07700 (LWP 20594)] [New Thread 0x7fffeb406700 (LWP 20595)] [New Thread 0x7fffeaa03700 (LWP 20596)] [New Thread 0x7fffe99d0700 (LWP 20597)] [New Thread 0x7fffe91cf700 (LWP 20598)] [New Thread 0x7fffe89ce700 (LWP 20599)] [New Thread 0x7fffdb9fd700 (LWP 20600)] [Detaching after fork from child process 20606] Found Finance::Quote version 1.47. [New Thread 0x7fffd8c02700 (LWP 20611)] [Thread 0x7fffd8c02700 (LWP 20611) exited] Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault. 0x00007ffff6c87452 in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0 (gdb) bt full #0 0x00007ffff6c87452 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0 #1 0x00007ffff6cbd70e in gdk_x11_window_get_xid () at /lib/x86_64-linux-gnu/libgdk-3.so.0 #2 0x00007fffd9231d4e in () at /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-xim.so #3 0x00007ffff7795833 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #4 0x00007ffff6d68b89 in gnucash_sheet_key_press_event (widget=0x555555aa4460, event=0x5555572ca320) at ./gnucash/register/register-gnome/gnucash-sheet.c:1904 sheet = 0x555555aa4460 editable = <optimized out> start_sel = 0 end_sel = 32 __func__ = "gnucash_sheet_key_press_event" #5 0x00007ffff7945544 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #6 0x00007ffff7367fd0 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #7 0x00007ffff7383f64 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #8 0x00007ffff7384b6f in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #9 0x00007ffff78f21f4 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #10 0x00007ffff791349b in gtk_window_propagate_key_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #11 0x00007ffff791765b in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #12 0x00007ffff7945544 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #13 0x00007ffff73680c6 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #14 0x00007ffff7383f64 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #15 0x00007ffff7384b6f in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #16 0x00007ffff78f21f4 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #17 0x00007ffff77b2d9f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #18 0x00007ffff77b4dfb in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #19 0x00007ffff6c775e5 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0 #20 0x00007ffff6ca8292 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0 #21 0x00007ffff7cba9ee in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #22 0x00007ffff7cbac88 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #23 0x00007ffff7cbaf82 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #24 0x00007ffff77b3e75 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #25 0x00007ffff72b5e56 in gnc_ui_start_event_loop () at ./gnucash/gnome-utils/gnc-gnome-utils.c:671 id = 362 #26 0x0000555555558132 in inner_main (closure=<optimized out>, argc=<optimized out>, argv=<optimized out>) at ./gnucash/gnucash-bin.c:680 main_mod = <optimized out> fn = <optimized out> #27 0x00007ffff7de2f0d in () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 --Type <RET> for more, q to quit, c to continue without paging-- #28 0x00007ffff7dc57ea in () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #29 0x00007ffff7e43f3f in () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #30 0x00007ffff7e4978f in scm_call_n () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #31 0x00007ffff7e38184 in () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #32 0x00007ffff7dc5dd0 in () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #33 0x00007ffff7dc5e65 in scm_c_with_continuation_barrier () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #34 0x00007ffff7e36d96 in () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #35 0x00007ffff6598ca5 in GC_call_with_stack_base () at /lib/x86_64-linux-gnu/libgc.so.1 #36 0x00007ffff7e37128 in scm_with_guile () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #37 0x00007ffff7de30a2 in scm_boot_guile () at /lib/x86_64-linux-gnu/libguile-2.2.so.1 #38 0x0000555555557a20 in main (argc=<optimized out>, argv=<optimized out>) at ./gnucash/gnucash-bin.c:919 localedir = <optimized out> __func__ = "main" (gdb) quit A debugging session is active. Inferior 1 [process 20590] will be killed. Quit anyway? (y or n) y
I just wanted to add that I tried creating a new file and got a segfault again: 1. On prompt saying that last open file was locked, I clicked "Create new file" 2. Followed the wizard to set up a new file with default settings 3. Open "Initial balance" and clicked on the empty row to create a new transaction. 4. Segfault
Wow, it's a shame that the Gtk devs haven't fixed that yet and it's now affecting Ubuntu. The workaround is to not set the immodule to "xim". One way is to add GTK_IM_MODULE="ibus" to your environment before launching GnuCash. One user reported that the bad input method was set in ~/.xinputrc. He deleted it, but editing out the offending line might work as well. *** This bug has been marked as a duplicate of bug 795014 ***
Thanks! It was ~/.xinputrc that was the problem. All that was in ~/.xinputrc was a line setting the input method to xim, so I deleted it. I don't know why that set in the first place.
Perhaps this is something to report in the Ubuntu bug tracker as well, referring them to the relevant Gtk bug: https://gitlab.gnome.org/GNOME/gtk/issues/61