GNOME Bugzilla – Bug 353274
Crash if saved-reports-1.8 and saved-reports-2.0 exists
Last modified: 2018-06-29 21:11:51 UTC
Please describe the problem: I had some custom reports saved in the saved-reports-1.8 file. Now that I have updated to 2.0.1, and saved some custom reports, the saved custom reports are in saved-reports-2.0. But if I have both the saved-reports-1.8 and saved-reports-2.0 exist at the same time, then gnucash crashes during startup. By merging the two files into one (either 1.8 or 2.0 version), the crash goes away. Steps to reproduce: 1. Have reports that load on startup 2. Have custom reports in saved-reports-1.8 3. Have custom reports in saved-reports-2.0 4. Launch GnuCash Actual results: Gnucash loads some reports, then crashes. Expected results: Gnucash should not crash, and either: 1. merge the two files into one, OR 2. load the custom reports from both files Does this happen every time? I merged the two files manually, so the crash has gone away. I don't want to play around too much with this, at least not with my financial data at risk, but will help if needed. Other information:
Oops. If a saved-reports-2.0 exists, then of course saved-reports-1.8 should be ignored. This needs to be fixed.
Is there a feature to merge the files into the 2.0 version already? I definitely did not want to lose the reports in the 1.8 version.
I just tested Gnucash 2.0.4 and it doesn't read the saved-reports-1.8 file when a saved-reports-2.0 file exists. You most likely ran into #168250 where gnucash would crash if two reports existed with the same name. There is no feature to "merge" saved reports files. Gnucash 2.0.x always attempts to read the saved-reports-2.0 file first, and if that read fails it tries to read the saved-reports-1.8 file. It only ever writes to the saved-reports-2.0 file. The first time you ever ran 2.0.x it should have read the 1.8 file and written a 2.0 file. Al subsequent invocations should have only ever accessed the 2.0 file.
So are you saying that keeping saved reports from a previous version is not supported? It is certainly desired that saved reports would be carried forward. I also don't get your logic. It sounds like you are saying I should have not had the bug in the first place because the tool would automatically create the 2.0 file the first time it was run. But if it didn't, that would be the bug, right? What if adding a custom report in that first session somehow corrupts the 2.0 file? I think we should prove the bug is gone before it is closed.
I'm saying that the saved reports should automatically be migrated from the saved-reports-1.8 file to the saved-reports-2.0 file the first time you run gnucash 2.0.x. If you can recrate the problem I'm happy to work on it. If you can't I'm chalking it up to an instance of duplicate report names causing a crash (which is fixed).
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=353274. Please update any external references or bookmarks.