GNOME Bugzilla – Bug 150022
Crash entering a currency when the currency value is 100 times itself
Last modified: 2018-06-29 20:46:10 UTC
See the bottom for what I think the problem is. I've setup a Skymiles "fund" currency. It appears that the smallest unit value is 10000. I attempt to save an expense of 100000 skymiles, and GnuCash asks to fix the split automatically and the amount is cleared. I choose the default option several times and enter 100000 (rinse/repeat). I attempt to fix the split manually this time, I enter 100000 again, it again asks to fix the split, I choose the default (automatic) and it crashes. The destination account is an expense category and is in USD currency (.01 USD = 1 delta skymile) Below is the debug info: Backtrace was generated from '/usr/bin/guile-1.6' (no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1". (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 1398)] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...0x400d5be8 in waitpid () from /lib/libpthread.so.0
+ Trace 49300
It was very difficult to enter this amount, but I eventually was able to enter the amount by doing the following: Pick a different destination account (my memory what I did is getting fuzzy now), but I entered a small value, then changed it to the correct value, then changed the destination account to the right account. When I saved the file, the XML transaction looked like this (I first noticed that the math was not correct in the expense account ledger): <gnc:transaction version="2.0.0"> <trn:id type="guid">bf00dcaceba5714e6b34a7e79989c8f0</trn:id> <trn:currency> <cmdty:space>ISO4217</cmdty:space> <cmdty:id>USD</cmdty:id> </trn:currency> <trn:date-posted> <ts:date>2004-06-21 00:00:00 -0400</ts:date> </trn:date-posted> <trn:date-entered> <ts:date>2004-08-12 22:36:22 -0400</ts:date> </trn:date-entered> <trn:description>Australia Trip</trn:description> <trn:splits> <trn:split> <split:id type="guid">9b0719c29af68f57b455bf1cd7144d7c</split:id> <split:reconciled-state>n</split:reconciled-state> <split:value>100000/100</split:value> <split:quantity>0/100</split:quantity> <split:account type="guid">d30bb0c9b6a29083e3a311544246958d</split:account> </trn:split> <trn:split> <split:id type="guid">792917db918938b9faeb5a69fd806fcc</split:id> <split:reconciled-state>n</split:reconciled-state> <split:value>-100000/100</split:value> <split:quantity>-1000000000/10000</split:quantity> <split:account type="guid">21c2609346e1bd0d94be47bc6f0ff54b</split:account> </trn:split> </trn:splits> </gnc:transaction> The "0/100" didn't look right to me, so I changed it by hand. I noticed other transactions that didn't look right, but I haven't changed them. Should I? Here is another transaction that doesn't look right: <gnc:transaction version="2.0.0"> <trn:id type="guid">898c576ef58990e8ee919112fb06ea7a</trn:id> <trn:currency> <cmdty:space>ISO4217</cmdty:space> <cmdty:id>USD</cmdty:id> </trn:currency> <trn:date-posted> <ts:date>2004-06-18 00:00:00 -0400</ts:date> </trn:date-posted> <trn:date-entered> <ts:date>2004-08-12 22:15:53 -0400</ts:date> </trn:date-entered> <trn:description>Mileage Purchase</trn:description> <trn:splits> <trn:split> <split:id type="guid">5cb081dbd8d565c4f7da973d1fc57dc6</split:id> <split:reconciled-state>n</split:reconciled-state> <split:value>1000/100</split:value> <split:quantity>10000000/10000</split:quantity> <split:account type="guid">21c2609346e1bd0d94be47bc6f0ff54b</split:account> </trn:split> <trn:split> <split:id type="guid">dac439a45e405dc1442ad88a12222281</split:id> <split:reconciled-state>n</split:reconciled-state> <split:value>-1000/100</split:value> <split:quantity>0/10000</split:quantity> <split:account type="guid">cbefe33edff2591964f065b76b0b0c1b</split:account> </trn:split> </trn:splits> </gnc:transaction> In fact the record in the ledger for the income account doesn't look right (missing the amount). I think that GnuCash has got it in its head that .01 DSM (Delta Skymiles) = 1 DSM which, of course, could not make sense. This income account is also in DSM and all the values are 100 times smaller than they should be. I think when Debian testing upgraded to 1.8.9, this bug appeared (well, its been a bug for awhile now, but the bug is intrusive now.). All rows entered before the upgrade (or that were entered after the upgrade and used the auto-fill feature) are 100 times smaller than they should be. Since both the "from" and "to" accounts are in the same currency, the values should be the same. Any ideas?
how are you entering the transactions? The transactions are denoted in USD, which implies you entered them using the GL or from a USD account. If your Asset account is in DSM and your income account is in DSM, then the transaction should be DSM (assuming you enter the txn from one of those accounts). Can you re-verify the commodity of all accounts involved? Also, why do you denote DSM as a fraction of 10000? That should be 1 (because you can't have fractions of miles). I'm trying to figure out how to attempt to reproduce this crash, but it's unclear what to do based on your story -- could you try to provide a more clear, step-by-step guide to reproducing the problem? Thanks.
Thanks for replying so fast. This time I've done my "homework" to make it very easy to reproduce. I've deleted all my transactions, except for the transactions in the Skymiles asset account. I've deleted all other accounts, except for the ones related to the transactions in the skymiles account. When doctoring the file, I swear I did not alter any data. I only deleted stuff, either from the text file, or from the GUI (transactions were deleted from the text file, and accounts were deleted via the GUI) This is how to reproduce the crash: Open the attached file in GnuCash 1.8.9 (I use Debian testing) open the Assets:Milage(sic) Programs:Clay Delta Skymiles account start a new transaction enter today's date, "test" in the description field, Expenses:travel:Australia:2004 in the Transfer field, 100000 in the Decrease field. Hit enter. See "Rebalance Transaction" box. Choose the default "Adjust current account split total" enter 100000 into the Decrease field select "Balance it manually" from the Rebalance Transaction box enter 100000 into the Descrease field, hit enter select the default "Adjust current account split total" (Seg fault) I believe there is anothter, related problem. All the transactions in the Skymile asset account using the Income:Milage Income:Delta account are weird. Both accounts are in DSM, however the values are 100 times difference from each other. If you open the "Edit Exchange Rate" box, it thinks that the transactions are to a USD account!
Created attachment 30533 [details] A data file to expose the bug
The attached file's filename was datafile.tar.gz.
Does this issue also occur in the 2.0.x versions? Development on 1.8.x has stopped, so please upgrade to 2.0.x (most current is 2.0.1) and see whether this problem still occurs.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=150022. Please update any external references or bookmarks.