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 648392 - Crash at "Open File" due to bad saved reports file
Crash at "Open File" due to bad saved reports file
Status: RESOLVED DUPLICATE of bug 647945
Product: GnuCash
Classification: Other
Component: Reports
2.4.x
Other Mac OS
: Normal critical
: ---
Assigned To: Christian Stimming
Depends on:
Blocks:
 
 
Reported: 2011-04-21 17:01 UTC by bigwig
Modified: 2018-06-29 22:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
zip with sample gnucash file and mac os x traceback... (23.72 KB, application/zip)
2011-04-21 17:01 UTC, bigwig
Details
gnucash.trace attached (122.88 KB, text/plain)
2011-04-21 18:36 UTC, bigwig
Details
gcm file (1.25 KB, text/plain)
2011-04-22 23:28 UTC, bigwig
Details
Backtrace of report crash (10.15 KB, text/plain)
2011-04-23 23:21 UTC, John Ralls
Details

Description bigwig 2011-04-21 17:01:33 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?
Comment 1 John Ralls 2011-04-21 18:08:20 UTC
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.
Comment 2 bigwig 2011-04-21 18:36:26 UTC
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 3 John Ralls 2011-04-22 19:33:29 UTC
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.
Comment 4 bigwig 2011-04-22 23:28:12 UTC
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 5 John Ralls 2011-04-23 02:54:47 UTC
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.
Comment 6 John Ralls 2011-04-23 23:21:51 UTC
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.
Comment 7 Geert Janssens 2011-06-11 15:16:41 UTC
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.
Comment 8 Geert Janssens 2011-06-13 09:45:32 UTC
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 ***
Comment 9 John Ralls 2017-09-24 22:48:08 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 10 John Ralls 2018-06-29 22:57:07 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=648392. Please update any external references or bookmarks.