Crash in multi-currency transactions

Tobias Krais kraist at ba-loerrach.de
Thu Aug 14 23:16:47 CDT 2003


Hi together,

first thanks for your analysis and Christian for translating and posting this bug. I did further tests that might be of interest. 

Benoit Grégoire wrote:
> On Wednesday 13 August 2003 18:17, Derek Atkins 
>wrote:
> 
>>Christian Stimming <stimming at tuhh.de> writes:
>>
>>>This is a bug discovered by Tobias Krais in the 
>>>multi-currency
>>>transaction handling, version 1.8.4. I'll translate 
>>>the description:
>>>
>>>Some transactions have been imported (by HBCI, but 
>>>this doesn't matter
>>>here). The transactions are imported into a EUR 
>>>account, and the
>>>problematic transactions have a CHF (swiss franks) 
>>>account as 'other'
>>>account.
>>>
>>>After finishing the importer GUI, the EUR amount in >>>the EUR account is
>>>correctly displayed. However, in the CHF account no >>>amount is displayed
>>>at all -- the field is empty. Now Tobias goes into 
>>>the (empty) amount
>>>field and enters an amount. Then he leaves the 
>>>transaction. The dialog
>>>opens: "The current transaction is not balanced". He 
>>>selected "Adjust
>>>current account split" (third out of four radio 
>>>buttons, picture
>>>attached). Gnucash crashes.

Gnucash crashs when I select the second radio button, too. Gnucash does not always crash. it crashs only the first time. When I restart Gnucash an do the same action again it does not crash. To let it crash again I have to reboot.
Interesting is also: after entering the amount the second time (after I restarted Gnucash) something changes. There is still no amount in my accout, but in the main window amounts in the "Total" column are gone in both affected and all superaccounts.
Please have a short look at the too pictures attatched, showing the transaction before entering an amount (just imported) and after entering an amount manually.

>>>When any of the other radio buttons are selected, 
>>>gnucash doesn't crash.
>>>In any case, a bunch (50 times) of warnings are 
>>>printed on the console:
>>>Warning: PrintAmountInternal: Bad numeric.

This failure happens always, no matter what radio button I choose.

>>The bug is that you aren't setting the transaction 
>>split amount/values
>>properly.  This is a bug in the importer, IMHO.

To me it seem also that it is a bug in the importer. I can not reproduce this failure by entering the amount myself. It only happens when I import data via HBCI.

> 
> Derek is right.  Tough we should probably get rid of  
> xaccSplitSetBaseValue() 
> in head, I just checked it's code as well as the
> calls in both the OFX and 
> HBCI code and we are using it correctly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: afterEntering.png
Type: image/png
Size: 1820 bytes
Desc: Portable Network Graphics Format
Url : /pipermail/attachments/20030814/381e1a4f/afterEntering.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bevoreEntering.png
Type: image/png
Size: 1198 bytes
Desc: Portable Network Graphics Format
Url : /pipermail/attachments/20030814/381e1a4f/bevoreEntering.png


More information about the gnucash-devel mailing list