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 734833 - Gnucash crashes regularly
Gnucash crashes regularly
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: General
2.6.3
Other Windows
: Normal normal
: ---
Assigned To: gnucash-general-maint
gnucash-general-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-15 06:03 UTC by Kaliet
Modified: 2018-06-29 23:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
trace file before the crash (1.16 KB, text/plain)
2014-08-15 06:03 UTC, Kaliet
Details

Description Kaliet 2014-08-15 06:03:26 UTC
Created attachment 283436 [details]
trace file before the crash

I am using gnucash 2.6.3 with many reports open all the time (around 40).
Recently (mainly after updating to 2.6.3) gnucash crashes after viewing 'x' amount of reports. Its normally around 8-10 reports.
It gives me a gnucash has stopped responding error. I have to do end program and reopen the gnucash.
Then I get window with "That database may be in use by another user" , and I click Open Anyway.

I am using Win8 pro  with 64 gb ram, intel i7 3.4 Ghz.

If you are asking why I have so many reports (~40) open all the time, my answer is that it is very efficient to keep them open and review them daily (instead of generating it every time).

attached is the trace file from temp directory.
Comment 1 André Klapper 2014-08-15 14:58:31 UTC
GnuCash has its own product; moving
Comment 2 John Ralls 2014-08-15 15:35:05 UTC
Unfortunately a trace file isn't going to help find what's probably a memory error. We need a stack trace to see what's failing and where. The instructions are at http://wiki.gnucash.org/wiki/Stack_Trace, but they're difficult to do on Windows and beyond the abilities of most users.

You can at least confirm my suspicion that the problem is resource leakage by opening task manager and observing the memory use of Gnucash in the "processes" tab; if I'm right it will increase as you open new reports and switch between them until some large value is reached, at which point GnuCash will crash.
Comment 3 Kaliet 2014-08-16 04:46:54 UTC
I monitored the Task Manager as you requested.
What I noticed were:

500 MB when opened for first time.
5 clicks on different reports brings memory usage to 730 MB
every new report clicked adds quickly to 1 GB
Gnucash crashes (not responding) at 1.074 GB


I clicked on your link to get Stack Trace but did not find the instructions there. I can try to get if needed. I really want to help fix this bug.
Comment 4 John Ralls 2014-09-01 03:05:59 UTC
Mmmph. I restored the Windows instructions at http://wiki.gnucash.org/wiki/Stack_Trace#Windows , but gdb isn't that useful for leak detection. I'll try replicating it when I can make some time.
Comment 5 John Ralls 2014-10-12 23:28:22 UTC
Had to run Gnucash in full-screen mode and make the graphs all 1800x850 to get it to crash, which it did on the 10th report at 1419M; this on a Win7 VM with 4G of available memory. This was after running it up to 10 open reports, closing them, and opening 10 more.

I was able to examine the call stack a bit in Visual Studio, and it was a segfault in libgdk after many libguile calls. It wouldn't crash for me when running under gdb, only to hang, and there's no way in MinGW's gdb to halt execution and look at the stack when that happens.

Unfortunately it looks like the problem has more to do with Guile than with Gnucash. I speculate that the problem is that a malloc failed and the resulting NULL was passed, without having been checked, in to Gdk, which crashed. Since crashing is the normal response to memory exhaustion that's not as unreasonable behavior as it seems.

It's possible that upgrading Guile to 2.0 will fix this, but last I heard there are problems building Guile 2.0 on Windows. I did notice that creating and deleting reports doesn't reduce the amount of memory used all the way back to where it was before the report was opened, so there are definite memory leaks in Gnucash. Where they are and whether its Windows-only I haven't yet determined. 

The best I can offer in the meantime is the suggestion that you make the graphs smaller; at the default sizes they use half as much memory, such that with 12 reports open GnuCash was using only 330M.
Comment 6 Alex 2014-11-03 15:00:53 UTC
I am using gnucash-2.6.4 under Linux and I experience regular crashes also. It crashes when I press OK on transfer dialog.

Here is a backtrace:

  • #0 g_type_instance_get_private
    from /usr/lib64/libgobject-2.0.so.0
  • #1 gnc_commodity_equal
    at gnc-commodity.c line 1582
  • #2 gnc_xfer_dialog_update_price
    at dialog-transfer.c line 207
  • #3 gnc_xfer_date_changed_cb
    at dialog-transfer.c line 990
  • #4 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #7 gnc_date_edit_set_time_internal
    at gnc-date-edit.c line 536
  • #8 gnc_date_edit_set_property
    at gnc-date-edit.c line 587
  • #9 g_object_set_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #10 g_object_set
    from /usr/lib64/libgobject-2.0.so.0
  • #11 gnc_date_edit_set_time
    at gnc-date-edit.c line 736
  • #12 gnc_date_edit_set_time_ts
    at gnc-date-edit.c line 755
  • #13 day_selected
    at gnc-date-edit.c line 174
  • #14 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #15 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #16 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #17 gnc_date_edit_set_time_internal
    at gnc-date-edit.c line 521
  • #18 gnc_date_edit_set_property
    at gnc-date-edit.c line 587
  • #19 g_object_set_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #20 g_object_set
    from /usr/lib64/libgobject-2.0.so.0
  • #21 gnc_date_edit_set_time
    at gnc-date-edit.c line 736
  • #22 date_focus_out_event
    at gnc-date-edit.c line 818
  • #23 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #24 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #25 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #26 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #27 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #28 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #29 gtk_widget_send_focus_change
    from /usr/lib64/libgtk-x11-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_cclosure_marshal_VOID__OBJECTv
    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 g_object_run_dispose
    from /usr/lib64/libgobject-2.0.so.0
  • #38 close_handler
    at dialog-transfer.c line 1976
  • #39 gnc_close_gui_component
    at gnc-component-manager.c line 777
  • #40 gnc_close_gui_component_by_data
    at gnc-component-manager.c line 797
  • #41 gnc_xfer_dialog_response_cb
    at dialog-transfer.c line 1658
  • #42 g_cclosure_marshal_VOID(int0_t, void)
    from /usr/lib64/libgobject-2.0.so.0
  • #43 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #44 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #45 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #46 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #47 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #48 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #49 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #50 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #51 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #52 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #53 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #54 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #55 ??
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #56 gtk_propagate_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #57 gtk_main_do_event
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #58 ??
    from /usr/lib64/libgdk-x11-2.0.so.0
  • #59 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #60 ??
    from /usr/lib64/libglib-2.0.so.0
  • #61 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #62 gtk_main
    from /usr/lib64/libgtk-x11-2.0.so.0
  • #63 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 608
  • #64 inner_main
    at gnucash-bin.c line 621
  • #65 ??
    from /usr/lib64/libguile.so.17
  • #66 ??
    from /usr/lib64/libguile.so.17
  • #67 scm_c_catch
    from /usr/lib64/libguile.so.17
  • #68 scm_i_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #69 scm_c_with_continuation_barrier
    from /usr/lib64/libguile.so.17
  • #70 scm_i_with_guile_and_parent
    from /usr/lib64/libguile.so.17
  • #71 scm_boot_guile
    from /usr/lib64/libguile.so.17
  • #72 main
    at gnucash-bin.c line 776

Comment 7 John Ralls 2014-11-03 16:12:15 UTC
(In reply to comment #6)
> I am using gnucash-2.6.4 under Linux and I experience regular crashes also. It
> crashes when I press OK on transfer dialog.
> 
> Here is a backtrace:
> 
> 

That's a different crash entirely. Please open a new bug report.

The stack trace suggests a corrupted commodity or currency, so please note on your new report what commodities or currencies are involved in the transfer when it crashes.
Comment 8 John Ralls 2018-06-29 23:32:55 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=734833. Please continue processing the bug there and please update any external references or bookmarks.