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 792763 - deleting a transaction can cause a SIGSEGV
deleting a transaction can cause a SIGSEGV
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
2.7.x
Other Linux
: Normal normal
: ---
Assigned To: gnucash-general-maint
gnucash-general-maint
Depends on:
Blocks:
 
 
Reported: 2018-01-21 21:18 UTC by Fabio Coatti
Modified: 2018-06-30 00:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabio Coatti 2018-01-21 21:18:38 UTC
When deleting a transaction, sometimes gnucash crashes with a core dump.
Some details can be found in this ML thread: https://lists.gnucash.org/pipermail/gnucash-devel/2018-January/041459.html

bt is also reported below.
A couple of context info:
- I'm using SQL backend (mysql)
- The database has been migrated to 2.7.3 from 2.6.19, but works otherwise fine
- It is likely (but I can't check easily) that the transactions that caused the crash have been inserted in an account that has subsequently been deleted. Maybe it is completely irrelevant, but it could have some relevance.
Comment from JRalls:
"Anyway, the problem is obvious from the first tow stack frames: You've deleted the transaction out from under one of the business pages (can't tell from the backtrace which one and it probably doesn't matter) and so there's no primary transaction. xaccTransCountSplits doesn't protect itself from being called with a null transaction (it should) and gnc_plugin_business_update_menus doesn't check that it got a transaction before calling it (it should), so boom."

BT:

Program terminated with signal SIGSEGV, Segmentation fault.
  • #0 xaccTransCountSplits
    at Transaction.c line 2318
  • #0 xaccTransCountSplits
    at Transaction.c line 2318
  • #1 gnc_plugin_business_update_menus
    at gnc-plugin-business.c line 926
  • #2 gnc_plugin_business_main_window_page_changed
    at gnc-plugin-business.c line 946
  • #3 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #4 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #7 gnc_main_window_generate_title
    at gnc-main-window.c line 1536
  • #8 gnc_main_window_update_title
    at gnc-main-window.c line 1558
  • #9 g_list_foreach
    from /usr/lib64/libglib-2.0.so.0
  • #10 gnc_main_window_update_all_titles
    at gnc-main-window.c line 1566
  • #11 gnc_main_window_book_dirty_cb
    at gnc-main-window.c line 1576
  • #12 qof_commit_edit_part2
    at qofinstance.cpp line 1011
  • #13 xaccSplitCommitEdit
    at Split.c line 1004
  • #14 do_destroy
    at Transaction.c line 1531
  • #15 qof_commit_edit_part2
    at qofinstance.cpp line 1048
  • #16 xaccTransCommitEdit
    at Transaction.c line 1692
  • #17 gnc_split_register_delete_current_trans
    at split-register.c line 1140
  • #18 gnc_plugin_page_register_cmd_delete_transaction
    at gnc-plugin-page-register.c line 3575
  • #19 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #20 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #21 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #22 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #23 ??
    from /usr/lib64/libgtk-3.so.0
  • #24 ??
    from /usr/lib64/libgtk-3.so.0
  • #25 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #26 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib64/libgtk-3.so.0
  • #28 ??
    from /usr/lib64/libgtk-3.so.0
  • #29 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #31 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #32 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgtk-3.so.0
  • #34 ffi_call_unix64
    from /usr/lib64/libffi.so.6
  • #35 ffi_call
    from /usr/lib64/libffi.so.6
  • #36 g_cclosure_marshal_generic_va
    from /usr/lib64/libgobject-2.0.so.0
  • #37 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #38 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #39 ??
    from /usr/lib64/libgtk-3.so.0
  • #40 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #41 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #42 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #43 ??
    from /usr/lib64/libgtk-3.so.0
  • #44 ??
    from /usr/lib64/libgtk-3.so.0
  • #45 ??
    from /usr/lib64/libgtk-3.so.0
  • #46 gtk_event_controller_handle_event
    from /usr/lib64/libgtk-3.so.0
  • #47 ??
    from /usr/lib64/libgtk-3.so.0
  • #48 ??
    from /usr/lib64/libgtk-3.so.0
  • #49 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #50 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #51 ??
    from /usr/lib64/libgtk-3.so.0
  • #52 ??
    from /usr/lib64/libgtk-3.so.0
  • #53 gtk_main_do_event
    from /usr/lib64/libgtk-3.so.0
  • #54 ??
    from /usr/lib64/libgdk-3.so.0
  • #55 ??
    from /usr/lib64/libgdk-3.so.0
  • #56 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #57 ??
    from /usr/lib64/libglib-2.0.so.0
  • #58 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #59 gtk_main
    from /usr/lib64/libgtk-3.so.0
  • #60 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 652
  • #61 inner_main
    at gnucash-bin.c line 675
  • #62 ??
    from /usr/lib64/libguile-2.2.so.1
  • #63 ??
    from /usr/lib64/libguile-2.2.so.1
  • #64 ??
    from /usr/lib64/libguile-2.2.so.1
  • #65 scm_call_n
    from /usr/lib64/libguile-2.2.so.1
  • #66 ??
    from /usr/lib64/libguile-2.2.so.1
  • #67 ??
    from /usr/lib64/libguile-2.2.so.1
  • #68 scm_c_with_continuation_barrier
    from /usr/lib64/libguile-2.2.so.1
  • #69 ??
    from /usr/lib64/libguile-2.2.so.1
  • #70 GC_call_with_stack_base
    from /usr/lib64/libgc.so.2
  • #71 scm_with_guile
    from /usr/lib64/libguile-2.2.so.1
  • #72 scm_boot_guile
    from /usr/lib64/libguile-2.2.so.1
  • #73 main
    at gnucash-bin.c line 819

Comment 1 John Ralls 2018-01-30 22:35:11 UTC
This problem has been fixed in our software repository. The fix will go into the next unstable software release.
Comment 2 John Ralls 2018-06-30 00:03:30 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=792763. Please update any external references or bookmarks.