GnuCash
Contact   Instructions
Bug 797363 - Consistent Silent Crash on Converting Saved Reports from 2.6 to 3.6
Summary: Consistent Silent Crash on Converting Saved Reports from 2.6 to 3.6
Status: RESOLVED INCOMPLETE
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: 3.6
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-20 12:19 EDT by John
Modified: 2021-09-24 17:46 EDT (History)
6 users (show)

See Also:


Attachments
Before saved-report file (63.83 KB, text/plain)
2019-08-21 05:07 EDT, John
no flags Details
After saved-report file (31.42 KB, text/plain)
2019-08-21 05:08 EDT, John
no flags Details

Description John 2019-08-20 12:19:30 EDT
When GnuCash tries to convert the saved reports from version 2.4 (used by GnuCash 2.6) to version 2.8 (used by GnuCash 3.6). It crashes silently, but mostly seems to do the conversion. I say mostly because it deletes all saved reports up to the one I was trying to edit or delete.

More Detail: I'm upgrading from GnuCash 2.6.16 to GnuCash 3.6 and from Yosemite (macOS 10.10.5) El Capitan (10.11.6). Overall, the upgrade is going smoothly with the exception of the saved reports. I copied "saved-reports-2.4" from the old machine to the new machine. When I open the Saved Reports dialog, all my old reports show up as expected and nothing odd happens if I don't try to edit that dialog or use any of the reports.

However, if I try to edit one of the report names or delete one of the reports, GnuCash crashes silently after creating a new file called "saved-reports-2.8" in the configuration folder.

When I reopen GnuCash, I can reopen the Saved Reports dialog and most of the reports are still there. However, all of the repots listed before the one I tried to edit or delete are gone.

Because I have not yet migrated my data, I cannot tell whether the reports from version 2.6.16 work in 3.6.
Comment 1 John 2019-08-20 16:29:56 EDT
I stand corrected. I tried changing the order of the reports in the Saved Reports dialog, but I still lose the same reports when GnuCash 3.6 crashes. One of the two reports is based on the Clients Due report and one is an invoice. As I mentioned before, I have not migrated the data, so I cannot investigate this issue further at this time.
Comment 2 Geert Janssens 2019-08-21 04:29:56 EDT
Can you attach the crash report generated by Macos and the gnucash trace file (https://wiki.gnucash.org/wiki/Tracefile) ?
And perhaps the saved-reports files before and after gnucash tries to convert it (there should be very little identifyable data in there, but you may anonymize it if you prefer).
Comment 3 John 2019-08-21 05:07:14 EDT
Created attachment 373369 [details]
Before saved-report file

This is the saved-reports file I copied from GnuCash 2.6.16.
Comment 4 John 2019-08-21 05:08:48 EDT
Created attachment 373370 [details]
After saved-report file

This is the saved-reports file created by GnuCash 3.6 after I tried to edit the name of on of the saved reports.
Comment 5 John 2019-08-21 05:09:42 EDT
I found no crash report using "sudo find /var/folders -name gnucash.trace" in Terminal. I also tried "sudo find /var/folders -name *gnucash*" with the same results. Should I look for something else or look somewhere else?
Comment 6 John Ralls 2019-08-21 23:15:05 EDT
Crash reports live in ~/Library/Logs/Diagnostic Reports. Since it's in your user dir no need for sudo, just say 'ls ~/Library/Logs/Diagnostic\ Reports/Gnucash*` or use /Applications/Console.

gnucash.trace is the logging output and lives in $TMPDIR, a.k.a. /var/folders/xx/yyyyyy/T where xx and yyyyyy are a short and long random number generated  by MacOS for each user. Before Apple started exporting TMPDIR you could find it with `sudo find /var/folders -name gnucash.trace`.
Comment 7 John 2019-08-22 00:01:20 EDT
Since you pointed me to a page that tells me where to find the gnucash.trace, I assumed that you wanted me to deliver the trace file. As I said in my the Terminal command was not able to find any gnucash.trace files. I don't know what to do with "Before Apple started exporting TMPDIR." Is my operating system (El Capitan) "before" or "after" this milestone? Are you suggesting that I should look elsewhere for the trace file? 

Since you did not give me any information about how to find a "crash report generated by Macos," I assumed that it was the same thing as the trace file. I will look for the crash report the next time the machine is available.
Comment 8 Geert Janssens 2019-08-22 03:13:54 EDT
Hi, I was the one asking you for the crash report and trace file. As I'm not on Macos myself I could only give you general directions. I'm sorry if that caused you some frustration.

Typically John Ralls handles Macos related issues as that's his primary platform. My goal was to give him a head start by already asking for the right info. Hopefully with his additional details you will find the crash report. As for the trace file I don't know either what the "before" or "after" refer to.
Comment 9 John 2019-08-22 10:18:39 EDT
Hi Geert. Thank you for the explanation. I'm obviously new to this whole bug reporting thing. I apologize for misunderstanding.

  So, I have now regained access to the computer in question. There are no GnuCash files in ~/Library/Logs/Diagnostic\ Reports/Gnucash*. In fact, there is no directory called ~/Library/Logs/Diagnostic\ Reports/. I did find ~/Library/Logs/DiagnosticReports/, perhaps that is the name in El Capitan. Sadly, there is nothing from GnuCash in that directory, just the crash reports from Adobe Illustrator (which crashes each time it quits in El Capitan).

I also found no mention of GnuCash in the Console application. I don't understand why, but this seems to be a truly silent crash.
Comment 10 John Ralls 2019-08-22 12:54:50 EDT
It's quite possible that GnuCash is quitting rather than crashing, and if there's no trace file it means that GnuCash is quitting before it starts logging. For apps run from finder or with the `open` command output to stdout and stderr is lost on MacOS, so to see errors from before logging you have to run GnuCash from Terminal:
  /Applications/Gnucash.app/Contents/MacOS/Gnucash
Comment 11 John 2019-08-22 22:12:28 EDT
Thank you, John, for the explanation. Here is the output I see in Terminal when I launch GnuCash from there and try to edit the Version 2.4 Saved Reports.

Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash

(process:2462): gnc.gui-WARNING **: 22:06:20.386: [mac_set_languages()] Language list: en:C
The locale defined in the environment isn't supported. Falling back to the 'C' (US English) locale
Backtrace:
          15 (apply-smob/1 #<catch-closure 116575aa0>)
In report.scm:
    735:9 14 (gnc:save-all-reports)
In srfi/srfi-1.scm:
   592:29 13 (map1 _)
   592:29 12 (map1 _)
   592:29 11 (map1 _)
   592:29 10 (map1 _)
   592:29  9 (map1 _)
   592:29  8 (map1 _)
   592:29  7 (map1 (("e218035e4555d7a7a4500290daf7c519" . #<<rep?>) ?))
   592:29  6 (map1 (("bcc39cbf0c454ded7bf07befeeb6f9e7" . #<<rep?>) ?))
   592:29  5 (map1 (("faee9b66cbcd300395395702224cf649" . #<<rep?>) ?))
   592:29  4 (map1 (("ec33c1fc0bf248e1bb8cbc6ce505b2ae" . #<<rep?>) ?))
   592:17  3 (map1 (("fc386687dc1c3101fad636811df55956" . #<<rep?>) ?))
In report.scm:
   725:20  2 (gnc:report-template-save-to-savefile _)
   659:21  1 (gnc:report-template-serialize #<<report-template> vers?>)
In ice-9/boot-9.scm:
  1303:15  0 (_ _)

ice-9/boot-9.scm:1303:15: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f



If I don't try to edit those reports, I only get this output in Terminal.

Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash

(process:2462): gnc.gui-WARNING **: 22:06:20.386: [mac_set_languages()] Language list: en:C
The locale defined in the environment isn't supported. Falling back to the 'C' (US English) locale



I get the same output in Terminal when I try to edit the Saved Reports after they have been converted to Version 2.8.
Comment 12 Geert Janssens 2019-08-23 03:55:17 EDT
Looking at the console output combined with the saved report files you have uploaded, I believe gnucash is failing to save your multi-column report(s).

In particular it all points at the "Weekly Views" saved report.

There have been changes in the save format for multi-column views between the 2.6 series and the 3 series. These changes happened in the 3.x development cycle somewhere between the release of 2.6.19 and 2.6.20, which means 2.6.16 would certainly not have been aware of these changes.

There are a few options to try first:
* If you restore the original saved-reports-2.4 in your 3.6 installation. Can you then successfully open the "Weekly Views" report ? That's to test whether the new gnucash series still can properly read the old format correctly or that the issue is only in writing out the reports again.

* Can you in 3.6 recreate a similar multi-column report and try to store it as a saved report configuration. Does that also crash ?

* Back to 2.6. You may want to first install gnucash 2.6.21 and work with your current data a bit in that version, including making a small tweak to the saved-reports. As that's the last version of the 2.6 series it has the most compatibility tweaks with gnucash 3.0 and my allow a smoother upgrade path to 3.x.
Comment 13 John 2019-08-23 05:59:35 EDT
Thank you for this information, Geert. I am gradually working toward moving my data over to the new OS build. When I am closer to that goal, I will be able to run these tests. However, this is not a quick process, so it will be some time before I report again. I hope it will be this month.

Note You need to log in before you can comment on or make changes to this bug.