Application: kmymoney (5.1.3) Qt Version: 5.15.6 Frameworks Version: 5.98.0 Operating System: Linux 5.19.0-28-generic x86_64 Windowing System: X11 Distribution: Ubuntu 22.10 DrKonqi: 5.25.5 [KCrashBackend] -- Information about the crash: I enter the BTC and the pop up ask me to confirm the FIAT equivalent (in my case Swiss francs) but with 0 proposed as an amount. Usually it proposes something +/- equivalent to the rates downloaded with the Tools menu The crash can be reproduced every time. -- Backtrace: Application: KMyMoney (kmymoney), signal: Floating point exception [KCrash Handler] #4 __pthread_kill_implementation (no_tid=0, signo=8, threadid=<optimized out>) at ./nptl/pthread_kill.c:44 #5 __pthread_kill_internal (signo=8, threadid=<optimized out>) at ./nptl/pthread_kill.c:78 #6 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=8) at ./nptl/pthread_kill.c:89 #7 0x00007fa07443bc46 in __GI_raise (sig=8) at ../sysdeps/posix/raise.c:26 #8 0x00007fa0752b399d in __gmp_exception () from /lib/x86_64-linux-gnu/libgmp.so.10 #9 0x00007fa0752b39e4 in __gmp_divide_by_zero () from /lib/x86_64-linux-gnu/libgmp.so.10 #10 0x00007fa0752d33bd in __gmpq_div () from /lib/x86_64-linux-gnu/libgmp.so.10 #11 0x00007fa07994c226 in AlkValue::operator/(AlkValue const&) const () from /lib/x86_64-linux-gnu/libalkimia5.so.7 #12 0x00007fa076b2d780 in MyMoneyMoney::operator/(MyMoneyMoney const&) const () from /lib/x86_64-linux-gnu/libkmm_mymoney.so.5 #13 0x000055a882ba0eb7 in ?? () #14 0x00007fa074ef36ff in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #15 0x00007fa0760b5656 in QLineEdit::textChanged(QString const&) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007fa074ef372c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #17 0x00007fa0760bce69 in QWidgetLineControl::textChanged(QString const&) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007fa0760c0590 in QWidgetLineControl::finishChange(int, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007fa0760c32c4 in QWidgetLineControl::processKeyEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #20 0x00007fa0760b5843 in QLineEdit::keyPressEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007fa079cd05bb in AmountEdit::keyPressEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libkmm_widgets.so.5 #22 0x00007fa075faf94a in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007fa075f6bf32 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007fa075f73f37 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #25 0x00007fa074ebae38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #26 0x00007fa075fcb4e2 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #27 0x00007fa075f6bf32 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #28 0x00007fa074ebae38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #29 0x00007fa07573e41d in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #30 0x00007fa07571663c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #31 0x00007fa06ead578e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #32 0x00007fa072b9c4f9 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #33 0x00007fa072bf1228 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #34 0x00007fa072b99cb0 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #35 0x00007fa074f14aea in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #36 0x00007fa074eb97cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #37 0x00007fa07617b497 in QDialog::exec() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #38 0x000055a882b9d3db in ?? () #39 0x000055a882c001f7 in ?? () #40 0x000055a882b9e3ba in ?? () #41 0x000055a882beab41 in ?? () #42 0x000055a882ace1f5 in ?? () #43 0x00007fa074ef36ff in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #44 0x00007fa075f65536 in QAction::triggered(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #45 0x00007fa075f681f3 in QAction::activate(QAction::ActionEvent) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #46 0x00007fa074ef36ff in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #47 0x000055a882b90b33 in ?? () #48 0x00007fa074ee7b30 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #49 0x00007fa075f6bf32 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #50 0x00007fa074ebae38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #51 0x00007fa074ebdeb1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #52 0x00007fa074f15427 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #53 0x00007fa072b9c4f9 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #54 0x00007fa072bf1228 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #55 0x00007fa072b99cb0 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #56 0x00007fa074f14aea in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #57 0x00007fa074eb97cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #58 0x00007fa074ec1c2a in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #59 0x000055a882a8428b in ?? () #60 0x00007fa074423510 in __libc_start_call_main (main=main@entry=0x55a882a82530, argc=argc@entry=1, argv=argv@entry=0x7ffcd5531658) at ../sysdeps/nptl/libc_start_call_main.h:58 #61 0x00007fa0744235c9 in __libc_start_main_impl (main=0x55a882a82530, argc=1, argv=0x7ffcd5531658, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcd5531648) at ../csu/libc-start.c:381 #62 0x000055a882a858e5 in ?? () [Inferior 1 (process 2503) detached] Reported using DrKonqi
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