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 647945 - Crash when running custom reports
Crash when running custom reports
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
2.4.x
Other Windows
: Normal critical
: ---
Assigned To: Christian Stimming
: 644772 648392 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-16 14:53 UTC by john
Modified: 2018-06-29 22:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Trace of crash from gdb (12.08 KB, text/plain)
2011-04-16 14:53 UTC, john
Details
Pre-upgrade custom reports (21.80 KB, application/octet-stream)
2011-04-16 14:54 UTC, john
Details
Post-upgrade custom reports (23.54 KB, text/plain)
2011-04-16 14:54 UTC, john
Details
Pre-upgrade custom reports (21.80 KB, text/plain)
2011-04-16 14:55 UTC, john
Details

Description john 2011-04-16 14:53:07 UTC
Created attachment 186077 [details]
Trace of crash from gdb

Some custom reports were created for use in GnuCash 2.2. The definitions are in C:\Documents and Settings\<username>\.gnucash\saved-reports-2.0

On first run of GnuCash 2.4 after upgrade a message notified me that the custom reports had been upgraded. Indeed, a file named saved-reports-2.4 appeared in that same directory.

I was able to run my custom reports during this first GnuCash 2.4 session, but after I closed GnuCash and reopened it, subsequent runs of the reports caused a crash.

I can recreate this behaviour as follows:

1. With GnuCash closed, delete or rename saved-reports-2.4
2. Start GnuCash 2.4.5 and acknowledge the messagebox about report upgrade.
3. Run a custom report successfully.
4. Close GnuCash.
5. Start GnuCash again.
6. Run a custom report and see it crash.

I will attach a gdb backtrace from the crash, plus the 2.0 and 2.4 report files.
Comment 1 john 2011-04-16 14:54:20 UTC
Created attachment 186078 [details]
Pre-upgrade custom reports
Comment 2 john 2011-04-16 14:54:55 UTC
Created attachment 186079 [details]
Post-upgrade custom reports
Comment 3 john 2011-04-16 14:55:25 UTC
Created attachment 186080 [details]
Pre-upgrade custom reports
Comment 4 Christian Stimming 2011-04-18 09:43:32 UTC
Maybe we need to add the sanity check 

  scm_is_string(guid_scm)

in engine-helpers.c:145 before actually accessing that string?
Comment 5 Christian Stimming 2011-04-19 20:17:16 UTC
I've added this additional sanity check which should hopefully prevent the crash, in r20570. Can anyone test with a newer compiled version?
Comment 6 john 2011-04-19 21:22:03 UTC
Sorry but I'm not equipped to build a version myself. Has anyone else been able to recreate my crash using the files I sent?
Comment 7 Frank H. Ellenberger 2011-04-20 18:28:27 UTC
John, as windows user you could test the nightly:  http://code.gnucash.org/builds/win32/trunk/
Comment 8 Christian Stimming 2011-04-21 15:05:06 UTC
(but nightly trunk still doesn't build due to webkit bla bla, and nightly 2.4 is not yet built again, i.e. please wait a bit)
Comment 9 Frank H. Ellenberger 2011-04-21 16:03:07 UTC
Christian, there is a http://code.gnucash.org/builds/win32/trunk/gnucash-2.4.99-svn-r20570-setup.exe is it broken?
Comment 10 Christian Stimming 2011-04-22 09:00:43 UTC
(In reply to comment #9)
> Christian, there is a
> http://code.gnucash.org/builds/win32/trunk/gnucash-2.4.99-svn-r20570-setup.exe

It is not broken, but it contains the binary from the last successful compile, which was on... hm... http://code.gnucash.org/builds/win32/build-logs/ ... 2011-04-03. Yes, it's unfortunate that you can't see this from the setup.exe list, only from looking into the log files. I think this is a side-effect of having always the build log uploaded.
Comment 11 Geert Janssens 2011-04-29 16:22:45 UTC
Tomorrow's nightly build should run fine (I fixed a bug today that prevented the nightly builds from running). You can use that one to test if this bug is fixed.
Comment 12 john 2011-05-03 21:00:13 UTC
I installed r20603, specifying a different directory so as to retain my 2.4 installation. The splash screen appeared briefly at startup, but nothing else.
Comment 13 Geert Janssens 2011-06-11 15:07:23 UTC
(In reply to comment #12)
> I installed r20603, specifying a different directory so as to retain my 2.4
> installation. The splash screen appeared briefly at startup, but nothing else.

Hmm, I suspect this crash is unrelated to your original problem. There were still problems with the Windows build in r20603.

But meanwhile GnuCash 2.4.6 has been released which should also contain Christian's fix for your problem.

Could you please check if the crash still happens with GnuCash 2.4.6 ?
Comment 14 Geert Janssens 2011-06-11 15:17:34 UTC
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.

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 15 john 2011-06-12 15:21:46 UTC
(In reply to comment #13)
> Could you please check if the crash still happens with GnuCash 2.4.6 ?

With 2.4.6 I no longer get the crash.

However, every time I run one of my custom reports that's based on the budget report I first have to go to the Options dialog for the report and select which budget to use. I haven't discovered how to make my selection persist for my report. Maybe this is connected with what Geert wrote in comment #14.
Comment 16 Geert Janssens 2011-06-12 16:01:04 UTC
John, thank you for your feedback.

Indeed, what you experience is what I tried to describe.

To fix this, you will have to resave your custom reports. Here is one way you could do that:
* Open all of your custom saved budget reports (the ones with problems) in separate tabs and keep them open until the end of this process.
* When all your custom reports are open, open the Custom Reports dialog again and delete all the reports there that have problems.
* Now for each report that is open in a tab:
  * Go to the Options dialog
  * select the proper budget for the report
  * Change the report name (for example add a .)
  * Click "Apply"
  * Change the report name back to what it was (remove the added .)
  * Click "Ok"
  * Save the report again to your custom reports
  * Close the report tab

GnuCash should now remember the budgets again for your report.
Comment 17 john 2011-06-12 22:06:35 UTC
(In reply to comment #16)
...
> To fix this, you will have to resave your custom reports. Here is one way you
> could do that:
...
> 
> GnuCash should now remember the budgets again for your report.

Many thanks Geert. That solved my problem.
Comment 18 Geert Janssens 2011-06-13 09:45:32 UTC
*** Bug 648392 has been marked as a duplicate of this bug. ***
Comment 19 Geert Janssens 2011-06-13 09:46:49 UTC
*** Bug 644772 has been marked as a duplicate of this bug. ***
Comment 20 Geert Janssens 2011-06-13 09:50:51 UTC
(In reply to comment #17)
> Many thanks Geert. That solved my problem.

You're welcome.

Some bug maintenance remarks:his bug was orignally reported because of a crash. This crash was fixed in GnuCash 2.4.6 (and trunk), but the core problem still persists: the saved reports are not properly converted. To avoid confusion, I have created a new bug report specifically for that issue: bug 652436. Any further feedback regarding the saved reports conversion should go to that bug.

If any of the reporters (or anyone else for that matter) still encounters this crash, feel free to reopen this bug.
Comment 21 John Ralls 2017-09-24 22:49:46 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 22 John Ralls 2018-06-29 22:56:57 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=647945. Please update any external references or bookmarks.