https://bugs.kde.org/show_bug.cgi?id=525318
Bug ID: 525318
Summary: Typing 't' into the date field of a new transaction
causes SEGV
Classification: Applications
Product: kmymoney
Version First 5.2.0
Reported In:
Platform: openSUSE
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
I've just upgraded openSUSE to 16.0, which upgraded kmymoney to version 5.2.0,
and have encountered a reproducible crash when entering new transaction data.
In previous versions, I could type 't' in the date field to have kmymoney fill
in the current date. Now, this causes a crash.
STEPS TO REPRODUCE
1. I've opened an existing kmymoney data file. From the home page, I've
clicked the link to an asset register called "Cash". kmymoney shows the cash
ledger.
2. I press Ctrl+Shift+Insert to bring up the data entry form for a new
transaction
3. The date field is initially empty. I click within the date field's text
entry area to give it focus, then press 't'.
4. Kmymoney SEGVs with the following backtrace:
----------------------
(gdb) bt
#0 MyMoneyTransaction::splits (this=0x0)
at /usr/src/debug/kmymoney-5.2.0/kmymoney/mymoney/mymoneytransaction.cpp:98
#1 0x0000555555802504 in
MultiTransactionEditor::Private::postdateChanged(QDate const&) [clone .isra.0]
(this=0x555560bb2f30, date=...)
at
/usr/src/debug/kmymoney-5.2.0/kmymoney/views/multitransactioneditor.cpp:220
#2 0x00007ffff540b499 in QtPrivate::QSlotObjectBase::call
(a=0x7fffffffc770, r=<optimized out>, this=0x555560d0a2b0, this=<optimized
out>, r=<optimized out>, a=<optimized out>)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobjectdefs_impl.h:461
#3 doActivate<false> (sender=0x555560c58950, signal_index=17,
argv=0x7fffffffc770)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:4146
#4 0x00007ffff7cca0c2 in QMetaObject::activate<void, QDate>
(ret=0x0, local_signal_index=0, mo=0x7ffff7d3eda0, sender=<optimized out>)
at /usr/include/qt6/QtCore/qobjectdefs.h:306
#5 KMyMoneyDateEdit::dateValidityChanged (this=<optimized out>, _t1=<optimized
out>)
at
/usr/src/debug/kmymoney-5.2.0/build/kmymoney/widgets/kmm_base_widgets_autogen/EWIEGA46WW/moc_kmymoneydateedit.cpp:155
#6 0x00007ffff7cfa05e in KMyMoneyDateEdit::keyPressEvent
(this=0x555560c58950, keyEvent=0x7fffffffcd40)
at /usr/src/debug/kmymoney-5.2.0/kmymoney/widgets/kmymoneydateedit.cpp:598
#7 0x00007ffff662f9e5 in QWidget::event (this=0x555560c58950,
event=0x7fffffffcd40)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qwidget.cpp:9020
#8 0x00007ffff65e060a in QApplicationPrivate::notify_helper
(this=this@entry=0x5555558cf650, receiver=receiver@entry=0x555560c58950,
e=e@entry=0x7fffffffcd40)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#9 0x00007ffff65e5872 in QApplication::notify
(this=<optimized out>, receiver=0x555560c58950, e=<optimized out>)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:2721
#10 0x00007ffff53b0e88 in QCoreApplication::notifyInternal2
(receiver=0x555560c58950, event=0x7fffffffcd40)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#11 0x00007ffff53b0eba in QCoreApplication::forwardEvent
(receiver=<optimized out>, event=<optimized out>,
originatingEvent=<optimized out>)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1121
#12 0x00007ffff664500e in QWidgetWindow::handleDragLeaveEvent
(event=<optimized out>, this=<optimized out>)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qwidgetwindow.cpp:1030
#13 QWidgetWindow::event (this=<optimized out>, event=0x7fffffffcd40)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qwidgetwindow.cpp:331
#14 0x00007ffff65e060a in QApplicationPrivate::notify_helper
(this=<optimized out>, receiver=0x555555e93100, e=0x7fffffffcd40)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#15 0x00007ffff53b0e88 in QCoreApplication::notifyInternal2
(receiver=0x555555e93100, event=0x7fffffffcd40)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#16 0x00007ffff53b14cd in QCoreApplication::sendSpontaneousEvent
(receiver=<optimized out>, event=<optimized out>)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1560
#17 0x00007ffff5c18243 in QGuiApplicationPrivate::processKeyEvent
(e=0x555560baa180)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qguiapplication.cpp:2615
#18 0x00007ffff5c75d9c in QWindowSystemInterface::sendWindowSystemEvents
(flags=flags@entry=...)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qwindowsysteminterface.cpp:1113
#19 0x00007ffff5c75f07 in QWindowSystemInterface::flushWindowSystemEvents
(flags=...)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qwindowsysteminterface.cpp:1082
#20 0x00007ffff53fb96f in QObject::event (this=0x55555593f100,
e=0x7fffd0001a10)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1431
#21 0x00007ffff65e060a in QApplicationPrivate::notify_helper
(this=<optimized out>, receiver=0x55555593f100, e=0x7fffd0001a10)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#22 0x00007ffff53b0e88 in QCoreApplication::notifyInternal2
(receiver=0x55555593f100, event=0x7fffd0001a10)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#23 0x00007ffff53b0ecd in QCoreApplication::sendEvent
(receiver=<optimized out>, event=<optimized out>)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1546
#24 0x00007ffff53b1207 in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x55555592da90)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1879
#25 0x00007ffff55f4af7 in postEventSourceDispatch (s=s@entry=0x555555a32a10)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#26 0x00007fffe7b02f40 in g_main_dispatch (context=0x7fffd8000f00) at
../glib/gmain.c:3398
#27 g_main_context_dispatch_unlocked (context=context@entry=0x7fffd8000f00)
at ../glib/gmain.c:4249
#28 0x00007fffe7b04bb8 in g_main_context_iterate_unlocked
(context=context@entry=0x7fffd8000f00, block=block@entry=1,
dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4314
#29 0x00007fffe7b0536c in g_main_context_iteration (context=0x7fffd8000f00,
may_block=1)
at ../glib/gmain.c:4379
#30 0x00007ffff55f20c0 in QEventDispatcherGlib::processEvents
(this=0x5555558ddf30, flags=...)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#31 0x00007ffff53bb07b in QEventLoop::exec (this=0x7fffffffd260, flags=...)
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qflags.h:77
#32 0x00007ffff53b4888 in QCoreApplication::exec ()
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qflags.h:77
#33 0x00007ffff5c10790 in QGuiApplication::exec ()
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qguiapplication.cpp:1986
#34 0x00007ffff65dc6b9 in QApplication::exec ()
at
/usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:2570
#35 0x000055555580c78e in runKMyMoney(QApplication&, QUrl const&, bool) [clone
.isra.0]
(file=..., noFile=noFile@entry=false, a=<optimized out>)
at /usr/src/debug/kmymoney-5.2.0/kmymoney/main.cpp:366
#36 0x0000555555636a3a in main (argc=<optimized out>, argv=<optimized out>)
at /usr/src/debug/kmymoney-5.2.0/kmymoney/main.cpp:273
----------------------
The offending line appears to be
(gdb) up
Downloading 29.12 K source file
/usr/src/debug/kmymoney-5.2.0/kmymoney/views/multitransactioneditor.cpp
#1 0x0000555555802504 in
MultiTransactionEditor::Private::postdateChanged(QDate const&) [clone .isra.0]
(this=0x555560bb2f30, date=...)
at
/usr/src/debug/kmymoney-5.2.0/kmymoney/views/multitransactioneditor.cpp:220
220 const auto splits = journalEntry.transaction().splits();
(gdb) p journalEntry.transaction()
Cannot evaluate function -- may be inlined
(gdb) p journalEntry
$1 = {
m_id = {
d = {
d = 0x0,
ptr = 0x0,
size = 0
},
static _empty = 0 u'\000'
},
m_transaction = {
value = {
ptr = 0x0
},
d = 0x0
},
m_split = {
<MyMoneyObject> = {
_vptr.MyMoneyObject = 0x7ffff7a40b10 <vtable for MyMoneySplit+16>,
d_ptr = 0x555560a91790
},
<MyMoneyKeyValueContainer> = {
_vptr.MyMoneyKeyValueContainer = 0x7ffff7a40b30 <vtable for
MyMoneySplit+48>,
d_ptr = 0x5555607213d0
}, <No data fields>},
m_balance = {
<AlkValue> = {
d = {
d = {
ptr = 0x555555938ee0
}
}
},
members of MyMoneyMoney:
_vptr.MyMoneyMoney = 0x555555899fa8 <vtable for MyMoneyMoney+16>,
static maxValue = {
<AlkValue> = {
d = {
d = {
ptr = 0x555555938fe0
}
}
},
members of MyMoneyMoney:
_vptr.MyMoneyMoney = 0x555555899fa8 <vtable for MyMoneyMoney+16>,
static maxValue = <same as static member of an already seen type>,
static minValue = {
--Type <RET> for more, q to quit, c to continue without paging--c
<AlkValue> = {
d = {
d = {
ptr = 0x5555559393d0
}
}
},
members of MyMoneyMoney:
_vptr.MyMoneyMoney = 0x555555899fa8 <vtable for MyMoneyMoney+16>,
static maxValue = <same as static member of an already seen type>,
static minValue = <same as static member of an already seen type>,
static autoCalc = {
<AlkValue> = {
d = {
d = {
ptr = 0x555555939400
}
}
},
members of MyMoneyMoney:
_vptr.MyMoneyMoney = 0x555555899fa8 <vtable for MyMoneyMoney+16>,
static maxValue = <same as static member of an already seen type>,
static minValue = <same as static member of an already seen type>,
static autoCalc = <same as static member of an already seen type>,
static ONE = {
<AlkValue> = {
d = {
d = {
ptr = 0x555555938f10
}
}
},
members of MyMoneyMoney:
_vptr.MyMoneyMoney = 0x555555899fa8 <vtable for MyMoneyMoney+16>,
static maxValue = <same as static member of an already seen type>,
static minValue = <same as static member of an already seen type>,
static autoCalc = <same as static member of an already seen type>,
static ONE = <same as static member of an already seen type>,
static MINUS_ONE = {
<AlkValue> = {
d = {
d = {
ptr = 0x555555938f40
}
}
},
members of MyMoneyMoney:
_vptr.MyMoneyMoney = 0x555555899fa8 <vtable for MyMoneyMoney+16>,
static maxValue = <same as static member of an already seen
type>,
static minValue = <same as static member of an already seen
type>,
static autoCalc = <same as static member of an already seen
type>,
static ONE = <same as static member of an already seen type>,
static MINUS_ONE = <same as static member of an already seen
type>
}
},
static MINUS_ONE = <same as static member of an already seen type>
},
static ONE = <same as static member of an already seen type>,
static MINUS_ONE = <same as static member of an already seen type>
},
static autoCalc = <same as static member of an already seen type>,
static ONE = <same as static member of an already seen type>,
static MINUS_ONE = <same as static member of an already seen type>
},
static minValue = <same as static member of an already seen type>,
static autoCalc = <same as static member of an already seen type>,
static ONE = <same as static member of an already seen type>,
static MINUS_ONE = <same as static member of an already seen type>
},
m_linesInLedger = 0 '\000'
}
OBSERVED RESULT
Segmentation violation, due to a null pointer dereference.
EXPECTED RESULT
I expected kmymoney to fill in today's date.
SOFTWARE/OS VERSIONS
$ kinfo
Operating System: openSUSE Leap 16.0
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.12.0-160000.37-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Xeon® CPU W3520 @ 2.67GHz
Memory: 16.0 GiB of RAM (15.6 GiB usable)
Graphics Processor: AMD CEDAR
ADDITIONAL INFORMATION
I also tried an app-pack version, kmymoney-5.2-5969-linux-gcc-x86_64.appimage.
The same crash is reproducible there too.
--
You are receiving this mail because:
You are watching all bug changes.