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 563273 - crash in GnuCash Finance Management: Starting GnuCash.
crash in GnuCash Finance Management: Starting GnuCash.
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: General
2.2.x
Other All
: High critical
: ---
Assigned To: Andreas Köhler
Andreas Köhler
: 563239 (view as bug list)
Depends on:
Blocks: backport
 
 
Reported: 2008-12-04 21:06 UTC by Jonathan Kamens
Modified: 2018-06-29 22:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Patch which fixes this crash (1.81 KB, patch)
2008-12-04 21:12 UTC, Jonathan Kamens
committed Details | Review

Description Jonathan Kamens 2008-12-04 21:06:52 UTC
What were you doing when the application crashed?
Starting GnuCash.



Distribution: Fedora release 9 (Sulphur)
Gnome Release: 2.25.1 2008-11-13 (Red Hat, Inc)
BugBuddy Version: 2.25.2

System: Linux 2.6.28-0.106.rc6.git4.fc11.i686 #1 SMP Mon Dec 1 23:12:50 EST 2008 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10503000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: Clearlooks
GTK+ Modules: canberra-gtk-module, gnomebreakpad

Memory status: size: 117907456 vsize: 117907456 resident: 45543424 share: 17850368 rss: 45543424 rss_rlim: 18446744073709551615
CPU usage: start_time: 1228424781 rtime: 1490 utime: 1390 stime: 100 cutime:40 cstime: 10 timeout: 0 it_real_value: 0 frequency: 100

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

[?1034h[Thread debugging using libthread_db enabled]
[New Thread 0xb78fe760 (LWP 26362)]
[New Thread 0xb34ccb90 (LWP 26369)]
0xb8086424 in __kernel_vsyscall ()

Thread 1 (Thread 0xb78fe760 (LWP 26362))

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/libpthread.so.0
  • #2 IA__g_spawn_sync
    at gspawn.c line 382
  • #3 IA__g_spawn_command_line_sync
    at gspawn.c line 694
  • #4 run_bug_buddy
    at gnome-breakpad.cc line 369
  • #5 check_if_gdb
    at gnome-breakpad.cc line 440
  • #6 bugbuddy_segv_handle
    at gnome-breakpad.cc line 223
  • #7 <signal handler called>
  • #8 set_dimensions_pass_one
    at gnucash-style.c line 177
  • #9 styles_recompute_layout_dimensions
    at gnucash-style.c line 493
  • #10 gnucash_sheet_styles_set_dimensions
    at gnucash-style.c line 506
  • #11 gnucash_sheet_compile_styles
    at gnucash-style.c line 668
  • #12 gnc_table_init_gui
    at table-gnome.c line 189
  • #13 gsr_create_table
    at gnc-split-reg.c line 387
  • #14 gnc_split_reg_init2
    at gnc-split-reg.c line 353
  • #15 gnc_split_reg_new
    at gnc-split-reg.c line 325
  • #16 gnc_plugin_page_register_create_widget
    at gnc-plugin-page-register.c line 727
  • #17 gnc_plugin_page_create_widget
    at gnc-plugin-page.c line 151
  • #18 gnc_main_window_open_page
    at gnc-main-window.c line 2211
  • #19 gnc_plugin_page_register_recreate_page
    at gnc-plugin-page-register.c line 1028
  • #20 gnc_plugin_page_recreate_page
    at gnc-plugin-page.c line 260
  • #21 gnc_main_window_restore_page
    at gnc-main-window.c line 501
  • #22 gnc_main_window_restore_window
    at gnc-main-window.c line 692
  • #23 gnc_main_window_restore_all_windows
    at gnc-main-window.c line 764
  • #24 gnc_restore_all_state
    at top-level.c line 273
  • #25 call_c_hook
    at gnc-hooks.c line 262
  • #26 IA__g_hook_list_marshal
    at ghook.c line 386
  • #27 gnc_hook_run
    at gnc-hooks.c line 277
  • #28 gnc_book_opened
    at gnc-file.c line 499
  • #29 gnc_post_file_open
    at gnc-file.c line 834
  • #30 inner_main
    at gnucash-bin.c line 475
  • #31 invoke_main_func
    at init.c line 367
  • #32 c_body
    at continuations.c line 346
  • #33 scm_c_catch
    at throw.c line 200
  • #34 scm_i_with_continuation_barrier
    at continuations.c line 322
  • #35 scm_c_with_continuation_barrier
    at continuations.c line 364
  • #36 scm_i_with_guile_and_parent
    at threads.c line 711
  • #37 scm_with_guile
    at threads.c line 699
  • #38 scm_boot_guile
    at init.c line 350
  • #39 main
    at gnucash-bin.c line 622
The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]


----------- .xsession-errors (25 sec old) ---------------------
Done processing 1 items
/usr/bin/md5sum: core: Permission denied
kdeinit4: preparing to launch /usr/bin/kbuildsycoca4
kbuildsycoca4 running...
kbuildsycoca4(26308) VFolderMenu::loadDoc: Could not open  "/etc/xdg/menus/applications-kmenuedit.menu" 
kbuildsycoca4(26308) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/share/applications/realplay.desktop" is not compliant with XDG standard (missing trailing semicolon). 
kbuildsycoca4(26308) KConfigGroup::readXdgListEntry: List entry MimeType in "/usr/share/applications/realplay.desktop" is not compliant with XDG standard (missing trailing semicolon). 
"KConfigIni: In file /usr/share/applications/switchdesk.desktop, line 103: " Invalid entry (missing '=') 
kbuildsycoca4(26308) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/local/share/applications/realplay.desktop" is not compliant with XDG standard (missing trailing semicolon). 
kbuildsycoca4(26308) KConfigGroup::readXdgListEntry: List entry MimeType in "/usr/local/share/applications/realplay.desktop" is not compliant with XDG standard (missing trailing semicolon). 
kbuildsycoca4(26308) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/local/share/applications/opera.desktop" is not compliant with XDG standard (missing trailing semicolon). 
kbuildsycoca4(26308) KConfigGroup::readXdgListEntry: List entry MimeType in "/usr/local/share/applications/opera.desktop" is not compliant with XDG standard (missing trailing semicolon). 
Writing MailMessage to file. Subject: Picassa 3.0 beta won't load
Done processing 1 items
/usr/bin/md5sum: core: Permission denied
--------------------------------------------------
Comment 1 Jonathan Kamens 2008-12-04 21:12:07 UTC
Created attachment 123965 [details] [review]
Patch which fixes this crash

Here's the problem... GnuCash uses a hash table with int keys to store dimensions, and the key value is the number of rows in the dimension being stored.  The problem is that this key value is stored in a static int inside the style_get_key function, which means that the key always has the same address, and the hash functions in glib2 store the *address*, not the *value* of the key.  Unfortunately, the hash algorithm changed some time between glib2-2.18.2 and glib2-2.19.2, such that there's a hash conflict between the key value 1 and the key value 2, but since the value of the already hashed key was swiped out from under it when style_get_key "created" a new key, the hash table entry that's already there matches even when it shouldn't have.

The attached patch cleans this up by allocating memory to hold the key when inserting it into the hash table.  It also changes the way the hash table is created to ensure that the memory is freed when a hash table entry or hash table is destroyed.  And while I was at it, I made the same fix for the cursors hash table, which was also leaking memory when entries were removed or the table was destroyed.

I've tested this fix and it works.
Comment 2 Matthias Clasen 2008-12-05 07:03:36 UTC
*** Bug 563239 has been marked as a duplicate of this bug. ***
Comment 3 Christian Stimming 2008-12-06 21:35:12 UTC
Committed to trunk, r17747, waiting for back-port. Thanks a lot!
Comment 4 Christian Stimming 2008-12-08 08:39:56 UTC
2.2-branch, r17761. Thanks a lot!
Comment 5 John Ralls 2018-06-29 22:13:24 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=563273. Please update any external references or bookmarks.