Arch Linux I don't know if this would be considered the same as issue 796781, but since my coredump is a bit different, even though it also relates to crashing from splits, I'll submit this. Mine was even more simple than what they said they went through. It is a stock that has 4 entries. That's it. 2 "buy" entries, 1 stock split, and finally a complete sale to close it all out. I go to view the lots, then "Scrub Account", and BAM! it crashes. It worked fine with other scrubs I've done. ***** Message: Process 3160262 (gnucash) of user 1000 dumped core. Stack trace of thread 3160262: #0 0x00007a848992bf25 raise (libc.so.6) #1 0x00007a8489915897 abort (libc.so.6) #2 0x00007a848a764062 n/a (libglib-2.0.so.0) #3 0x00007a848a790b1d g_assertion_message_expr (libglib-2.0.so.0) #4 0x00007a8489b91007 xaccSplitAssignToLot (libgncmod-engine.so) #5 0x00007a8489b913f1 xaccSplitAssign (libgncmod-engine.so) #6 0x00007a8489b826a2 xaccAccountAssignLots (libgncmod-engine.so) #7 0x00007a8489b8375c xaccAccountScrubLots (libgncmod-engine.so) #8 0x00007a848aa02bbe lv_response_cb (libgnc-gnome.so) #9 0x00007a8489e8bd5a g_closure_invoke (libgobject-2.0.so.0) #10 0x00007a8489e7988e n/a (libgobject-2.0.so.0) #11 0x00007a8489e7d98a g_signal_emit_valist (libgobject-2.0.so.0) #12 0x00007a8489e7e7f0 g_signal_emit (libgobject-2.0.so.0) #13 0x00007a8489e7db4a g_signal_emit_valist (libgobject-2.0.so.0) #14 0x00007a8489e7e7f0 g_signal_emit (libgobject-2.0.so.0) #15 0x00007a848a3ff33f n/a (libgtk-3.so.0) #16 0x00007a848a3ff415 n/a (libgtk-3.so.0) #17 0x00007a8489e8bd5a g_closure_invoke (libgobject-2.0.so.0) #18 0x00007a8489e799e4 n/a (libgobject-2.0.so.0) #19 0x00007a8489e7d98a g_signal_emit_valist (libgobject-2.0.so.0) #20 0x00007a8489e7e7f0 g_signal_emit (libgobject-2.0.so.0) #21 0x00007a848a3fd921 n/a (libgtk-3.so.0) #22 0x00007a848a43772d n/a (libgtk-3.so.0) #23 0x00007a8489e7db4a g_signal_emit_valist (libgobject-2.0.so.0) #24 0x00007a8489e7e7f0 g_signal_emit (libgobject-2.0.so.0) #25 0x00007a848a33ba7d n/a (libgtk-3.so.0) #26 0x00007a8489e95cb3 g_cclosure_marshal_VOID__BOXEDv (libgobject-2.0.so.0) #27 0x00007a8489e7db4a g_signal_emit_valist (libgobject-2.0.so.0) #28 0x00007a8489e7e7f0 g_signal_emit (libgobject-2.0.so.0) #29 0x00007a848a337e23 n/a (libgtk-3.so.0) #30 0x00007a848a33c2d3 n/a (libgtk-3.so.0) #31 0x00007a848a33a483 n/a (libgtk-3.so.0) #32 0x00007a848a36cd23 gtk_event_controller_handle_event (libgtk-3.so.0) #33 0x00007a848a1a563f n/a (libgtk-3.so.0) #34 0x00007a848a43cdfc n/a (libgtk-3.so.0) #35 0x00007a8489e7db4a g_signal_emit_valist (libgobject-2.0.so.0) #36 0x00007a8489e7e7f0 g_signal_emit (libgobject-2.0.so.0) #37 0x00007a848a1a5796 n/a (libgtk-3.so.0) #38 0x00007a848a2ecad5 n/a (libgtk-3.so.0) #39 0x00007a848a2f014c gtk_main_do_event (libgtk-3.so.0) #40 0x00007a84897d4954 n/a (libgdk-3.so.0) #41 0x00007a8489781904 n/a (libgdk-3.so.0) #42 0x00007a848a7b239e g_main_context_dispatch (libglib-2.0.so.0) #43 0x00007a848a7b41b1 n/a (libglib-2.0.so.0) #44 0x00007a848a7b50c3 g_main_loop_run (libglib-2.0.so.0) #45 0x00007a848a2e964f gtk_main (libgtk-3.so.0) #46 0x00007a8489db5bfa gnc_ui_start_event_loop (libgncmod-gnome-utils.so) #47 0x0000573bb41f7bbf n/a (gnucash) #48 0x00007a848a8cc1be n/a (libguile-2.2.so.1) #49 0x00007a848a8acb0a n/a (libguile-2.2.so.1) #50 0x00007a848a931d2c n/a (libguile-2.2.so.1) #51 0x00007a848a937701 scm_call_n (libguile-2.2.so.1) #52 0x00007a848a925ad4 n/a (libguile-2.2.so.1) #53 0x00007a848a8ad147 n/a (libguile-2.2.so.1) #54 0x00007a848a8ad226 scm_c_with_continuation_barrier (libguile-2.2.so.1) #55 0x00007a848a9244df n/a (libguile-2.2.so.1) #56 0x00007a84890ab377 GC_call_with_stack_base (libgc.so.1) #57 0x00007a848a9248d9 scm_with_guile (libguile-2.2.so.1) #58 0x00007a848a8cc3b4 scm_boot_guile (libguile-2.2.so.1) #59 0x0000573bb41f7436 main (gnucash) #60 0x00007a8489917153 __libc_start_main (libc.so.6) #61 0x0000573bb41f762e _start (gnucash) Stack trace of thread 3160272: #0 0x00007a8488e20c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0) #1 0x00007a84890b2a08 n/a (libgc.so.1) #2 0x00007a84890b2e8a n/a (libgc.so.1) #3 0x00007a84890b2f6f n/a (libgc.so.1) #4 0x00007a8488e1a4cf start_thread (libpthread.so.0) #5 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160280: #0 0x00007a84899e49ef __poll (libc.so.6) #1 0x00007a846c9cac14 n/a (libpulse.so.0) #2 0x00007a846c9d8059 pa_mainloop_poll (libpulse.so.0) #3 0x00007a846c9e2301 pa_mainloop_iterate (libpulse.so.0) #4 0x00007a846c9e23b1 pa_mainloop_run (libpulse.so.0) #5 0x00007a846c9d261e n/a (libpulse.so.0) #6 0x00007a846c956d1c n/a (libpulsecommon-13.0.so) #7 0x00007a8488e1a4cf start_thread (libpthread.so.0) #8 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160270: #0 0x00007a8488e20c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0) #1 0x00007a84890b2a08 n/a (libgc.so.1) #2 0x00007a84890b2e8a n/a (libgc.so.1) #3 0x00007a84890b2f6f n/a (libgc.so.1) #4 0x00007a8488e1a4cf start_thread (libpthread.so.0) #5 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160273: #0 0x00007a84899e042c __read (libc.so.6) #1 0x00007a848a8bca48 n/a (libguile-2.2.so.1) #2 0x00007a84890b1a39 n/a (libgc.so.1) #3 0x00007a84890ae1b5 n/a (libgc.so.1) #4 0x00007a84890ae28c GC_do_blocking (libgc.so.1) #5 0x00007a848a92494b scm_without_guile (libguile-2.2.so.1) #6 0x00007a848a8bceac n/a (libguile-2.2.so.1) #7 0x00007a848a8acb0a n/a (libguile-2.2.so.1) #8 0x00007a848a931d2c n/a (libguile-2.2.so.1) #9 0x00007a848a937701 scm_call_n (libguile-2.2.so.1) #10 0x00007a848a925ad4 n/a (libguile-2.2.so.1) #11 0x00007a848a8ad147 n/a (libguile-2.2.so.1) #12 0x00007a848a8ad226 scm_c_with_continuation_barrier (libguile-2.2.so.1) #13 0x00007a848a9244df n/a (libguile-2.2.so.1) #14 0x00007a84890ab377 GC_call_with_stack_base (libgc.so.1) #15 0x00007a848a9248d9 scm_with_guile (libguile-2.2.so.1) #16 0x00007a8488e1a4cf start_thread (libpthread.so.0) #17 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160265: #0 0x00007a84899e49ef __poll (libc.so.6) #1 0x00007a848a7b4120 n/a (libglib-2.0.so.0) #2 0x00007a848a7b41f1 g_main_context_iteration (libglib-2.0.so.0) #3 0x00007a847ea9ce5e n/a (libdconfsettings.so) #4 0x00007a848a790bb1 n/a (libglib-2.0.so.0) #5 0x00007a8488e1a4cf start_thread (libpthread.so.0) #6 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160271: #0 0x00007a8488e20c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0) #1 0x00007a84890b2a08 n/a (libgc.so.1) #2 0x00007a84890b2e8a n/a (libgc.so.1) #3 0x00007a84890b2f6f n/a (libgc.so.1) #4 0x00007a8488e1a4cf start_thread (libpthread.so.0) #5 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160266: #0 0x00007a84899e49ef __poll (libc.so.6) #1 0x00007a848a7b4120 n/a (libglib-2.0.so.0) #2 0x00007a848a7b50c3 g_main_loop_run (libglib-2.0.so.0) #3 0x00007a8489f0fbc8 n/a (libgio-2.0.so.0) #4 0x00007a848a790bb1 n/a (libglib-2.0.so.0) #5 0x00007a8488e1a4cf start_thread (libpthread.so.0) #6 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160568: #0 0x00007a84899e9e9d syscall (libc.so.6) #1 0x00007a848a76511b g_cond_wait_until (libglib-2.0.so.0) #2 0x00007a848a7e2ef3 n/a (libglib-2.0.so.0) #3 0x00007a848a7e30e4 g_async_queue_timeout_pop (libglib-2.0.so.0) #4 0x00007a848a78a02a n/a (libglib-2.0.so.0) #5 0x00007a848a790bb1 n/a (libglib-2.0.so.0) #6 0x00007a8488e1a4cf start_thread (libpthread.so.0) #7 0x00007a84899ef2d3 __clone (libc.so.6) Stack trace of thread 3160264: #0 0x00007a84899e49ef __poll (libc.so.6) #1 0x00007a848a7b4120 n/a (libglib-2.0.so.0) #2 0x00007a848a7b41f1 g_main_context_iteration (libglib-2.0.so.0) #3 0x00007a848a7b4242 n/a (libglib-2.0.so.0) #4 0x00007a848a790bb1 n/a (libglib-2.0.so.0) #5 0x00007a8488e1a4cf start_thread (libpthread.so.0) #6 0x00007a84899ef2d3 __clone (libc.so.6) *****
Yes, completely different from bug 796781. There's no direct call to g_assert in xaccSplitAssignToLot, so it must be in something that the compiler has inlined. Can you create a small book that replicates the crash and attach it?
Created attachment 373501 [details] Sample book that causes lot/scrub crash. Easy peasy. Attached is a small sample book that will cause the crash. The ONLY thing you have to do to make it happen is go to Actions->"View Lots"->"Scrub Account", then profit from the crash.
Not exactly the simple transaction you described. ;-) The problem is that you have two buys and you're selling all of the stock for .01. GnuCash tries to create two cap gains splits out of the sale, one for each buy, and the value of each is $0.005, which GnuCash rounds to 0. Some idiot (I) decided that it was a good idea to shut down the program if any of several problems including that one appeared, see https://github.com/Gnucash/gnucash/commit/701d8030b830a24089e0ae18d84bd2be8a032c32. I've removed the asserts so it will now just log an error and bail out. Note that this doesn't correctly handle the reverse split, it just doesn't crash any more. The capital gains computations are too naive to deal well with complex situations like splits so after running the lot scrub you'll have to adjust things by hand to get the right answer.