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 626970 - Crash when saving a transaction whose destination account was deleted in the meantime
Crash when saving a transaction whose destination account was deleted in the ...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Engine
2.3.x
Other All
: Normal critical
: ---
Assigned To: Geert Janssens
Derek Atkins
Depends on:
Blocks:
 
 
Reported: 2010-08-15 04:29 UTC by simon80
Modified: 2018-06-29 22:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Excerpt from gnucash.trace (2.38 KB, text/plain)
2011-10-16 21:26 UTC, Geert Janssens
Details

Description simon80 2010-08-15 04:29:56 UTC
What were you doing when the application crashed?
Saving a transaction


Distribution: Debian squeeze/sid
Gnome Release: 2.30.2 2010-07-17 (Debian)
BugBuddy Version: 2.30.0

System: Linux 2.6.32-5-amd64 #1 SMP Sat Jul 24 01:47:24 UTC 2010 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10707000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome
GTK+ Modules: gnomebreakpad, canberra-gtk-module

Memory status: size: 464797696 vsize: 464797696 resident: 63610880 share: 20824064 rss: 63610880 rss_rlim: 18446744073709551615
CPU usage: start_time: 1281846339 rtime: 1208 utime: 1172 stime: 36 cutime:46 cstime: 6 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/gnucash-bin'

[Thread debugging using libthread_db enabled]
[New Thread 0x7fa323c81710 (LWP 21866)]
0x00007fa334b94b4d in __libc_waitpid (pid=21875, 
    stat_loc=<value optimized out>, options=0)
    at ../sysdeps/unix/sysv/linux/waitpid.c:41
	in ../sysdeps/unix/sysv/linux/waitpid.c

Thread 1 (Thread 0x7fa33d6ee7e0 (LWP 21864))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 IA__g_spawn_sync
    at /tmp/buildd/glib2.0-2.24.1/glib/gspawn.c line 386
  • #2 IA__g_spawn_command_line_sync
    at /tmp/buildd/glib2.0-2.24.1/glib/gspawn.c line 700
  • #3 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #4 <signal handler called>
  • #5 xaccAccountRecomputeBalance
    from /usr/lib/gnucash/gnucash/libgncmod-engine.so
  • #6 ??
    from /usr/lib/gnucash/gnucash/libgncmod-engine.so
  • #7 qof_commit_edit_part2
    from /usr/lib/gnucash/libgnc-qof.so.1
  • #8 xaccTransCommitEdit
    from /usr/lib/gnucash/gnucash/libgncmod-engine.so
  • #9 gnc_split_register_save
    from /usr/lib/gnucash/gnucash/libgncmod-ledger-core.so
  • #10 gnc_split_reg_enter
    from /usr/lib/gnucash/libgnc-gnome.so.0
  • #11 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #12 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #13 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2981
  • #14 IA__g_signal_emit_by_name
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3075
  • #15 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #16 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3248
  • #17 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2981
  • #18 IA__g_signal_emit_by_name
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3075
  • #19 ??
    from /usr/lib/gnucash/gnucash/libgncmod-register-gnome.so
  • #20 _gtk_marshal_BOOLEAN__BOXED
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmarshalers.c line 84
  • #21 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #22 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #23 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2991
  • #24 IA__g_signal_emit
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3038
  • #25 gtk_widget_event_internal
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c line 4943
  • #26 IA__gtk_window_propagate_key_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwindow.c line 5184
  • #27 gtk_window_key_press_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwindow.c line 5214
  • #28 _gtk_marshal_BOOLEAN__BOXED
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmarshalers.c line 84
  • #29 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #30 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #31 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2991
  • #32 IA__g_signal_emit
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3038
  • #33 gtk_widget_event_internal
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c line 4943
  • #34 IA__gtk_propagate_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 2416
  • #35 IA__gtk_main_do_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1647
  • #36 gdk_event_dispatch
    at /tmp/buildd/gtk+2.0-2.20.1/gdk/x11/gdkevents-x11.c line 2372
  • #37 g_main_dispatch
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 1960
  • #38 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 2513
  • #39 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 2591
  • #40 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 2799
  • #41 IA__gtk_main
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1219
  • #42 gnc_ui_start_event_loop
    from /usr/lib/gnucash/gnucash/libgncmod-gnome-utils.so
  • #43 ??
  • #44 scm_boot_guile
    from /usr/lib/libguile.so.12
  • #45 main
Current language:  auto
The current source language is "auto; currently asm".
Current language:  auto
The current source language is "auto; currently c".
A debugging session is active.

	Inferior 1 [process 21864] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]


---- Critical and fatal warnings logged during execution ----

** Gtk **: gtk_widget_is_ancestor: assertion `ancestor != NULL' failed 
** Gtk **: gtk_widget_is_ancestor: assertion `ancestor != NULL' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** GLib-GObject **: g_object_set: assertion `G_IS_OBJECT (object)' failed 
** qof **: qof_instance_get_editlevel: assertion `QOF_IS_INSTANCE(ptr)' failed 


----------- .xsession-errors (625300 sec old) ---------------------
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://lwn.net/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://www.michaelgeist.ca/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://www.metroidmetal.com/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://en.community.dell.com/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://www.pbs.org/")  failed 
...Too much output, ignoring rest...
--------------------------------------------------
Comment 1 simon80 2010-08-15 04:52:06 UTC
Actually, here's what happened - long story short, I selected a destination account for the receiving end of a transaction, went to the register and deleted that account, then went back and saved the transaction, without remembering to change that account.
Comment 2 Akhil Laddha 2010-08-15 06:34:24 UTC
Thanks for taking the time to report this bug.
Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 3 simon80 2010-08-15 17:52:58 UTC
I think that instructions to reproduce the crash should be enough info to look into a bug like this. Whenever a bug like this is marked NEEDSINFO instead of getting investigated in earnest, I'm discouraged from submitting bugs in the future, because of what a time sink it is. However, I bothered to take a better trace anyway:


Distribution: Debian squeeze/sid
Gnome Release: 2.30.2 2010-07-17 (Debian)
BugBuddy Version: 2.30.0

System: Linux 2.6.32-5-amd64 #1 SMP Sat Jul 24 01:47:24 UTC 2010 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10707000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome
GTK+ Modules: gnomebreakpad, canberra-gtk-module

Memory status: size: 533086208 vsize: 533086208 resident: 64868352 share: 20905984 rss: 64868352 rss_rlim: 18446744073709551615
CPU usage: start_time: 1281847536 rtime: 1931 utime: 1807 stime: 124 cutime:22 cstime: 2 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/gnucash-bin'

[Thread debugging using libthread_db enabled]
[New Thread 0x7f1ede931710 (LWP 21976)]
0x00007f1eef844b4d in __libc_waitpid (pid=25876, 
    stat_loc=<value optimized out>, options=0)
    at ../sysdeps/unix/sysv/linux/waitpid.c:41
	in ../sysdeps/unix/sysv/linux/waitpid.c

Thread 1 (Thread 0x7f1ef839e7e0 (LWP 21974))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 IA__g_spawn_sync
    at /tmp/buildd/glib2.0-2.24.1/glib/gspawn.c line 386
  • #2 IA__g_spawn_command_line_sync
    at /tmp/buildd/glib2.0-2.24.1/glib/gspawn.c line 700
  • #3 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #4 <signal handler called>
  • #5 xaccAccountRecomputeBalance
    at Account.c line 1803
  • #6 trans_cleanup_commit
    at Transaction.c line 975
  • #7 qof_commit_edit_part2
    at qofinstance.c line 987
  • #8 xaccTransCommitEdit
    at Transaction.c line 1060
  • #9 gnc_split_register_save
    at split-register.c line 1351
  • #10 gnc_split_reg_record
    at gnc-split-reg.c line 1653
  • #11 gnc_split_reg_enter
    at gnc-split-reg.c line 1724
  • #12 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #13 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #14 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2981
  • #15 IA__g_signal_emit_by_name
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3075
  • #16 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #17 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3248
  • #18 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2981
  • #19 IA__g_signal_emit_by_name
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3075
  • #20 gnucash_sheet_key_press_event_internal
    at gnucash-sheet.c line 1746
  • #21 gnucash_sheet_key_press_event
    at gnucash-sheet.c line 1884
  • #22 _gtk_marshal_BOOLEAN__BOXED
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmarshalers.c line 84
  • #23 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #24 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #25 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2991
  • #26 IA__g_signal_emit
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3038
  • #27 gtk_widget_event_internal
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c line 4943
  • #28 IA__gtk_window_propagate_key_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwindow.c line 5184
  • #29 gtk_window_key_press_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwindow.c line 5214
  • #30 _gtk_marshal_BOOLEAN__BOXED
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmarshalers.c line 84
  • #31 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #32 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #33 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2991
  • #34 IA__g_signal_emit
    at /tmp/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3038
  • #35 gtk_widget_event_internal
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c line 4943
  • #36 IA__gtk_propagate_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 2416
  • #37 IA__gtk_main_do_event
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1647
  • #38 gdk_event_dispatch
    at /tmp/buildd/gtk+2.0-2.20.1/gdk/x11/gdkevents-x11.c line 2372
  • #39 g_main_dispatch
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 1960
  • #40 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 2513
  • #41 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 2591
  • #42 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.24.1/glib/gmain.c line 2799
  • #43 IA__gtk_main
    at /tmp/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1219
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 450
  • #45 inner_main
    at gnucash-bin.c line 490
  • #46 scm_boot_guile
    from /usr/lib/libguile.so.12
  • #47 main
    at gnucash-bin.c line 624
Current language:  auto
The current source language is "auto; currently asm".
Current language:  auto
The current source language is "auto; currently c".
A debugging session is active.

	Inferior 1 [process 21974] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]


---- Critical and fatal warnings logged during execution ----

** Gtk **: gtk_widget_is_ancestor: assertion `ancestor != NULL' failed 
** Gtk **: gtk_widget_is_ancestor: assertion `ancestor != NULL' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** qof **: qof_instance_get_guid: assertion `QOF_IS_INSTANCE(inst)' failed 
** GLib-GObject **: g_object_set: assertion `G_IS_OBJECT (object)' failed 
** qof **: qof_instance_get_editlevel: assertion `QOF_IS_INSTANCE(ptr)' failed 


----------- .xsession-errors (672941 sec old) ---------------------
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://lwn.net/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://www.michaelgeist.ca/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://www.metroidmetal.com/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://en.community.dell.com/")  failed 
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
kded(3200)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "kded/favicons.desktop" not found
akregator(3180) Akregator::FeedIconManager::Private::loadIcon: Couldn't reach favicon service. Request favicon for  KUrl("http://www.pbs.org/")  failed 
...Too much output, ignoring rest...
--------------------------------------------------
Comment 4 Christian Stimming 2010-08-16 06:56:11 UTC
Thanks for reporting this bug and sorry for the crash. Your instructions to reproduce in comment #1 are indeed sufficient. However, someone needs to check whether this still leads to a crash in the latest development version 2.3.15 - I think there have been some improvements when an account is being deleted, so that this doesn't lead to a crash. Testing with 2.3.15, anyone?
Comment 5 Geert Janssens 2010-08-21 16:45:47 UTC
I'm afraid I can't even reproduce this crash on GnuCash 2.2.9 on Mandriva 2010.0.

When I follow the steps in comment #1, GnuCash simply asks me if I want to create the non-existing account. It doesn't crash.

Perhaps someone else can ?
Comment 6 simon80 2010-08-21 22:20:07 UTC
Geert: before deleting the account, click or tab to the other line in the transaction. After deleting the account, the corresponding line in the pending transaction should be blank. At this point, if you hit enter, GnuCash will crash. Thanks for taking the time to look into this.
Comment 7 Geert Janssens 2010-08-23 17:21:19 UTC
Ok, I managed to reproduce. There are some details missing in the steps to reproduce, so I'll repeat them in slightly more detail here:

1. Open an account register for some account, let's say AccountA
2. Go to the empty transaction line
3. Enter a transaction (description/other account/amount), but don't leave the transaction just yet! (Let's call the other account AccountB)
4. Enable split transactions
5. Click in the line representing the AccountA
6. Now go to the Accounts tab, and delete the AccountB
7. Return to the register for AccountA

=> You may notice here that the line representing AccountB no longer shows AccountB as other account. The amount remains though.

8. Finish the transaction by clicking outside of it, or hitting tab

=> Segmentation fault.

The problem is still there in version 2.3.15 by the way.
Comment 8 Geert Janssens 2011-10-15 12:08:31 UTC
It took me a while, but I managed to hack around the crash.

The unstable branch starting from r21422 doesn't crash anymore for me, but it still produces a number of critical warnings in gnucash.trace.

I will see if I can get rid of those as well.
Comment 9 Geert Janssens 2011-10-16 21:12:31 UTC
I have managed to improve the patch (in r21423). When running the steps to reproduce, only one critical message appear still in gnucash.trace.

The message is harmless in this case, but I don't see an easy way to avoid it.

What happens is this:
- After step 6, the account is deleted internally
- As part of this, the split is also marked for deletion via a call to xaccDeleteSplit.
- Since this split is part of an open transaction, it's not actually freed from memory yet, that happens only in step 8
- But deleting the account and marking the split as freed, trigger a series of callbacks to all interested components to update their states.
- One of the listening components is the register for Account A
- Part of this register's response is to rerun the query for its splits. Since the split hasn't really been deleted yet, it will be iterated by the query. 
- Somewhere in this process, the critical warning is generated. I presume because there is a test on the split's account, which is no longer valid at this point.

However once the transaction is committed in step 8, the split is truly freed from memory and won't appear in any future queries, hence no other critical qof messages pop up again.

Since the scenario that originally led to this crash is already a fairly uncommon one, I don't feel like spending more time to avoid this harmless critical warning, and intend to close the bug once it's backported to 2.4.
Comment 10 Geert Janssens 2011-10-16 21:26:27 UTC
Created attachment 199148 [details]
Excerpt from gnucash.trace

For those interested in the last remaining qof critical warning, I have added a snippet from my gnucash.trace file run with debugging enabled.

This snippet gives some context to where the warning is generated. To keep it short, I have only taken the call to the relevant component update callback.
The whole is part of a call to gnc_resume_gui_refresh started from
src/gnome/gnc-plugin-page-account-tree.c:1240 or xaccAccountDestroy one line earlier.
Comment 11 Christian Stimming 2013-05-06 20:56:34 UTC
Comment#9 said the bug is already fixed in trunk r21423. If back-porting isn't trivial, we can skip this and at least know that 2.5.x will have fixed it?
Comment 12 Geert Janssens 2013-05-11 10:58:43 UTC
It turns out I had already backported this change to 2.4 (it's part of 2.4.9), but I forgot to update this bug's status.

Closing as fixed now.
Comment 13 John Ralls 2018-06-29 22:43:03 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=626970. Please update any external references or bookmarks.