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 655059 - GnuCash Crashes In OS X 10.7
GnuCash Crashes In OS X 10.7
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: MacOS
2.4.x
Other Mac OS
: Normal critical
: ---
Assigned To: John Ralls
: 655066 658276 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-07-21 15:49 UTC by Mark Spidle
Modified: 2018-06-29 23:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash log (38.54 KB, text/plain)
2011-07-21 15:49 UTC, Mark Spidle
Details
Libgdk-quartz crash (45.63 KB, text/plain)
2011-07-21 17:06 UTC, John Ralls
Details
Patched libiconv.2.dylib to fix the libiconv part of the bug (922.29 KB, application/octet-stream)
2011-07-21 22:06 UTC, John Ralls
Details
Patched libgdk-quartz to fix the second crash in the bug (807.86 KB, application/octet-stream)
2011-07-21 22:09 UTC, John Ralls
Details
Crash log file with patches applied (43.42 KB, text/plain)
2011-07-21 23:46 UTC, Matt Day
Details
Better replacement libiconv (922.29 KB, application/octet-stream)
2011-07-22 02:15 UTC, John Ralls
Details
crash log. the window cannot be resized other than by pressing the OS X green button. Trying to resize it eventually results in a crash (51.41 KB, text/plain)
2011-07-22 12:16 UTC, Dave Reed
Details

Description Mark Spidle 2011-07-21 15:49:27 UTC
Created attachment 192386 [details]
Crash log

Try to launch GnuCash 2.4.7 and it immediately crashes.  See attached crash log.
Comment 1 John Ralls 2011-07-21 17:06:11 UTC
Created attachment 192392 [details]
Libgdk-quartz crash

I've got a patch to libiconv which fixes the first crash, but unfortunately there's another crash later in libgdk-quartz (which this second crash log illustrates). Debugging that now.
Comment 2 John Ralls 2011-07-21 17:40:47 UTC
*** Bug 655066 has been marked as a duplicate of this bug. ***
Comment 3 John Ralls 2011-07-21 22:06:54 UTC
Created attachment 192428 [details]
Patched libiconv.2.dylib to fix the libiconv part of the bug
Comment 4 John Ralls 2011-07-21 22:09:14 UTC
Created attachment 192429 [details]
Patched libgdk-quartz to fix the second crash in the bug

To apply the patches, copy them to Gnucash.app/Contents/Resources/lib

Don't forget to reinstall Finance::Quote on Lion; it will be unhappy otherwise.
Comment 5 anupamsg75 2011-07-21 23:38:28 UTC
Thanks for the patches.  Can confirm that basic ledger and transaction entry features are working fine.  Have not tried the quotes and reports yet.
Comment 6 Matt Day 2011-07-21 23:46:29 UTC
Created attachment 192430 [details]
Crash log file with patches applied

Applied the patches here and am still experiencing a crash on both my OS X Lion machines.

See attached crash log.
Comment 7 John Ralls 2011-07-22 02:15:21 UTC
Created attachment 192432 [details]
Better replacement libiconv

Try this libiconv instead. Not sure why the other one works on some systems but not others.
Comment 8 Ed 2011-07-22 03:24:24 UTC
I can confirm that the patches here have fixed my Gnucash startup. I used the "better replacement libiconv" and the libgtk-quartz, and startup, and functionality seems to be restored.

I must say that the Gnucash developer community ROCKS! Thanks guys!!!
Comment 9 Matt Day 2011-07-22 08:58:38 UTC
Confirmed working here too. Thanks!
Comment 10 Dave Reed 2011-07-22 12:16:38 UTC
Created attachment 192452 [details]
crash log. the window cannot be resized other than by pressing the OS X green button. Trying to resize it eventually results in a crash
Comment 11 Dave Reed 2011-07-22 12:19:18 UTC
I applied the patches, but the window cannot be resized other than using the OS X green window title button. Trying to resize it eventually results in a crash. See the crash log in my previous comment.
Comment 12 Ed 2011-07-22 12:23:14 UTC
I have confirmed that resizing causes a crash on my system as well. Crash report header says:


Process:         Gnucash-bin [9026]
Path:            /Applications/Gnucash.app/Contents/MacOS/Gnucash-bin
Identifier:      org.gnucash.Gnucash
Version:         2.4.7 (2.4.7)
Code Type:       X86 (Native)
Parent Process:  launchd [523]

Date/Time:       2011-07-22 19:20:30.642 +0700
OS Version:      Mac OS X 10.7 (11A511)
Report Version:  9

Interval Since Last Report:          150791 sec
Crashes Since Last Report:           27
Per-App Interval Since Last Report:  3417 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      B3B81FDD-4EAA-4DCA-A8A8-17231A8A9B22

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000000c

VM Regions Near 0xc:
--> __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- SM=NUL  /Applications/Gnucash.app/Contents/MacOS/Gnucash-bin
    __TEXT                 0000000000001000-000000000001b000 [  104K] r-x/rwx SM=COW  /Applications/Gnucash.app/Contents/MacOS/Gnucash-bin

Application Specific Information:
objc[9026]: garbage collection is OFF
Comment 13 John Ralls 2011-07-22 13:27:18 UTC
The resizing crash is another Gtk+ bug, documented at #655122. Once we have a patch for that, I'll attach a new library to this bug.
Comment 14 Ed 2011-08-09 03:43:27 UTC
I have been using the Gnucash-Lion-Beta-2.4.7.dmg, and the GTK crashes (bug #655122) are not occurring any longer...thank you!

However, there is a strange degradation of performance that is now occurring over time. For example, when I open a small file (about 20 entries) and double-click on my Checking account, the account register opens in about a second. The next tab I open takes about a second, the next takes about two seconds, etc., and eventually, it ends up taking about 6-10 seconds to open any tabs, at which point I usually close the program frustrated.

After being rightly-chastised for misusing the GTK thread for GnuCash questions (thanks, John! [grin]), I figured this was the best place to report. Feel free to correct me if I'm wrong...and to contact me if you need more info.
Comment 15 John Ralls 2011-08-09 04:09:45 UTC
Gnucash does have a user-support mailing list, you know: 
https://lists.gnucash.org/mailman/listinfo/gnucash-user

Hijacking bugs is rather rude, too. It's not really clear that what you're describing is a bug in Gnucash. Please join the users' list and ask there, and I'll walk you through some troubleshooting to try and figure out the problem.
Comment 16 Ed 2011-08-09 12:25:23 UTC
Point taken. However, what I'm *really* saying is that the performance issue might have been *caused* by the "fix" for this bug. If it's not related, then you're right...I'm hijacking this thread. But if it is related, well...maybe someone could try to reproduce it in a dev environment? Breathe deep, Mister Ralls...I'm a software engineer, too...I'm on your side...just trying to help weed out the Mac/Lion issues. [grin]

I'll look into the user mailing list, as well. Thanks for the tip.
Comment 17 John Ralls 2011-08-09 13:54:44 UTC
>I'm a software engineer, too
Great. Then you have XCode installed and know how to use it. Use Instruments to figure out what's wrong and file a bug against the appropriate component. If you need a build with symbols, the procedure is at http://wiki.gnucash.org/wiki/MacOSX/Quartz

Your description smells like a memory leak, and I don't think that the changes to Gtk would have caused or exposed one, but you can review the patches at Bug 655074, Bug 655087, and Bug 655122 and see what you think.
Comment 18 Ed 2011-08-09 16:09:05 UTC
Actually, I do have XCode installed, and I am in the process of learning it now. (I've only switched to Mac in the past 3 weeks...many decades of Windows/.NET, Linux, and web dev, though.)

I agree that it smells like a memory leak. I don't know if the changes to Gtk would have caused/exposed one...that's why I mentioned it to those most recently familiar with the code.

And quoting Churchill, "If you have to kill a man, it costs nothing to be polite."

Thanks!
Comment 19 John Ralls 2011-09-05 21:48:52 UTC
For the record, the leak was in an early patch in Bug 655087 and was fixed with a subsequent patch which has been committed to the gtk+-2.24 branch (master is different and gets a different fix which is as yet not resolved).
Comment 20 John Ralls 2011-09-06 13:40:11 UTC
*** Bug 658276 has been marked as a duplicate of this bug. ***
Comment 21 John Ralls 2011-09-19 21:46:37 UTC
There's an almost-fully-patched Lion Beta dmg on sourceforge:
http://sourceforge.net/projects/gnucash/files/gnucash%20%28stable%29/2.4.7/Gnucash-Lion-Beta-2.4.7-2.dmg/download

(Almost because it doesn't have the final patch to Bub 655087 -- which is still open for Gtk3, not Gtk2 -- and Gnucash uses Gtk2.)

All Lion users should use that build until we release 2.4.8.
Comment 22 Jens-Erik Weber 2011-09-26 10:46:42 UTC
It would be better to offer this corrected version right on the download page instead of letting users download a version that crashes on Lion. And then you have to search for this bug report.

Anyway, thanks for the work! Gnucash-Lion-Beta-2.4.7-2 works.
Comment 23 guivho 2011-09-27 18:10:27 UTC
I would like to switch to mysql as backend.
However, this beta version only presents xml and sqlite3 as data formats.
Is this due to the beta, or do I have to enable mysql somehow?
Comment 24 John Ralls 2011-09-27 18:22:05 UTC
From the README (included in all DMGs, on the sourceforge download page, and linked from the Gnucash main page):
"The only libdbi module included is for SQLite. If you need either the MySQL or Postgresql modules, you will have to build them yourself and install them into Gnucash.app/Contents/Resources/lib/dbd. For instructions, see MacOSX/Quartz"

MacOSX/Quartz is a wiki link. You can find it at 
http://wiki.gnucash.org/wiki/index.php?title=MacOSX/Quartz
Comment 25 guivho 2011-09-27 19:12:05 UTC
Is there any reason why gnucash does not even provide the libdbi
drivers as loosely coupled plugin files with an install script that
places the drivers where they are expected and executes the required
commands to activate these drivers?

Imho this would be far preferable over requiring unexperienced people
to get the required sources, configure stuff and build it.

Finally, gnucash provides db support, and I can understand that
sqlite3 is selected as default. But please, help us to use mysql (and
fellows).
Comment 26 John Ralls 2011-09-27 20:37:24 UTC
The reason is simple, and I've explained it several times in the various mailing lists: In order to build the dbi drivers, I have to build and install the database programs in my build environment, and include the libraries against which the dbi drivers (and those libraries, and so on) are linked in the bundle. There are only one or two people a year asking about it, not enough to justify the extra effort nor add even more bloat to an already enormous download.
Comment 27 John Ralls 2011-10-16 22:09:56 UTC
New comprehensive Gnucash-2.4.7 dmgs which work on all supported OSX versions are available for download.
Comment 28 John Ralls 2017-09-24 22:48:47 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 29 John Ralls 2018-06-29 23:00:00 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=655059. Please update any external references or bookmarks.