GNOME Bugzilla – Bug 563273
crash in GnuCash Finance Management: Starting GnuCash.
Last modified: 2018-06-29 22:13:24 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 ()
+ Trace 210491
Thread 1 (Thread 0xb78fe760 (LWP 26362))
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 --------------------------------------------------
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.
*** Bug 563239 has been marked as a duplicate of this bug. ***
Committed to trunk, r17747, waiting for back-port. Thanks a lot!
2.2-branch, r17761. Thanks a lot!
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.