GNOME Bugzilla – Bug 648392
Crash at "Open File" due to bad saved reports file
Last modified: 2018-06-29 22:57:07 UTC
Created attachment 186441 [details] zip with sample gnucash file and mac os x traceback... Hi have created a gnucash file in Gnucash version 2.4.5, Mac OS X. Everything was fine until i started scheduling transactions. It crashed, and from that moment on, it is not possible to open gnucash with that file. (I tried deleting the lnk log files, no difference) Nevertheless, I copied the file to the same version, in Windows 7, it opened with no fuss, and I was able to edit the file. Copied the result back to mac OS X, and the problem persists... I send attached both the file, and the output after the crash. Any help?
Unfortunately, your file opens just fine for me. Could you attach the gnucash.trace (see http://wiki.gnucash.org/wiki/Tracefile for how to find it)? There's not quite enough information in the crash report to tell me what's causing the problem.
Created attachment 186444 [details] gnucash.trace attached this is the trace file... (gnucash does not crash for a new file!, only for the sample previously sent) thanks for your help!
Comment on attachment 186444 [details] gnucash.trace attached Hmm. That assert is troubling, but I don't think that it's the cause of the crash. I wonder if something is whacked in the "book" file. Try renaming it and then restart Gnucash and try to load the account file. (The book file is ~:Library:Application Support:books:contasdomesticas.xml.gnucash.gcm .) If the account file opens, please attach the old "book" file for me to analyze.
Created attachment 186506 [details] gcm file indeed... now is working (after renaming the gcm file...) here it goes. thanks, and keep up the good work! :)
Comment on attachment 186506 [details] gcm file Excellent. With luck, it will crash my debug build and I'll be able to figure out what's wrong.
Created attachment 186537 [details] Backtrace of report crash Which it does. It seems that you have a bad report (Item 3 in the gcm file). Commenting out that increment (and changing item 4 to 3) allows gnucash to start. Debugging into it doesn't really get me anywhere, unfortunately. The report system works by saving a string which is a scheme program, and something about that particular program causes scheme to pass an invalid pointer back to wrap_gnc_budget_lookup(). I've attached a full backtrace, and I'll change the module to reports in the hope that somebody who knows Guile better than I can figure out how to defend against this.
I believe this is a duplicate of bug 647945. The problem is this part of the report definition: ((lambda (option) (if option ((gnc:option-setter option) (gnc-budget-lookup #f (gnc-get-current-book))))) option)) The first parameter of gnc-budget-lookup shouldn't be #f, but the GUID of a budget. Christian did submit a patch a while ago that fixes the crash (r20570 and backported to 2.4.6). So with 2.4.6 this should not crash anymore. Can you try this ? For completeness: there is still one problem unfixed even though it doesn't crash anymore: the #f value is there because of the automatic conversion of the saved-reports file from v2.0 to v2.4 format. This is more obvious from the other bug. So if one upgrades from GnuCash 2.2.x to 2.4.6 and has a budget report still open or in custom reports, there's no crash, but the budget report is more or less ruined, because it's lost the reference to the budget it's supposed to display. Unfortunately, my guile knowledge is too limited to understand where this automatic conversion takes place and what fix it would require.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 647945 ***
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=648392. Please update any external references or bookmarks.