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 107876 - Crash when financial calculator is to calculate zero interest
Crash when financial calculator is to calculate zero interest
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: General
git-master
Other Linux
: Normal major
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2003-03-08 17:32 UTC by Andreas Fahle
Modified: 2018-07-02 07:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas Fahle 2003-03-08 17:32:41 UTC
GnuCash crashes when I tell the financial calculator to calculate the
interest rate, and the other values are such that the interest rate would
be zero. For example:
- payment period = 10
- present value = 10000
- periodic payment = -1000
- future value = 0
i.e. interest rate should be 0.

btw why is it impossible to enter a zero interest rate?
Comment 1 Derek Atkins 2003-03-08 18:34:47 UTC
0% interest is not a Loan, it's just a limited-count scheduled payment.

Although you are correct that the calculator should not crash.
Comment 2 Neil Williams 2006-02-13 00:13:58 UTC
Reproduced in svn r13238. It's not actually a crash though, the code is printing "Zero Interest" to the terminal and calling exit(1) so gnucash shuts down (in preference to causing a divide by zero that would have followed on the next line).

I've committed a fix that prevents the shutdown and avoids the division by zero. The interest rate is shown as '-'.

Fixed in r13248.

Comment 3 John Ralls 2018-06-29 20:29:46 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=107876. Please update any external references or bookmarks.