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 568327 - Using most "budget" reports, without a budget defined crashes gnucash
Using most "budget" reports, without a budget defined crashes gnucash
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
git-master
Other Linux
: Normal major
: ---
Assigned To: Joslwah
Andreas Köhler
Depends on:
Blocks:
 
 
Reported: 2009-01-19 18:27 UTC by Joslwah
Modified: 2018-06-29 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing bug (4.86 KB, patch)
2009-01-25 21:47 UTC, Forest Bond
none Details | Review
Fixes crashes and also improves error message when no budgets exists (for all budget reports). (12.25 KB, patch)
2009-01-28 04:18 UTC, Forest Bond
committed Details | Review

Description Joslwah 2009-01-19 18:27:54 UTC
Patch http://svn.gnucash.org/repo/gnucash/trunk@17829 adds many more budget reports.  There does not appear to be proper validation of whether any budgets are defined.  If none are then gnucash crashes.

See also:
https://lists.gnucash.org/pipermail/gnucash-devel/2009-January/024630.html?
and
http://lists.gnucash.org/logs/2009/01/2009-01-19.html#T11:10:26
Comment 1 Forest Bond 2009-01-21 11:21:28 UTC
I'll cook up a patch for this as soon as I have time.
Comment 2 Joslwah 2009-01-22 09:41:52 UTC
Confirmed by  Frank Ellenberger.
Comment 3 Forest Bond 2009-01-25 21:47:30 UTC
Created attachment 127218 [details] [review]
Patch fixing bug

Changes Budget Balance Sheet, Budget Income Statement to check for invalid budget (probably due to no budget existing).
Comment 4 Joslwah 2009-01-26 09:38:06 UTC
(In reply to comment #3)
> Created an attachment (id=127218) [edit]
> Patch fixing bug
> 
> Changes Budget Balance Sheet, Budget Income Statement to check for invalid
> budget (probably due to no budget existing).
> 

   Stops crashes correctly.

   However, budget barchart just gives a blank sheet now.  No nothing.  No indication of anything being wrong.
Comment 5 Forest Bond 2009-01-26 11:14:13 UTC
This patch doesn't modify Budget Barchart.  The behavior you describe was already present.
Comment 6 Forest Bond 2009-01-28 04:18:04 UTC
Created attachment 127377 [details] [review]
Fixes crashes and also improves error message when no budgets exists (for all budget reports).

This patch replaces the previous one.
Comment 7 Joslwah 2009-01-28 10:30:48 UTC
(In reply to comment #6)
> Created an attachment (id=127377) [edit]
> Fixes crashes and also improves error message when no budgets exists (for all
> budget reports).
> 
> This patch replaces the previous one.
> 

Confirmed that this works in the case without a budget defined.  

Please apply.
Comment 8 Christian Stimming 2009-01-28 21:00:45 UTC
Trunk, r17851. Should this be back-ported as well? Probably yes, at least for the budget.scm report.
Comment 9 Forest Bond 2009-01-29 00:00:52 UTC
The consensus in IRC seems to be that the fix for budget.scm is cosmetic and therefore should not be backported.
Comment 10 Joslwah 2009-01-29 00:05:30 UTC
O.k.  The primary bug, introduced recently, is fixed and the concensus seems to be not to backport the the cosmetic parts, so marking fixed.
Comment 11 Joslwah 2009-01-29 00:07:57 UTC
Deleting the backport block.
Comment 12 Christian Stimming 2009-02-03 21:08:28 UTC
Oh, obviously I read the comments here only after I already back-ported the commit. 2.2-branch, r17873. I hope this doesn't make any harm, does it?
Comment 13 John Ralls 2018-06-29 22:16:19 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=568327. Please update any external references or bookmarks.