Bug 448955 - skrooge-2.26.1: (2) segmentation fault with std::unique_ptr<char []> = {get() = 0x0}
Summary: skrooge-2.26.1: (2) segmentation fault with std::unique_ptr<char []> = {get()...
Status: RESOLVED DUPLICATE of bug 448954
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 25.1.0
Assignee: Guillaume DE BURE
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-01-22 13:58 UTC by James Beddek
Modified: 2022-02-15 10:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Beddek 2022-01-22 13:58:02 UTC
Application: skrooge (2.26.1)
 (Compiled from sources)
Qt Version: 5.15.2
Frameworks Version: 5.90.0
Operating System: Linux 5.16.0-gentoo x86_64
Windowing System: X11
Distribution: Gentoo Linux
DrKonqi: 5.23.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:

From a fresh install.
Creating a new account either via the default introductory page or by editing any information regarding bank accounts

Warnings in stdout: "[warn] epoll_wait: Bad file descriptor"

The crash can be reproduced every time.

-- Backtrace:
Application: Skrooge (skrooge), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  std::__atomic_base<int>::load(std::memory_order) const (this=0x4, __m=std::memory_order_relaxed) at /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/atomic_base.h:481
#6  QAtomicOps<int>::loadRelaxed<int>(std::atomic<int> const&) (_q_value=...) at ../../include/QtCore/../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/corelib/thread/qatomic_cxx11.h:239
#7  QBasicAtomicInteger<int>::loadRelaxed() const (this=0x4) at ../../include/QtCore/../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/corelib/thread/qbasicatomic.h:107
#8  QWeakPointer<QObject>::internalData() const (this=0x55bc510a6b20) at ../../include/QtCore/../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/corelib/tools/qsharedpointer_impl.h:698
#9  QPointer<QWidget>::data() const (this=0x55bc510a6b20) at ../../include/QtCore/../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/corelib/kernel/qpointer.h:77
#10 QPointer<QWidget>::operator->() const (this=0x55bc510a6b20) at ../../include/QtCore/../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/corelib/kernel/qpointer.h:79
#11 QScrollArea::ensureWidgetVisible(QWidget*, int, int) (this=this@entry=0x55bc510b3950, childWidget=0x55bc51ed5e70, xmargin=xmargin@entry=50, ymargin=ymargin@entry=50) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qscrollarea.cpp:474
#12 0x00007f4d41164d24 in QScrollArea::focusNextPrevChild(bool) (this=0x55bc510b3950, next=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qscrollarea.cpp:428
#13 0x00007f4d4100d369 in QWidget::focusNextPrevChild(bool) (this=0x55bc510b1570, next=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:6561
#14 0x00007f4d4100d369 in QWidget::focusNextPrevChild(bool) (this=0x55bc510b1860, next=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:6561
#15 0x00007f4d4100d369 in QWidget::focusNextPrevChild(bool) (this=0x55bc51fc0e10, next=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:6561
#16 0x00007f4d4100d369 in QWidget::focusNextPrevChild(bool) (this=0x55bc51a176b0, next=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:6561
#17 0x00007f4d4100d369 in QWidget::focusNextPrevChild(bool) (this=0x55bc521dd9f0, next=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:6561
#18 0x00007f4d410056cf in QWidget::focusNextChild() (this=0x55bc521dd9f0) at .moc/../../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.h:689
#19 QWidgetPrivate::setEnabled_helper(bool) (this=0x55bc521dda30, enable=false) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:3236
#20 0x00007f4d150d6ac9 in SKGBankPluginWidget::onAccountCreatorModified() (this=0x55bc51fc0e10) at /usr/src/debug/app-office/skrooge-2.26.1/skrooge-2.26.1/plugins/skrooge/skrooge_bank/skgbankpluginwidget.cpp:460
#21 0x00007f4d40621c1b in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x55bc51c6dc50, r=0x55bc51fc0e10, a=0x7ffccb6ce070) at ../../include/QtCore/../../../qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qobjectdefs_impl.h:398
#22 doActivate<false>(QObject*, int, void**) (sender=0x55bc5131efe0, signal_index=7, argv=0x7ffccb6ce070) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qobject.cpp:3886
#23 0x00007f4d410d4379 in QComboBox::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x0, _c=<optimized out>, _id=<optimized out>, _a=0x7ffccb6ce180) at .moc/moc_qcombobox.cpp:502
#24 0x00007f4d40621d30 in doActivate<false>(QObject*, int, void**) (sender=0x55bc51e33200, signal_index=7, argv=0x7ffccb6ce180) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qobject.cpp:3898
#25 0x00007f4d41111b6c in QLineEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55bc51e33200, _c=<optimized out>, _id=<optimized out>, _a=0x7ffccb6ce2a0) at .moc/moc_qlineedit.cpp:446
#26 0x00007f4d40621d30 in doActivate<false>(QObject*, int, void**) (sender=0x55bc51e33250, signal_index=6, argv=0x7ffccb6ce2a0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qobject.cpp:3898
#27 0x00007f4d41113906 in QWidgetLineControl::textChanged(QString const&) (this=0x55bc51e33250, _t1=...) at .moc/moc_qwidgetlinecontrol_p.cpp:273
#28 QWidgetLineControl::finishChange(int, bool, bool) (this=this@entry=0x55bc51e33250, validateFromState=<optimized out>, validateFromState@entry=-1, update=<optimized out>, edited=false) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qwidgetlinecontrol.cpp:736
#29 0x00007f4d41114cde in QWidgetLineControl::internalSetText(QString const&, int, bool) (this=0x55bc51e33250, txt=..., pos=-1, edited=false) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qwidgetlinecontrol.cpp:772
#30 0x00007f4d4110a7e3 in QWidgetLineControl::setText(QString const&) (this=0x55bc51e33250, txt=<optimized out>) at ../../include/QtWidgets/5.15.2/QtWidgets/private/../../../../../../qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qwidgetlinecontrol_p.h:251
#31 QLineEditPrivate::setText(QString const&) (this=<optimized out>, text=...) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qlineedit_p.cpp:277
#32 0x00007f4d410ce3e0 in QComboBoxPrivate::_q_rowsRemoved(QModelIndex const&, int, int) (this=0x55bc5152cf50, parent=<optimized out>) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qcombobox.cpp:1219
#33 0x00007f4d410d4959 in QComboBox::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x0, _c=<optimized out>, _id=50, _a=0x7ffccb6ce560) at .moc/moc_qcombobox.cpp:309
#34 0x00007f4d40621d30 in doActivate<false>(QObject*, int, void**) (sender=0x55bc51c93310, signal_index=15, argv=0x7ffccb6ce560) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qobject.cpp:3898
#35 0x00007f4d405a568b in QAbstractItemModel::rowsRemoved(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) (this=0x55bc51c93310, _t1=..., _t2=0, _t3=<optimized out>, _t4=...) at .moc/moc_qabstractitemmodel.cpp:606
#36 QAbstractItemModel::endRemoveRows() (this=0x55bc51c93310) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/itemmodels/qabstractitemmodel.cpp:2835
#37 0x00007f4d40c4fbf1 in QStandardItemModel::removeRows(int, int, QModelIndex const&) (this=<optimized out>, row=1374510704, count=50, parent=<optimized out>) at /usr/src/debug/dev-qt/qtgui-5.15.2-r16/qtbase-38ad2f39daec09168728033969265834b6a2d924/src/gui/itemmodels/qstandarditemmodel.cpp:2994
#38 0x00007f4d410d2c0e in QComboBox::clear() (this=0x55bc5131efe0) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/widgets/qcombobox.cpp:3049
#39 0x00007f4d41763510 in SKGMainPanel::fillWithDistinctValue(QList<QWidget*> const&, SKGDocument*, QString const&, QString const&, QString const&, bool) (iWidgets=<optimized out>, iDoc=<optimized out>, iTable=<optimized out>, iAttribut=<optimized out>, iWhereClause=<optimized out>, iAddoperators=false) at /usr/src/debug/app-office/skrooge-2.26.1/skrooge-2.26.1/skgbasegui/skgmainpanel.cpp:2599
#40 0x00007f4d150d731b in SKGBankPluginWidget::dataModified(QString const&, int, bool) (this=0x55bc51fc0e10, iTableName=..., iIdTransaction=<optimized out>, iLightTransaction=<optimized out>) at /usr/src/debug/app-office/skrooge-2.26.1/skrooge-2.26.1/plugins/skrooge/skrooge_bank/skgbankpluginwidget.cpp:786
#41 0x00007f4d40616ab9 in QObject::event(QEvent*) (this=0x55bc51fc0e10, e=0x55bc51fe13d0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qobject.cpp:1314
#42 0x00007f4d410121f6 in QWidget::event(QEvent*) (this=0x55bc51fc0e10, event=0x55bc51fe13d0) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qwidget.cpp:9081
#43 0x00007f4d40fd73e0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, this@entry=0x55bc50a52890, receiver=receiver@entry=0x55bc51fc0e10, e=e@entry=0x55bc51fe13d0) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qapplication.cpp:3632
#44 0x00007f4d40fd874f in QApplication::notify(QObject*, QEvent*) (this=0x7ffccb6cef70, receiver=<optimized out>, e=0x55bc51fe13d0) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r12/qtbase-c9fde86b0a2440133bc08f4811b6ca793be47f0a/src/widgets/kernel/qapplication.cpp:2971
#45 0x00007f4d405eef40 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=receiver@entry=0x55bc51fc0e10, event=event@entry=0x55bc51fe13d0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qcoreapplication.cpp:1064
#46 0x00007f4d405efe72 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x55bc51fc0e10, event=0x55bc51fe13d0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qcoreapplication.cpp:1462
#47 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55bc50a14950) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qcoreapplication.cpp:1821
#48 0x00007f4d40642bf3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) (s=0x55bc50be4400) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#49 0x00007f4d3da4a4b3 in g_main_dispatch (context=<optimized out>) at ../glib-2.70.2/glib/gmain.c:3381
#50 g_main_context_dispatch (context=context@entry=0x7f4d20005000) at ../glib-2.70.2/glib/gmain.c:4099
#51 0x00007f4d3da4a832 in g_main_context_iterate (context=context@entry=0x7f4d20005000, block=<optimized out>, block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.70.2/glib/gmain.c:4175
#52 0x00007f4d3da4a8f0 in g_main_context_iteration (context=0x7f4d20005000, may_block=1) at ../glib-2.70.2/glib/gmain.c:4240
#53 0x00007f4d40642688 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55bc50beb2c0, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qeventdispatcher_glib.cpp:423
#54 0x00007f4d405eb766 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffccb6cee58, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qeventloop.cpp:139
#55 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffccb6cee58, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qeventloop.cpp:232
#56 0x00007f4d405ef5df in QCoreApplication::exec() () at /usr/src/debug/dev-qt/qtcore-5.15.2-r14/qtbase-f4ac0b55c37f2b594ffbe639db43dac365825c7c/src/corelib/kernel/qcoreapplication.cpp:1375
#57 0x000055bc4f822153 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/app-office/skrooge-2.26.1/skrooge-2.26.1/skrooge/main.cpp:203
[Inferior 1 (process 104919) detached]

Possible duplicates by query: bug 407271, bug 407271.

Reported using DrKonqi
Comment 1 James Beddek 2022-01-22 13:58:50 UTC
Possible duplicate to my earlier report, but a different backtrace. https://bugs.kde.org/show_bug.cgi?id=448954
Comment 2 Stephane MANKOWSKI 2022-01-22 21:09:03 UTC
Hi,
This call stack is strange.
The issue could be due to a bad alignment between  libraries.
Could you rebuild skrooge and test again ?
Comment 3 James Beddek 2022-01-23 00:44:32 UTC
(In reply to Stephane MANKOWSKI from comment #2)
> Hi,
> This call stack is strange.
> The issue could be due to a bad alignment between  libraries.
> Could you rebuild skrooge and test again ?

I can reproduce this after rebuilding. I tried out asan/ubsan but that showed nothing too.
Comment 4 James Beddek 2022-01-23 00:55:55 UTC
This stack seems to have a little more info:

* thread #1, name = 'skrooge', stop reason = signal SIGSEGV: invalid address (fault address: 0x4)
  * frame #0: 0x00007ffff78fcd5f libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(QWidget*, int, int) [inlined] std::__atomic_base<int>::load(this=0x0000000000000004, __m=memory_order_relaxed) const at atomic_base.h:481:9 [opt]
    frame #1: 0x00007ffff78fcd5f libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(QWidget*, int, int) [inlined] int QAtomicOps<int>::loadRelaxed<int>(_q_value=0x0000000000000004) at qatomic_cxx11.h:239:25 [opt]
    frame #2: 0x00007ffff78fcd5f libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(QWidget*, int, int) [inlined] QBasicAtomicInteger<int>::loadRelaxed(this=0x0000000000000004) const at qbasicatomic.h:107:45 [opt]
    frame #3: 0x00007ffff78fcd5f libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(QWidget*, int, int) [inlined] QWeakPointer<QObject>::internalData(this=0x00005555560f9b30) const at qsharedpointer_impl.h:698:45 [opt]
    frame #4: 0x00007ffff78fcd58 libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(QWidget*, int, int) [inlined] QPointer<QWidget>::data(this=0x00005555560f9b30) const at qpointer.h:77:33 [opt]
    frame #5: 0x00007ffff78fcd58 libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(QWidget*, int, int) [inlined] QPointer<QWidget>::operator->(this=0x00005555560f9b30) const at qpointer.h:79:14 [opt]
    frame #6: 0x00007ffff78fcd58 libQt5Widgets.so.5`QScrollArea::ensureWidgetVisible(this=0x0000555555d56550, childWidget=0x0000555556ae2b70, xmargin=50, ymargin=50) at qscrollarea.cpp:474:10 [opt]
    frame #7: 0x00007ffff78fcd24 libQt5Widgets.so.5`QScrollArea::focusNextPrevChild(this=0x0000555555d56550, next=<unavailable>) at qscrollarea.cpp:428:13 [opt]
    frame #8: 0x00007ffff77a5369 libQt5Widgets.so.5`QWidget::focusNextPrevChild(this=0x00005555568216a0, next=<unavailable>) at qwidget.cpp:6561:19 [opt]
    frame #9: 0x00007ffff77a8b47 libQt5Widgets.so.5`QWidgetPrivate::hide_helper(this=0x0000555556647fc0) at qwidget.cpp:7957:20 [opt]
    frame #10: 0x00007ffff77a917a libQt5Widgets.so.5`QWidgetPrivate::setVisible(this=0x0000555556647fc0, visible=<unavailable>) at qwidget.cpp:8133:17 [opt]
    frame #11: 0x00007ffff7ee75de libskgbasegui.so.2`SKGMainPanel::refresh(this=0x0000555555bbbf20) at skgmainpanel.cpp:1653:26 [opt]
Comment 5 James Beddek 2022-02-15 10:54:20 UTC
Closing as duplicate of https://bugs.kde.org/show_bug.cgi?id=448954

*** This bug has been marked as a duplicate of bug 448954 ***