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 740471 - Applying payment to invoice Segmentation fault
Applying payment to invoice Segmentation fault
Status: RESOLVED INCOMPLETE
Product: GnuCash
Classification: Other
Component: Business
git-master
Other Linux
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
: 742714 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-21 03:31 UTC by Bob Brush
Modified: 2018-06-29 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check for invalid lots (1.38 KB, patch)
2014-11-29 15:31 UTC, Geert Janssens
none Details | Review
Bug 740471 - Applying payment to invoice Segmentation fault (1.84 KB, patch)
2014-12-06 12:57 UTC, Geert Janssens
none Details | Review
Bug 740471 - Applying payment to invoice Segmentation fault (1.36 KB, patch)
2014-12-06 12:57 UTC, Geert Janssens
none Details | Review
Bug 740471 - Applying payment to invoice Segmentation fault (1.46 KB, patch)
2014-12-06 12:57 UTC, Geert Janssens
none Details | Review

Description Bob Brush 2014-11-21 03:31:59 UTC
In the receive payment dialog when selecting a payment and matching invoice, the program will crash without explaining what is wrong.

* 22:17:33  WARN <gnc.backend.xml> Invalid timestamp in data file.  Look for a 'entry:date' entry with a date of 1969-12-31 or 1970-01-01.
* 22:23:52  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 22:24:22  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 22:25:04  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 22:25:32  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 22:26:15  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 22:26:32  CRIT <GLib-GObject> g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed
Comment 1 Bob Brush 2014-11-21 04:12:13 UTC
searching for the amount of the invoice in question brings up a register showing the invoice and the payment, the payment is split 3 ways cash/imbalance/accounts receivable, the value for imbalance is empty, so not really sure how it got there or what its purpose without a value is.  I deleted the imbalance from the split and tried again, but same crash, so it looks like this might be a way to find other entries that give trouble, but even with it gone, it will still crash.  In the end the best solution is to delete the original payment and then recreate it, this ends the promblem.
Comment 2 Bob Brush 2014-11-21 04:39:36 UTC
* 23:02:58  WARN <gnc.backend.xml> Invalid timestamp in data file.  Look for a 'entry:date' entry with a date of 1969-12-31 or 1970-01-01.
* 23:04:46  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 23:05:38  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 23:33:39  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 23:36:20  CRIT <qof> void qof_instance_get(const QofInstance*, const gchar*, ...): assertion 'QOF_IS_INSTANCE (inst)' failed
* 23:36:29  CRIT <Gtk> gtk_tree_model_filter_get_value: assertion 'GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed
* 23:36:29  WARN <GLib-GObject> /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/gobject/gtype.c:4210: type id '0' is invalid
* 23:36:29  WARN <GLib-GObject> can't peek value table for type '<invalid>' which is not currently referenced
Comment 3 Derek Atkins 2014-11-21 16:51:59 UTC
Any chance you could actually attach a GDB Backtrace to this so we can see where it's actually SegFaulting?

Thanks.
Comment 4 Bob Brush 2014-11-22 03:19:32 UTC
gdb gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnucash...done.
(gdb) run
Starting program: /usr/local/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
[New LWP 4014]
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff28d824f in gnc_lot_get_account (lot=0x55555717b110) at gnc-lot.c:391
391	    return priv->account;
(gdb) bt
  • #0 gnc_lot_get_account
    at gnc-lot.c line 391
  • #1 calculate_selected_total_helper
    at dialog-payment.c line 264
  • #2 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #3 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 284
  • #4 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 303
  • #5 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 559
  • #6 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
  • #13 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #14 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #16 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 362
  • #17 gnc_payment_window_refresh_handler
    at dialog-payment.c line 165
  • #18 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #19 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #20 gnc_payment_ok_cb
    at dialog-payment.c line 695
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #39 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #45 inner_main
    at gnucash-bin.c line 621
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 ??
    from /usr/lib64/libguile.so.17
  • #48 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #49 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #51 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #52 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #53 main
    at gnucash-bin.c line 776

Comment 5 Bob Brush 2014-11-22 23:31:29 UTC
gdb gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnucash...done.
(gdb) run
Starting program: /usr/local/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff28d824f in gnc_lot_get_account (lot=0x555556d9e080) at gnc-lot.c:391
391	    return priv->account;
(gdb) bt
  • #0 gnc_lot_get_account
    at gnc-lot.c line 391
  • #1 calculate_selected_total_helper
    at dialog-payment.c line 264
  • #2 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #3 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 284
  • #4 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 303
  • #5 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 559
  • #6 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
  • #13 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #14 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #16 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 362
  • #17 gnc_payment_window_refresh_handler
    at dialog-payment.c line 165
  • #18 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #19 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #20 gnc_payment_ok_cb
    at dialog-payment.c line 695
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #39 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #45 inner_main
    at gnucash-bin.c line 621
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 ??
    from /usr/lib64/libguile.so.17
  • #48 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #49 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #51 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #52 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #53 main
    at gnucash-bin.c line 776

Comment 6 Geert Janssens 2014-11-29 15:31:12 UTC
Created attachment 291782 [details] [review]
Check for invalid lots

Hi Bob,

I can't reproduce the bug locally. So it probably is triggered by something that specific to your data file.

I see where the crash happens. What I don't see is how it can happen...

I have attached a patch that introduces an additional sanity check in the crashing function. Can you apply this to your local build and test again ?

Does it still crash ? What information appears in the trace file (crash or no crash) ?
Comment 7 Bob Brush 2014-12-01 04:27:34 UTC
I can't get it to crash on this end either, I rolled back to the version a couple weeks ago, and it won't crash either..  

So I think it must be then environment is changing, the biggest changes on the system that I know about are the upgrade to gcc - it killed my email and reports in gnucash by taking down webkit.  This was a suprise to me, not sure why gcc would cause a problem running a program, compiling I can see.  They rolled out a webkit update the next week and it put things back in order.

This is a short overview:
https://forum.sabayon.org/viewtopic.php?f=59&t=32123&start=10

I do wish that instead of crashing when there is a problem with webkit it would have an error message, but that is probably really hard to do..

Hopefully it is all done for now..
Comment 8 Geert Janssens 2014-12-01 18:28:37 UTC
Let's hope so indeed. Thanks for reporting back.
Comment 9 Bob Brush 2014-12-03 05:12:14 UTC
Ok, crash is back with a vengence.. I will try and apply the patch and also test on another version.  What I can tell so far is if an account is paid in full and then you go back and unpost/post an old invoice it unhooks something in a/r or a/p, the account still has a technical balance of 0 but it will show a high balance on the customer/vendor overview column, and a report of the account will say something like 0 current and then varied amounts in the 30-60 60-90 ect..

Applying a payment of any amount 0 or other will make if crash if it is one of the lucky accounts,  I can't say it happens every time to every account, but all the accounts with the problem share this characteristic..
Comment 10 Geert Janssens 2014-12-03 08:37:44 UTC
Ok, reopening...

Bob, when exactly does the crash happen ? The backtraces seem to suggest this happens when the document selection changes, so when you select or deselect an invoice or payment. Is that correct ?

Another thought: do you have invoices or payments involving multiple currencies ?
Comment 11 Bob Brush 2014-12-05 04:44:43 UTC
OK, I have a simple test case, one vendor, selecting a matching pre-payment and invoice, pressing ok gets the crash, downloaded source today..

gdb gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnucash...done.
(gdb) run
Starting program: /usr/local/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff295b5d9 in gnc_lot_get_account (lot=0x12af640) at gnc-lot.c:391
391	    return priv->account;

(gdb) bt
  • #0 gnc_lot_get_account
    at gnc-lot.c line 391
  • #1 calculate_selected_total_helper
    at dialog-payment.c line 264
  • #2 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #3 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 284
  • #4 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 303
  • #5 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 559
  • #6 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #14 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #16 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 362
  • #17 gnc_payment_window_refresh_handler
    at dialog-payment.c line 165
  • #18 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #19 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #20 gnc_payment_ok_cb
    at dialog-payment.c line 695
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #39 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #45 inner_main
    at gnucash-bin.c line 621
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 ??
    from /usr/lib64/libguile.so.17
  • #48 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #49 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #51 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #52 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #53 main
    at gnucash-bin.c line 776


patch < bug740471.diff src/business/business-gnome/dialog-payment.c
make all
(change to root)
make install

Now it doesn't crash, so I will procede to use, looking for more oportunities..
Comment 12 Bob Brush 2014-12-05 04:48:47 UTC
OK, so found another problem account, crashes with patch..

gdb gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnucash...done.
(gdb) run
Starting program: /usr/local/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007fffdb879294 in calculate_selected_total_helper (model=0xe436c20, 
    path=0x27acf150, iter=0x7fffffffb440, data=0x7fffffffb4c0)
    at dialog-payment.c:266
266	    if (GNC_IS_LOT (lot))
(gdb) bt
  • #0 calculate_selected_total_helper
    at dialog-payment.c line 266
  • #1 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #2 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 291
  • #3 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 310
  • #4 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 566
  • #5 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #14 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 369
  • #16 gnc_payment_window_refresh_handler
    at dialog-payment.c line 167
  • #17 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #18 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #19 gnc_payment_ok_cb
    at dialog-payment.c line 702
  • #20 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #24 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #25 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #26 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #29 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #32 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #33 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #35 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #36 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #39 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #40 ??
    from /usr/lib64/libglib-2.0.so.0
  • #41 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #42 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #43 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #44 inner_main
    at gnucash-bin.c line 621
  • #45 ??
    from /usr/lib64/libguile.so.17
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #48 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #49 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #51 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #52 main
    at gnucash-bin.c line 776

Comment 13 Bob Brush 2014-12-05 04:59:01 UTC
Strangley enough after starting again I tried to find other accounts to respond the same way, but no luck, then I tried the first account again, but this time it didn't crash..  I hope I'm not making spagetti out of the file, it bothers me that it doesn't respond the same way..
Comment 14 Geert Janssens 2014-12-06 12:57:12 UTC
Created attachment 292235 [details] [review]
Bug 740471 -  Applying payment to invoice Segmentation fault

Attempt to fix it by no longer nullifying lots during processing
Comment 15 Geert Janssens 2014-12-06 12:57:28 UTC
Created attachment 292236 [details] [review]
Bug 740471 -  Applying payment to invoice Segmentation fault

Clear selection before emptying list store to prevent
the code from running calculations on a changing list.
Comment 16 Geert Janssens 2014-12-06 12:57:36 UTC
Created attachment 292237 [details] [review]
Bug 740471 -  Applying payment to invoice Segmentation fault

Stop listening for gui update events while on the way out
(after the ok button was pressed).
Comment 17 Geert Janssens 2014-12-06 13:15:27 UTC
Bob,

Studying the traces more closely I see the crash was happening at a different moment than I originally thought.

I still can't reproduce it though and your own experience suggests timing play a role in the occurrence of the bug.

What happens is this: after you click on the ok button, gnucash will do the necessary data processing to apply the payment to the invoice. This involves the manipulating lots associated with the invoice and the payment.

While this processing is going on the gui updates are deliberately frozen to prevent lots of unnecessary redraw operations. The processing does trigger a number of gui update triggers though, which are collected until after the processing is done.

Right after the processing the gui triggers are handled even before the payment window is destroyed. One of these triggers affects the payment window itself, so that window starts running its gui refresh code (even though it's about to be destroyed).

This gui refresh code tries to do stuff with the lots that were manipulated in the earlier processing. And here it gets fuzzy: in your situation these lots appear to be invalid in some cases and not in my tests.

Based on this I have created three patches, attached to this bug. Each of them tries to fix this same issue in a different spot of the code.

The first one tries to be more careful when manipulating the lots in the payment processing

The second one tries to prevent the crash as close as possible to the cause in the back trace.

The third one is meant to prevent the gui refresh code from triggering when the payment dialog is about to be destroyed anyway. Note that if this one does what I hope it would mask the effects of the second patch in this particular case.

Since I can't reproduce the bug, I'll need your help to test each of these.

If any one is sufficient, that would be great. But even then I would probably apply all three of them because they all are improvements to the code.
Comment 18 Geert Janssens 2014-12-18 13:30:54 UTC
Bob,

Have you still experienced any crashes when applying a payment to an invoice after these patches were applied ?
Comment 19 Bob Brush 2014-12-19 04:01:53 UTC
Trying to clean up lot links on A/R and it crashed.  I haven't got to apply the three patches yet, but will do that next.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff295b4f1 in gnc_lot_get_account (lot=0x59ae1d0) at gnc-lot.c:391
391	    return priv->account;
(gdb) backtrace
  • #0 gnc_lot_get_account
    at gnc-lot.c line 391
  • #1 calculate_selected_total_helper
    at dialog-payment.c line 264
  • #2 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #3 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 284
  • #4 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 303
  • #5 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 559
  • #6 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #14 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #16 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 362
  • #17 gnc_payment_window_refresh_handler
    at dialog-payment.c line 165
  • #18 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #19 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #20 gnc_payment_ok_cb
    at dialog-payment.c line 695
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #39 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #45 inner_main
    at gnucash-bin.c line 621
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 ??
    from /usr/lib64/libguile.so.17
  • #48 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #49 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #51 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #52 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #53 main
    at gnucash-bin.c line 776

Comment 20 Bob Brush 2014-12-24 22:25:25 UTC
brushb@laptop ~ $ gdb /home/brushb/Testing_0001-Fix-lot-scrubbing-for-business-lots-Nov-4-14/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/brushb/Testing_0001-Fix-lot-scrubbing-for-business-lots-Nov-4-14/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_0001-Fix-lot-scrubbing-for-business-lots-Nov-4-14/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
[New Thread 0x7fffda6c1700 (LWP 3211)]
[New Thread 0x7fffd9ec0700 (LWP 3212)]
[New Thread 0x7fffcbfff700 (LWP 3214)]
Found Finance::Quote version 1.35
[New Thread 0x7fffca545700 (LWP 3221)]
[Thread 0x7fffca545700 (LWP 3221) exited]
[New Thread 0x7fffca545700 (LWP 3229)]
[New Thread 0x7fffc9d44700 (LWP 3230)]
[Thread 0x7fffca545700 (LWP 3229) exited]
[Thread 0x7fffc9d44700 (LWP 3230) exited]
[New Thread 0x7fffc9d44700 (LWP 3234)]
[New Thread 0x7fffca545700 (LWP 3235)]
[New Thread 0x7fff79788700 (LWP 3236)]
[New Thread 0x7fff784c3700 (LWP 3237)]
[New Thread 0x7fff7761a700 (LWP 3240)]
[New Thread 0x7fff76e19700 (LWP 3241)]
[New Thread 0x7fff76618700 (LWP 3242)]
java version "1.7.0_71"
OpenJDK Runtime Environment (IcedTea 2.5.3) (Gentoo package icedtea-7.2.5.3)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
[New Thread 0x7fff7464e700 (LWP 3260)]
[New Thread 0x7fff73e4d700 (LWP 3261)]
[New Thread 0x7fff6b64c700 (LWP 3262)]
[New Thread 0x7fff7364c700 (LWP 3263)]
[New Thread 0x7fff72e4b700 (LWP 3264)]
[New Thread 0x7fff7264a700 (LWP 3265)]
[New Thread 0x7fff71e49700 (LWP 3266)]
[New Thread 0x7fff71248700 (LWP 3267)]
[New Thread 0x7fff70a47700 (LWP 3268)]
[Thread 0x7fff71248700 (LWP 3267) exited]
[Thread 0x7fff70a47700 (LWP 3268) exited]
[New Thread 0x7fff70a47700 (LWP 3271)]
[Thread 0x7fff70a47700 (LWP 3271) exited]
[New Thread 0x7fff70a47700 (LWP 3424)]
[Thread 0x7fff70a47700 (LWP 3424) exited]
[New Thread 0x7fff70a47700 (LWP 4188)]
[Thread 0x7fff70a47700 (LWP 4188) exited]
[New Thread 0x7fff70a47700 (LWP 4235)]
[Thread 0x7fff70a47700 (LWP 4235) exited]
[New Thread 0x7fff70a47700 (LWP 4304)]
[Thread 0x7fff70a47700 (LWP 4304) exited]
[New Thread 0x7fff70a47700 (LWP 4737)]
[Thread 0x7fff70a47700 (LWP 4737) exited]
[New Thread 0x7fff70a47700 (LWP 4738)]
[Thread 0x7fff70a47700 (LWP 4738) exited]
[New Thread 0x7fff70a47700 (LWP 4826)]
[Thread 0x7fff70a47700 (LWP 4826) exited]
[New Thread 0x7fff70a47700 (LWP 5399)]
[Thread 0x7fff70a47700 (LWP 5399) exited]
[New Thread 0x7fff70a47700 (LWP 5410)]
[Thread 0x7fff70a47700 (LWP 5410) exited]
[New Thread 0x7fff70a47700 (LWP 5412)]
[Thread 0x7fff70a47700 (LWP 5412) exited]
[New Thread 0x7fff70a47700 (LWP 5438)]
[Thread 0x7fff70a47700 (LWP 5438) exited]
[New Thread 0x7fff70a47700 (LWP 5766)]
[Thread 0x7fff70a47700 (LWP 5766) exited]
[New Thread 0x7fff70a47700 (LWP 5820)]
[Thread 0x7fff70a47700 (LWP 5820) exited]
[New Thread 0x7fff70a47700 (LWP 5890)]
[Thread 0x7fff70a47700 (LWP 5890) exited]
[New Thread 0x7fff70a47700 (LWP 5902)]
[Thread 0x7fff70a47700 (LWP 5902) exited]
[New Thread 0x7fff70a47700 (LWP 5957)]
[Thread 0x7fff70a47700 (LWP 5957) exited]
[New Thread 0x7fff70a47700 (LWP 5977)]
[Thread 0x7fff70a47700 (LWP 5977) exited]
[New Thread 0x7fff70a47700 (LWP 6069)]
[Thread 0x7fff70a47700 (LWP 6069) exited]
[New Thread 0x7fff70a47700 (LWP 6465)]
[Thread 0x7fff70a47700 (LWP 6465) exited]
[New Thread 0x7fff70a47700 (LWP 6975)]
[Thread 0x7fff70a47700 (LWP 6975) exited]
[New Thread 0x7fff70a47700 (LWP 6987)]
[Thread 0x7fff70a47700 (LWP 6987) exited]
[New Thread 0x7fff70a47700 (LWP 6990)]
[Thread 0x7fff70a47700 (LWP 6990) exited]
[New Thread 0x7fff70a47700 (LWP 6993)]
[Thread 0x7fff70a47700 (LWP 6993) exited]
[New Thread 0x7fff70a47700 (LWP 7011)]
[Thread 0x7fff70a47700 (LWP 7011) exited]
[New Thread 0x7fff70a47700 (LWP 7017)]
[Thread 0x7fff70a47700 (LWP 7017) exited]
[New Thread 0x7fff70a47700 (LWP 7018)]
[Thread 0x7fff70a47700 (LWP 7018) exited]
[New Thread 0x7fff70a47700 (LWP 7021)]
[Thread 0x7fff70a47700 (LWP 7021) exited]
[New Thread 0x7fff70a47700 (LWP 7022)]
[Thread 0x7fff70a47700 (LWP 7022) exited]
[New Thread 0x7fff70a47700 (LWP 7034)]
[Thread 0x7fff70a47700 (LWP 7034) exited]
[New Thread 0x7fff70a47700 (LWP 7041)]
[Thread 0x7fff70a47700 (LWP 7041) exited]
[New Thread 0x7fff70a47700 (LWP 7045)]
[Thread 0x7fff70a47700 (LWP 7045) exited]
[New Thread 0x7fff70a47700 (LWP 7049)]
[Thread 0x7fff70a47700 (LWP 7049) exited]
[New Thread 0x7fff70a47700 (LWP 7058)]
[Thread 0x7fff70a47700 (LWP 7058) exited]
[New Thread 0x7fff70a47700 (LWP 7071)]
[Thread 0x7fff70a47700 (LWP 7071) exited]
[New Thread 0x7fff70a47700 (LWP 7072)]
[New Thread 0x7fff71248700 (LWP 7073)]
[Thread 0x7fff70a47700 (LWP 7072) exited]
[Thread 0x7fff71248700 (LWP 7073) exited]
[New Thread 0x7fff71248700 (LWP 7075)]
[Thread 0x7fff71248700 (LWP 7075) exited]
[New Thread 0x7fff71248700 (LWP 7080)]
[Thread 0x7fff71248700 (LWP 7080) exited]
[New Thread 0x7fff71248700 (LWP 7081)]
[Thread 0x7fff71248700 (LWP 7081) exited]
[New Thread 0x7fff71248700 (LWP 7082)]
[Thread 0x7fff71248700 (LWP 7082) exited]
[New Thread 0x7fff71248700 (LWP 7083)]
[Thread 0x7fff71248700 (LWP 7083) exited]
[New Thread 0x7fff71248700 (LWP 7099)]
[Thread 0x7fff71248700 (LWP 7099) exited]
[New Thread 0x7fff71248700 (LWP 7100)]
[Thread 0x7fff71248700 (LWP 7100) exited]
[New Thread 0x7fff71248700 (LWP 7101)]
[Thread 0x7fff71248700 (LWP 7101) exited]
[New Thread 0x7fff71248700 (LWP 7109)]
[Thread 0x7fff71248700 (LWP 7109) exited]
[New Thread 0x7fff71248700 (LWP 7111)]
[Thread 0x7fff71248700 (LWP 7111) exited]
[New Thread 0x7fff71248700 (LWP 7124)]
[Thread 0x7fff71248700 (LWP 7124) exited]
[New Thread 0x7fff71248700 (LWP 7125)]
[Thread 0x7fff71248700 (LWP 7125) exited]
[New Thread 0x7fff71248700 (LWP 7132)]
[Thread 0x7fff71248700 (LWP 7132) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff295b4f1 in gnc_lot_get_account (lot=0x12e0430) at gnc-lot.c:391
391	    return priv->account;
(gdb) backtrace
  • #0 gnc_lot_get_account
    at gnc-lot.c line 391
  • #1 calculate_selected_total_helper
    at dialog-payment.c line 264
  • #2 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #3 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 284
  • #4 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 303
  • #5 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 559
  • #6 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #14 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #16 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 362
  • #17 gnc_payment_window_refresh_handler
    at dialog-payment.c line 165
  • #18 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #19 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #20 gnc_payment_ok_cb
    at dialog-payment.c line 695
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #39 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #45 inner_main
    at gnucash-bin.c line 621
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 ??
    from /usr/lib64/libguile.so.17
  • #48 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #49 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #51 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #52 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #53 main
    at gnucash-bin.c line 776

Comment 21 Bob Brush 2014-12-28 16:37:25 UTC
(In reply to comment #10)
> Ok, reopening...
> 
> Bob, when exactly does the crash happen ? The backtraces seem to suggest this
> happens when the document selection changes, so when you select or deselect an
> invoice or payment. Is that correct ?
>
No it is when I hit the OK button
Comment 22 Bob Brush 2014-12-28 19:33:47 UTC
For test one I am taking a vendor and applying all payments to all bills, then deleting the small imbalance to a 0 (this isn't a new payment but just applying old payments) and selecting ok. I got a crash out of patch A but not patch B and C

gdb Testing_PatchA/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_PatchA/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_PatchA/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2964df1 in gnc_lot_count_splits (lot=0x5cb9f60) at gnc-lot.c:430
430	    return g_list_length (priv->splits);
(gdb) backtrace
  • #0 gnc_lot_count_splits
    at gnc-lot.c line 430
  • #1 gncOwnerAutoApplyPaymentsWithLots
    at gncOwner.c line 1260
  • #2 gncOwnerApplyPayment
    at gncOwner.c line 1376
  • #3 gnc_payment_ok_cb
    at dialog-payment.c line 691
  • #4 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #5 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #14 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #21 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #22 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #23 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #24 ??
    from /usr/lib64/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #26 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #27 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #28 inner_main
    at gnucash-bin.c line 621
  • #29 ??
    from /usr/lib64/libguile.so.17
  • #30 ??
    from /usr/lib64/libguile.so.17
  • #31 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #32 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #33 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #34 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #35 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #36 main
    at gnucash-bin.c line 776

Comment 23 Bob Brush 2014-12-29 00:54:14 UTC
I am repeating the first test a total of 3 times, the results of the second batch are the same, patch b and c both work, but a continues to crash:

gdb Testing_PatchA/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_PatchA/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_PatchA/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2964df1 in gnc_lot_count_splits (lot=0x18bbd00) at gnc-lot.c:430
430	    return g_list_length (priv->splits);
(gdb) backtrace
  • #0 gnc_lot_count_splits
    at gnc-lot.c line 430
  • #1 gncOwnerAutoApplyPaymentsWithLots
    at gncOwner.c line 1260
  • #2 gncOwnerApplyPayment
    at gncOwner.c line 1376
  • #3 gnc_payment_ok_cb
    at dialog-payment.c line 691
  • #4 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #5 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #14 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #21 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #22 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #23 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #24 ??
    from /usr/lib64/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #26 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #27 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #28 inner_main
    at gnucash-bin.c line 621
  • #29 ??
    from /usr/lib64/libguile.so.17
  • #30 ??
    from /usr/lib64/libguile.so.17
  • #31 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #32 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #33 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #34 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #35 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #36 main
    at gnucash-bin.c line 776

Comment 24 Bob Brush 2014-12-29 01:16:57 UTC
The third try is the same, B and C do not crash, but A does:

brushb@bobs-laptop-green ~ $ gdb Testing_PatchA/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_PatchA/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_PatchA/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2964df1 in gnc_lot_count_splits (lot=0x1ce3d00) at gnc-lot.c:430
430	    return g_list_length (priv->splits);
(gdb) backtrace
  • #0 gnc_lot_count_splits
    at gnc-lot.c line 430
  • #1 gncOwnerAutoApplyPaymentsWithLots
    at gncOwner.c line 1260
  • #2 gncOwnerApplyPayment
    at gncOwner.c line 1376
  • #3 gnc_payment_ok_cb
    at dialog-payment.c line 691
  • #4 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #5 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #14 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #21 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #22 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #23 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #24 ??
    from /usr/lib64/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #26 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #27 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #28 inner_main
    at gnucash-bin.c line 621
  • #29 ??
    from /usr/lib64/libguile.so.17
  • #30 ??
    from /usr/lib64/libguile.so.17
  • #31 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #32 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #33 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #34 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #35 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #36 main
    at gnucash-bin.c line 776
  • #0 g_hash_table_lookup
    from /usr/lib64/libglib-2.0.so.0
  • #1 g_key_file_has_group
    from /usr/lib64/libglib-2.0.so.0
  • #2 gnc_main_window_restore_window
    at gnc-main-window.c line 670
  • #3 gnc_main_window_restore_all_windows
    at gnc-main-window.c line 932
  • #4 gnc_restore_all_state
    at top-level.c line 282
  • #5 call_c_hook
    at gnc-hooks.c line 217
  • #6 g_hook_list_marshal
    from /usr/lib64/libglib-2.0.so.0
  • #7 gnc_hook_run
    at gnc-hooks.c line 233
  • #8 gnc_book_opened
    at gnc-file.c line 509
  • #9 gnc_post_file_open
    at gnc-file.c line 990
  • #10 gnc_file_open_file
    at gnc-file.c line 1057
  • #11 gnc_ui_file_access_response_cb
    at dialog-file-access.c line 147
  • #12 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #15 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #24 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #33 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #34 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #35 ??
    from /usr/lib64/libglib-2.0.so.0
  • #36 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #37 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #39 inner_main
    at gnucash-bin.c line 621
  • #40 ??
    from /usr/lib64/libguile.so.17
  • #41 ??
    from /usr/lib64/libguile.so.17
  • #42 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #43 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #44 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #45 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #46 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #47 main
    at gnucash-bin.c line 776

Comment 25 John Ralls 2014-12-29 01:26:22 UTC
I think Geert meant for you to apply all three patches. Each one fixes a different problem.
Comment 26 Bob Brush 2014-12-29 01:36:25 UTC
At the close of the third test I was changing to a different backup, one that had been giving trouble with a particular bill and this segfault popped up for patch C, I don't think it was the patch, it may have to do with the order of events, opening the new file in one, then the next and so on..  but just in case it is interesting:

gdb Testing_PatchC/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_PatchC/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_PatchC/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007fffee879b74 in g_hash_table_lookup () from /usr/lib64/libglib-2.0.so.0
(gdb) backtrace
  • #0 g_hash_table_lookup
    from /usr/lib64/libglib-2.0.so.0
  • #1 g_key_file_has_group
    from /usr/lib64/libglib-2.0.so.0
  • #2 gnc_main_window_restore_window
    at gnc-main-window.c line 670
  • #3 gnc_main_window_restore_all_windows
    at gnc-main-window.c line 932
  • #4 gnc_restore_all_state
    at top-level.c line 282
  • #5 call_c_hook
    at gnc-hooks.c line 217
  • #6 g_hook_list_marshal
    from /usr/lib64/libglib-2.0.so.0
  • #7 gnc_hook_run
    at gnc-hooks.c line 233
  • #8 gnc_book_opened
    at gnc-file.c line 509
  • #9 gnc_post_file_open
    at gnc-file.c line 990
  • #10 gnc_file_open_file
    at gnc-file.c line 1057
  • #11 gnc_ui_file_access_response_cb
    at dialog-file-access.c line 147
  • #12 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #15 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #24 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #33 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #34 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #35 ??
    from /usr/lib64/libglib-2.0.so.0
  • #36 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #37 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #39 inner_main
    at gnucash-bin.c line 621
  • #40 ??
    from /usr/lib64/libguile.so.17
  • #41 ??
    from /usr/lib64/libguile.so.17
  • #42 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #43 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #44 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #45 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #46 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #47 main
    at gnucash-bin.c line 776

Comment 27 Bob Brush 2014-12-29 01:59:11 UTC
(In reply to comment #25)
> I think Geert meant for you to apply all three patches. Each one fixes a
> different problem.

It could be, I got all messed up because I couldn't get the source code to compile, after a hundred or so rabbit trails finally got back to where I started, only to find that the patches I was trying to apply had already been applied to the source code.. so I am a bit late to the party..  I reversed the patches and then made three copies and applied them one at a time.  I hope it has some value, but even if not I'm happy to not be crashing :)  This was the original quote I was working off of, but I realize it took a while.

> Based on this I have created three patches, attached to this bug. Each of them
> tries to fix this same issue in a different spot of the code.
> 
> The first one tries to be more careful when manipulating the lots in the
> payment processing
> 
> The second one tries to prevent the crash as close as possible to the cause in
> the back trace.
> 
> The third one is meant to prevent the gui refresh code from triggering when the
> payment dialog is about to be destroyed anyway. Note that if this one does what
> I hope it would mask the effects of the second patch in this particular case.
> 
> Since I can't reproduce the bug, I'll need your help to test each of these.
> 
> If any one is sufficient, that would be great. But even then I would probably
> apply all three of them because they all are improvements to the code.
Comment 28 Bob Brush 2014-12-29 02:44:55 UTC
Next test on a different vendor applying payments, patch A crash

gdb Testing_PatchA/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_PatchA/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_PatchA/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2964df1 in gnc_lot_count_splits (lot=0x1b044f0) at gnc-lot.c:430
430	    return g_list_length (priv->splits);
(gdb) backtrace
  • #0 gnc_lot_count_splits
    at gnc-lot.c line 430
  • #1 gncOwnerAutoApplyPaymentsWithLots
    at gncOwner.c line 1230
  • #2 gncOwnerApplyPayment
    at gncOwner.c line 1376
  • #3 gnc_payment_ok_cb
    at dialog-payment.c line 691
  • #4 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #5 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #14 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #21 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #22 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #23 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #24 ??
    from /usr/lib64/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #26 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #27 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #28 inner_main
    at gnucash-bin.c line 621
  • #29 ??
    from /usr/lib64/libguile.so.17
  • #30 ??
    from /usr/lib64/libguile.so.17
  • #31 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #32 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #33 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #34 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #35 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #36 main
    at gnucash-bin.c line 776

Comment 29 Bob Brush 2014-12-29 02:55:03 UTC
Next test on a different vendor applying payments, patch B and C won't crash
Comment 30 Bob Brush 2014-12-29 04:28:16 UTC
this time testing with customer, applying all payments to all invoices, Patch A crashed, Patch B no problem, Patch C seems to simultaneously died from a Caps lock crash, but I think was ok with applying the payment, I will attach its crash to the caps lock bug..  Here is the crash from this customer, this is all the testing for now, if more is useful let me know and I'll schedule it..

gdb Testing_PatchA/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_PatchA/bin/gnucash...done.
(gdb) tun
Undefined command: "tun".  Try "help".
(gdb) run
Starting program: /home/brushb/Testing_PatchA/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35
java version "1.7.0_71"
OpenJDK Runtime Environment (IcedTea 2.5.3) (Gentoo package icedtea-7.2.5.3)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2964cfd in gnc_lot_get_account (lot=0x5b6a440) at gnc-lot.c:391
391	    return priv->account;
(gdb) backtrace
  • #0 gnc_lot_get_account
    at gnc-lot.c line 391
  • #1 calculate_selected_total_helper
    at dialog-payment.c line 264
  • #2 gtk_tree_selection_selected_foreach
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #3 gnc_payment_dialog_calculate_selected_total
    at dialog-payment.c line 284
  • #4 gnc_payment_dialog_document_selection_changed
    at dialog-payment.c line 303
  • #5 gnc_payment_dialog_document_selection_changed_cb
    at dialog-payment.c line 559
  • #6 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib64/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #14 gtk_list_store_remove
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 gtk_list_store_clear
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #16 gnc_payment_window_fill_docs_list
    at dialog-payment.c line 362
  • #17 gnc_payment_window_refresh_handler
    at dialog-payment.c line 165
  • #18 gnc_gui_refresh_internal
    at gnc-component-manager.c line 726
  • #19 gnc_resume_gui_refresh
    at gnc-component-manager.c line 596
  • #20 gnc_payment_ok_cb
    at dialog-payment.c line 695
  • #21 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #26 g_closure_invoke
  • #27 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #32 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #33 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #34 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #35 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #37 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #38 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #39 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #40 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #41 ??
    from /usr/lib64/libglib-2.0.so.0
  • #42 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #43 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #44 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #45 inner_main
    at gnucash-bin.c line 621
  • #46 ??
    from /usr/lib64/libguile.so.17
  • #47 ??
    from /usr/lib64/libguile.so.17
  • #48 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #49 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #50 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #51 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #52 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #53 main
    at gnucash-bin.c line 776

Comment 31 Geert Janssens 2014-12-29 15:33:27 UTC
Thanks for all the testing.

So it looks like my first patch makes no difference at all. It was a bit hacky anyway and based on a wrong assumption that nullifying pointers to empty lots in a the list of lots being process while applying the payment would somehow affect a separate list of lots in a totally different part of the program.

I have reverted that patch as it has no effect and makes the code more complicated.

I will keep the other two since they do fix this crash. Thanks for confirming that.
Comment 32 Bob Brush 2015-01-04 06:00:58 UTC
gdb Testing_December_28_2014/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_December_28_2014/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_December_28_2014/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35
java version "1.7.0_71"
OpenJDK Runtime Environment (IcedTea 2.5.3) (Gentoo package icedtea-7.2.5.3)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2964dd1 in gnc_lot_count_splits (lot=0x1b8fe20) at gnc-lot.c:430
430	    return g_list_length (priv->splits);
(gdb) bt
  • #0 gnc_lot_count_splits
    at gnc-lot.c line 430
  • #1 gncOwnerAutoApplyPaymentsWithLots
    at gncOwner.c line 1230
  • #2 gncOwnerApplyPayment
    at gncOwner.c line 1376
  • #3 gnc_payment_ok_cb
    at dialog-payment.c line 705
  • #4 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #5 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #8 gtk_real_button_released
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 gtk_button_button_release
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #14 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #19 gtk_widget_event_internal
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #20 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #21 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #22 gdk_event_dispatch
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #23 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #24 ??
    from /usr/lib64/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #26 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #27 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #28 inner_main
    at gnucash-bin.c line 621
  • #29 ??
    from /usr/lib64/libguile.so.17
  • #30 ??
    from /usr/lib64/libguile.so.17
  • #31 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #32 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #33 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #34 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #35 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #36 main
    at gnucash-bin.c line 776

Comment 33 Bob Brush 2015-01-05 03:29:42 UTC
Some output from a session, might give insight into what is getting crossed up..

gdb Testing_Jan_4_2015/bin/gnucash
GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Testing_Jan_4_2015/bin/gnucash...done.
(gdb) run
Starting program: /home/brushb/Testing_Jan_4_2015/bin/gnucash 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/home/brushb/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/brushb/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel@gnucash.org
You can also lookup and file bug reports at http://bugzilla.gnome.org
To find the last stable version, please refer to http://www.gnucash.org
Found Finance::Quote version 1.35
java version "1.7.0_71"
OpenJDK Runtime Environment (IcedTea 2.5.3) (Gentoo package icedtea-7.2.5.3)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 784: 25  (begin (set! report-title #) (if # # #))
    ...
 793: 26  (begin # # # ...)
 806: 27* (set! table (make-txn-table (gnc:report-options report-obj) query ...))
 806: 28* [make-txn-table #<procedure dispatch #> # # ...]
 416: 29  (let (# # # ...) (gnc:html-table-set-col-headers! table #) ...)
 520: 30* (let* (#) (gnc:html-table-append-row/markup! table "grand-total" #))
 521: 31  [gnc:html-table-append-row/markup! # "grand-total" ...
 524: 32* [list ...
 524: 33* [gnc:make-html-table-cell/size 1 10 ...
 526: 34* [make-aging-table #<procedure dispatch #> # # ...]
 219: 35  (let (# # # # ...) (letrec # # # ...))
In unknown file:
   ?: 36  (letrec (# # # ...) (for-each # lots) ...)
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 246: 37* [for-each #<procedure #f (lot)> (# # # # ...)]
In unknown file:
   ?: 38* [#<procedure #f (lot)> #<swig-pointer GNCLot * 223c140>]
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 248: 39* (let* ((bal #) (invoice #) (date #)) (if (not #) (begin # #)))
 255: 40  (if (not (gnc-numeric-zero-p bal)) (begin (if reverse? #) (if # # #)))
In unknown file:
    ...
   ?: 41  [apply-invoice (1411790400 . 0) #<<gnc-numeric> num: 5343 denom: 100>]
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 237: 42  (let* (# #) (vector-set! buckets bucket-index new-value))
 238: 43* [gnc-numeric-add-fixed #<<gnc-numeric> num: 5343 denom: 100> ...
 240: 44* [vector-ref #(# # # # ...) #<unspecified>]
/home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:240:14: In procedure vector-ref in expression (vector-ref buckets bucket-index):
/home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:240:14: Wrong type (expecting exact integer): #<unspecified>
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 784: 22  (begin (set! report-title #) (if # # #))
    ...
 793: 23  (begin # # # ...)
 806: 24* (set! table (make-txn-table (gnc:report-options report-obj) query ...))
 806: 25* [make-txn-table #<procedure dispatch #> # # ...]
 416: 26  (let (# # # ...) (gnc:html-table-set-col-headers! table #) ...)
 520: 27* (let* (#) (gnc:html-table-append-row/markup! table "grand-total" #))
 521: 28  [gnc:html-table-append-row/markup! # "grand-total" ...
 524: 29* [list ...
 524: 30* [gnc:make-html-table-cell/size 1 10 ...
 526: 31* [make-aging-table #<procedure dispatch #> # # ...]
 219: 32  (let (# # # # ...) (letrec # # # ...))
In unknown file:
   ?: 33  (letrec (# # # ...) (for-each # lots) ...)
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 246: 34* [for-each #<procedure #f (lot)> (# # # # ...)]
In unknown file:
   ?: 35* [#<procedure #f (lot)> #<swig-pointer GNCLot * 223c140>]
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 248: 36* (let* ((bal #) (invoice #) (date #)) (if (not #) (begin # #)))
 255: 37  (if (not (gnc-numeric-zero-p bal)) (begin (if reverse? #) (if # # #)))
In unknown file:
    ...
   ?: 38  [apply-invoice (1411790400 . 0) #<<gnc-numeric> num: 5343 denom: 100>]
In /home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:
 237: 39  (let* (# #) (vector-set! buckets bucket-index new-value))
 238: 40* [gnc-numeric-add-fixed #<<gnc-numeric> num: 5343 denom: 100> ...
 240: 41* [vector-ref #(# # # # ...) #<unspecified>]
/home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:240:14: In procedure vector-ref in expression (vector-ref buckets bucket-index):
/home/brushb/Testing_Jan_4_2015/share/gnucash/scm/gnucash/report/owner-report.scm:240:14: Wrong type (expecting exact integer): #<unspecified>
Comment 34 Geert Janssens 2015-01-18 15:15:54 UTC
(In reply to comment #32)
> gdb Testing_December_28_2014/bin/gnucash
> GNU gdb (Gentoo 7.8.1 vanilla) 7.8.1
> Copyright (C) 2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-pc-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://bugs.gentoo.org/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from Testing_December_28_2014/bin/gnucash...done.
> (gdb) run
> Starting program: /home/brushb/Testing_December_28_2014/bin/gnucash 
> warning: Could not load shared library symbols for linux-vdso.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by
> your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
> To enable execution of this file add
>     add-auto-load-safe-path /lib64/libthread_db-1.0.so
> line to your configuration file "/home/brushb/.gdbinit".
> To completely disable this security protection add
>     set auto-load safe-path /
> line to your configuration file "/home/brushb/.gdbinit".
> For more information about this security protection see the
> "Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
>     info "(gdb)Auto-loading safe path"
> warning: Unable to find libthread_db matching inferior's thread library, thread
> debugging will not be available.
> 
> 
> This is a development version. It may or may not work.
> Report bugs and other problems to gnucash-devel@gnucash.org
> You can also lookup and file bug reports at http://bugzilla.gnome.org
> To find the last stable version, please refer to http://www.gnucash.org
> Found Finance::Quote version 1.35
> java version "1.7.0_71"
> OpenJDK Runtime Environment (IcedTea 2.5.3) (Gentoo package icedtea-7.2.5.3)
> OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff2964dd1 in gnc_lot_count_splits (lot=0x1b8fe20) at gnc-lot.c:430
> 430        return g_list_length (priv->splits);
> (gdb) bt
> 

Looking close this is the same crash as you have reported when applying patch A. And looking at the source tree it turns out this patch was not reverted yet on the master branch, only on maint.

So patch A not only doesn't fix this bug, it actually introduces another crasher.

I have just finished merging maint into master. As a result patch A is now removed from master as well. Can you retest if that ends the crashes ?
Comment 35 Geert Janssens 2015-01-28 17:34:28 UTC
*** Bug 742714 has been marked as a duplicate of this bug. ***
Comment 36 Geert Janssens 2016-03-23 21:09:15 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 37 John Ralls 2018-06-29 23:36:16 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=740471. Please update any external references or bookmarks.