crash in new ledger

Jack ostroffjh at users.sourceforge.net
Fri Jul 8 17:33:28 BST 2022


On 2022.07.08 03:11, thb--- via KMyMoney-devel wrote:
> Jack via KMyMoney-devel schrieb am 07.07.2022 19:16 (GMT +02:00):
> 
>> I got several of these over the past days, but didn't report yet, as  
>> I wasn't sure I was on absolute latest.  I just recompiled from git  
>> master head, and get this (consistently) when saving an investment  
>> transaction, where I had changed the security.  Let me know if there  
>> is any other information which might be helpful.
> 
> Thanks for reporting. Despite all the details I have a problem to see  
> where this happens. Mainly, because the backtrace does not (always)  
> match my version of current master :(  It would be great, if you  
> could simply specify the commit hash you are on in the future.
> 
> I am on 462fb8d2df6 and investtransactioneditor.cpp:1212 shows this  
> for me
I am also on this - kmymoney -v shows "kmymoney 5.1.80-462fb8d2d" and  
here is a new BT

Thread 1 "kmymoney" received signal SIGFPE, Arithmetic exception.
0x00007ffff55b4e1c in ?? () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff55b4e1c in  () at /lib64/libc.so.6
#1  0x00007ffff5567a12 in raise () at /lib64/libc.so.6
#2  0x00007ffff6f8c867 in __gmp_exception () at /usr/lib64/libgmp.so.10
#3  0x00007ffff6f8c88e in  () at /usr/lib64/libgmp.so.10
#4  0x00007ffff6fa6ab5 in __gmpq_div () at /usr/lib64/libgmp.so.10
#5  0x00007ffff76e1402 in AlkValue::operator/(AlkValue const&) const ()  
at /usr/lib64/libalkimia5.so.8
#6  0x00007ffff79e93c6 in MyMoneyMoney::operator/(MyMoneyMoney const&)  
const (this=this at entry=0x7fffffffc3e0, _b=...)
     at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/mymoney/mymoneymoney.cpp:349
#7  0x00005555556c2705 in  
InvestTransactionEditor::saveTransaction(QStringList const&)  
(this=this at entry=0x55555e83f350, selectedJournalEntries=...)
     at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/views/investtransactioneditor.cpp:1215
#8  0x00005555556a8f60 in JournalDelegate::setModelData(QWidget*,  
QAbstractItemModel*, QModelIndex const&) const (this=0x55555ab43b90,  
editWidget=<optimized out>, model=<optimized out>, index=<optimized  
out>)
     at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/views/journaldelegate.cpp:653
#9  0x00007ffff7be1bd4 in DelegateProxy::setModelData(QWidget*,  
QAbstractItemModel*, QModelIndex const&) const (this=<optimized out>,  
editor=0x55555e83f350, model=0x55555e3a17f0, index=...)
     at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/models/delegateproxy.cpp:141
#10 0x00007ffff6be2dff in QAbstractItemView::commitData(QWidget*) () at  
/usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff5eb438e in  () at /usr/lib64/libQt5Core.so.5
#12 0x00007ffff6c015ff in QAbstractItemDelegate::commitData(QWidget*)  
() at /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff7be253d in  
QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,  
QtPrivate::List<QWidget*>, void, void  
(QAbstractItemDelegate::*)(QWidget*)>::call(void  
(QAbstractItemDelegate::*)(QWidget*), QAbstractItemDelegate*, void**)  
(arg=<optimized out>, o=<optimized out>, f=<optimized out>) at  
/usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#14 QtPrivate::FunctionPointer<void  
(QAbstractItemDelegate::*)(QWidget*)>::call<QtPrivate::List<QWidget*>,  
void>(void (QAbstractItemDelegate::*)(QWidget*),  
QAbstractItemDelegate*, void**)
     (arg=<optimized out>, o=<optimized out>, f=<optimized out>) at  
/usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#15 QtPrivate::QSlotObject<void (QAbstractItemDelegate::*)(QWidget*),  
QtPrivate::List<QWidget*>, void>::impl(int,  
QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
     (which=<optimized out>, this_=<optimized out>, r=<optimized out>,  
a=<optimized out>, ret=<optimized out>) at  
/usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#16 0x00007ffff5eb45f6 in  () at /usr/lib64/libQt5Core.so.5
#17 0x00007ffff6c015ff in QAbstractItemDelegate::commitData(QWidget*)  
() at /usr/lib64/libQt5Widgets.so.5
#18 0x00005555556a8cfa in JournalDelegate::endEdit()  
(this=0x55555ab43b90) at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/views/journaldelegate.cpp:618
#19 0x00005555556ab4e2 in  
QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>,  
void, void (JournalDelegate::*)()>::call(void (JournalDelegate::*)(),  
JournalDelegate*, void**)
     (arg=<optimized out>, o=<optimized out>, f=<optimized out>) at  
/usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#20 QtPrivate::FunctionPointer<void  
(JournalDelegate::*)()>::call<QtPrivate::List<>, void>(void  
(JournalDelegate::*)(), JournalDelegate*, void**) (arg=<optimized out>,  
o=<optimized out>, f=<optimized out>)
     at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#21 QtPrivate::QSlotObject<void (JournalDelegate::*)(),  
QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*,  
QObject*, void**, bool*)
     (which=<optimized out>, this_=<optimized out>, r=<optimized out>,  
a=<optimized out>, ret=<optimized out>) at  
/usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#22 0x00007ffff5eb45f6 in  () at /usr/lib64/libQt5Core.so.5
#23 0x000055555560f0c4 in TransactionEditorBase::done()  
(this=<optimized out>)
     at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999_build/kmymoney/views/views_autogen/EWIEGA46WW/moc_transactioneditorbase.cpp:151
#24 0x00005555556b5ebd in operator() (__closure=<optimized out>) at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/views/investtransactioneditor.cpp:887
#25 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>,  
void, InvestTransactionEditor::InvestTransactionEditor(QWidget*, const  
QString&)::<lambda()> >::call (arg=<optimized out>, f=<optimized out>)
     at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#26  
QtPrivate::Functor<InvestTransactionEditor::InvestTransactionEditor(QWidget*,  
const QString&)::<lambda()>, 0>::call<QtPrivate::List<>, void>  
(arg=<optimized out>, f=<optimized out>)
     at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#27  
QtPrivate::QFunctorSlotObject<InvestTransactionEditor::InvestTransactionEditor(QWidget*,  
const QString&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int,  
QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
     (which=<optimized out>, this_=<optimized out>, r=<optimized out>,  
a=<optimized out>, ret=<optimized out>) at  
/usr/include/qt5/QtCore/qobjectdefs_impl.h:443
#28 0x00007ffff5eb45f6 in  () at /usr/lib64/libQt5Core.so.5
#29 0x00007ffff6a5a1b2 in QAbstractButton::clicked(bool) () at  
/usr/lib64/libQt5Widgets.so.5
#30 0x00007ffff6a5a41a in  () at /usr/lib64/libQt5Widgets.so.5
#31 0x00007ffff6a5c040 in  () at /usr/lib64/libQt5Widgets.so.5
#32 0x00007ffff6a5c277 in  
QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at  
/usr/lib64/libQt5Widgets.so.5
#33 0x00007ffff6b5aa7a in QToolButton::mouseReleaseEvent(QMouseEvent*)  
() at /usr/lib64/libQt5Widgets.so.5
#34 0x00007ffff69a6d4e in QWidget::event(QEvent*) () at  
/usr/lib64/libQt5Widgets.so.5
#35 0x00007ffff69639af in QApplicationPrivate::notify_helper(QObject*,  
QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#36 0x00007ffff696b84a in QApplication::notify(QObject*, QEvent*) () at  
/usr/lib64/libQt5Widgets.so.5
#37 0x00007ffff5e80b38 in QCoreApplication::notifyInternal2(QObject*,  
QEvent*) () at /usr/lib64/libQt5Core.so.5
#38 0x00007ffff696a31d in QApplicationPrivate::sendMouseEvent(QWidget*,  
QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool,  
bool) () at /usr/lib64/libQt5Widgets.so.5
#39 0x00007ffff69c07ba in  () at /usr/lib64/libQt5Widgets.so.5
#40 0x00007ffff69c39d5 in  () at /usr/lib64/libQt5Widgets.so.5
#41 0x00007ffff69639af in QApplicationPrivate::notify_helper(QObject*,  
QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#42 0x00007ffff5e80b38 in QCoreApplication::notifyInternal2(QObject*,  
QEvent*) () at /usr/lib64/libQt5Core.so.5
#43 0x00007ffff631a450 in  
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)  
() at /usr/lib64/libQt5Gui.so.5
#44 0x00007ffff62f9b6b in  
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)  
() at /usr/lib64/libQt5Gui.so.5
#45 0x00007fffe4d820ca in  () at /usr/lib64/libQt5XcbQpa.so.5
#46 0x00007ffff3d9160b in g_main_context_dispatch () at  
/usr/lib64/libglib-2.0.so.0
#47 0x00007ffff3d918c8 in  () at /usr/lib64/libglib-2.0.so.0
#48 0x00007ffff3d9197f in g_main_context_iteration () at  
/usr/lib64/libglib-2.0.so.0
#49 0x00007ffff5ed2e54 in  
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)  
() at /usr/lib64/libQt5Core.so.5
#50 0x00007ffff5e7f51b in  
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at  
/usr/lib64/libQt5Core.so.5
#51 0x00007ffff5e87b7d in QCoreApplication::exec() () at  
/usr/lib64/libQt5Core.so.5
#52 0x00005555555d7022 in runKMyMoney(QApplication&, QUrl const&, bool)  
(a=..., file=..., noFile=noFile at entry=false) at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/main.cpp:385
#53 0x00005555555d85dc in main(int, char**) (argc=<optimized out>,  
argv=<optimized out>) at  
/var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/main.cpp:294
> 
>     if (d->currentActivity->type() !=  
> eMyMoney::Split::InvestmentTransactionType::SplitShares) {
> 
> The problem though, as Jeremy already pointed out, is a div by zero  
> but on (my) line 1212 there is no division at all. The only one in  
> the vicinity is three lines further down and shows
> 
>   d->stockSplit.setPrice(d->stockSplit.value() /  
> d->stockSplit.shares());
> 
> which only gets used for a stock split transaction and price mode set  
> to PricePerTransaction.
Well, the BT does now point to this line, and I do have  
PricePerTransaction set, but this is a dividend transaction, not a  
split.  However, is this for a stock split, or if the transaction is  
NOT a stock split?  Is there a  wrong test in that "if"?
> 
> BTW: I am on commit 462fb8d2df6
> 
> > Separate but related, and I'll add to Issue 61 later, closed  
> accounts,
> > when shown, are not shown crossed out, in security dropdown, but  
> also
> > on Favorite accounts on Home View.
> 
> I'll take a look.
> 
> [... bt removed ... ]
> 
> Thomas
> 



More information about the KMyMoney-devel mailing list