| Summary: | crash when entering a portfollio transaction | ||
|---|---|---|---|
| Product: | [Applications] kmymoney | Reporter: | Guy <gmalacrida> |
| Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | Keywords: | drkonqi |
| Priority: | NOR | ||
| Version First Reported In: | 5.1.3 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/office/kmymoney/commit/4d5599ca64795245a2f5fa4d4e5203364c74619c | Version Fixed/Implemented In: | 5.2 |
| Sentry Crash Report: | |||
| Attachments: |
attachment-7187-0.html
attachment-23143-0.html kmymonneyCrash.png kmymonneyCrash.png kmymonneyNoCrash.png |
||
|
Description
Guy
2023-01-09 17:29:10 UTC
Please provide some additional information. You say you enter BTC and are asked to confirm the amount of Swiss Francs (with 0 proposed) but you don't say what action you are trying to take (entering a buy transaction?) and what type of account, including the specified currency of that account and your base currency. Also, what actually triggers the crash? Trying to save the transaction? Just entering a value for Swiss Francs? Accepting the currency conversion dialog (is that where you are asked to confirm the value?) Note - I do see a divide by 0 in the backtrace - are you accepting the 0 value for Swiss Francs? That clearly could cause a divide by 0. Also, it might also help if you could get the backtrace with debug symbols enabled, as I only see two reverences to kmm libraries in the backtrace, but the other information would be a good start. Created attachment 155154 [details] attachment-7187-0.html Hello, I'm entering a buy transaction. It crashes when I try to input a value to replace the 0. The account is a placement account for Bitcoin and the currency is BTC. My main currency is the Swiss francs CHF Not sure I understand your asking about backtrack and debug though. Guy Le lun. 9 janv. 2023, 18:57, Jack <bugzilla_noreply@kde.org> a écrit : > https://bugs.kde.org/show_bug.cgi?id=464055 > > Jack <ostroffjh@users.sourceforge.net> changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > Resolution|--- |WAITINGFORINFO > Status|REPORTED |NEEDSINFO > Platform|unspecified |Ubuntu > > --- Comment #1 from Jack <ostroffjh@users.sourceforge.net> --- > Please provide some additional information. You say you enter BTC and are > asked to confirm the amount of Swiss Francs (with 0 proposed) but you > don't say > what action you are trying to take (entering a buy transaction?) and what > type > of account, including the specified currency of that account and your base > currency. Also, what actually triggers the crash? Trying to save the > transaction? Just entering a value for Swiss Francs? Accepting the > currency > conversion dialog (is that where you are asked to confirm the value?) > Note - I do see a divide by 0 in the backtrace - are you accepting the 0 > value > for Swiss Francs? That clearly could cause a divide by 0. > Also, it might also help if you could get the backtrace with debug symbols > enabled, as I only see two reverences to kmm libraries in the backtrace, > but > the other information would be a good start. > > -- > You are receiving this mail because: > You reported the bug. First, when replying by email, please delete everything of the previous comment, since your entire message becomes the next comment in the bug. Don't worry about debugs and backtrace for now. We'll provide more information if it becomes necessary. Please confirm exactly what happens. As I understand, you enter a buy transaction in a BTC investment account, and when you click to save the transaction, you get a currency conversion or equity price popup asking for the BTC amount in CHF. You click in the box for the amount, and as soon as you type a digit, it crashes? The exact point of the crash is important so we can find the right place to look in the code. I'm having trouble recreating this. Your base currency is CHF. I assume you are creating the buy transaction in an investment account, and that account is in BTC. Did you create an associated brokerage account? Also in BTC? When you create the buy transaction, did you create a BTC security? If so, what is it's currency? Created attachment 155157 [details]
attachment-23143-0.html
Yes, exactly as you said
Guy - if possible, please configure your email software to send text only. The HTML portion gets added to the bug as an attachment. There is still something I don't understand. If you have an Investment account in BTC currency, and buy a security called BTC, also listed in BTC, when you buy any of that security, and specify the price in that currency, there should be no conversion needed, or at least it should always be 1:1. In order to trigger the conversion dialog, you need to be doing something that refers to both BTC (I'm not sure in this case if it's the security or the currency) and to CHF. Is it possible for you to create a sample .kmy file with only the currencies and accounts and securities necessary to demonstrate the problem? Created attachment 155159 [details]
kmymonneyCrash.png
I am using CHF from my bank account to buy BTC. CHF is my main
currency and everything is converted into CHF. In my case I invested
CHF 60 to buy 0.003773 BTC
I enclose a printscreen of the situation. You can see the box where I
usually put the countervalue in CHF (although it was never 0 before).
As soon as I enter a number the program crashes.
BTW I am not a developer, very sorry for my total lack of the conventions.
Thank you for the screen shot, it does help. We can work through terminology and language differences. It looks like you are buying one share of the Bitcoin security with a value of 1BTC per share - but you are paying for it out of a brokerage (Courtage) account which is in CHF. That is why the exchange rate editor comes up. I do NOT know why it shows 0 instead of something based on the most recent conversion rate it knows about. When exactly does it crash? When you try to type something into the amount box? You would clearly get a divide by 0 error if you accepted that dialog with the 0 value, but the "OK" button is still disabled. Is this the same way you have entered your previous buy transactions shown in the register? You got it right on the BTC /CHF brokerage account. It crashes when I try to type something into the amount box. It also crashes if I leave 0. I entered all previous buy transactions the same way, with the difference that an amount around in CHF was always proposed, never zero. I just had to adjust such amount. Hello Jack, Any news? Anything I could/should do? thanks guy Guy Malacrida 33 ch. des Tuileries 1293 Bellevue/GE (Suisse) +41 78 603 7077 gmalacrida@gmail.com I need to find time to make another attempt to reproduce this. If you can create a small .kmy file which demonstrated the error (with exact instructions on how to trigger it) that would be helpful. I'll leave the status for now, so we get reminded if nothing happens for too long. Created attachment 155386 [details] kmymonneyCrash.png I'll have to figure out how to create that small .kmy file. Looks to me a currency issue. I enclose a snapshot of the same kind of transaction in November that went OK (kmymonneyNoCrash.png). You can see that exchange rates are proposed whereby none are proposed in the new transaction that crashes the programme (see kmymonneyCrash.png). One was in EUR and the last in CHF though... Le mar. 17 janv. 2023 à 16:37, Jack <bugzilla_noreply@kde.org> a écrit : > > https://bugs.kde.org/show_bug.cgi?id=464055 > > Jack <ostroffjh@users.sourceforge.net> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Summary|crash when entering a |crash when entering a > |portfogllio transaction |portfollio transaction > > --- Comment #11 from Jack <ostroffjh@users.sourceforge.net> --- > I need to find time to make another attempt to reproduce this. If you can > create a small .kmy file which demonstrated the error (with exact instructions > on how to trigger it) that would be helpful. I'll leave the status for now, so > we get reminded if nothing happens for too long. > > -- > You are receiving this mail because: > You reported the bug. Created attachment 155387 [details]
kmymonneyNoCrash.png
Hello Jack, I found a way to solve the issue thanks to a thread in KDE.org, i.e. https://forum.kde.org/viewtopic.php?f=69&t=173354 I think I'm basically did not setup Bitcoin properly although it worked quite well since 2019 ..... Anyway, I followed the advice from the people in that thread and created a security BTC, an investment a/c "Investement in BTC" and a brokerage a/c "Investment in BTC (brokerage)". It works, differently though as I need to input the BTC CHF rate (i.e. 19'988) instead of the c/v in CHF (i.e. CHF 60). Thanks for your help and have a good day. Guy Le mar. 17 janv. 2023 à 18:43, Guy Malacrida <gmalacrida@gmail.com> a écrit : > > I'll have to figure out how to create that small .kmy file. > Looks to me a currency issue. I enclose a snapshot of the same kind of > transaction in November that went OK (kmymonneyNoCrash.png). You can > see that exchange rates are proposed whereby none are proposed in the > new transaction that crashes the programme (see kmymonneyCrash.png). > One was in EUR and the last in CHF though... > > > > Le mar. 17 janv. 2023 à 16:37, Jack <bugzilla_noreply@kde.org> a écrit : > > > > https://bugs.kde.org/show_bug.cgi?id=464055 > > > > Jack <ostroffjh@users.sourceforge.net> changed: > > > > What |Removed |Added > > ---------------------------------------------------------------------------- > > Summary|crash when entering a |crash when entering a > > |portfogllio transaction |portfollio transaction > > > > --- Comment #11 from Jack <ostroffjh@users.sourceforge.net> --- > > I need to find time to make another attempt to reproduce this. If you can > > create a small .kmy file which demonstrated the error (with exact instructions > > on how to trigger it) that would be helpful. I'll leave the status for now, so > > we get reminded if nothing happens for too long. > > > > -- > > You are receiving this mail because: > > You reported the bug. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Git commit 4d5599ca64795245a2f5fa4d4e5203364c74619c by Thomas Baumgart. Committed on 05/02/2023 at 13:22. Pushed by tbaumgart into branch '5.1'. Prevent division by zero FIXED-IN: 5.1.4 M +2 -2 kmymoney/dialogs/kcurrencycalculator.cpp https://invent.kde.org/office/kmymoney/commit/4d5599ca64795245a2f5fa4d4e5203364c74619c |