Skip to content

Using a Id <= 0 will crash latter on

Carl Schwan requested to merge work/carl/more-error-tollerance into master

So also catch this case early instead of only Id == 0

Backtrace from Tobias:

Application: Posteo (fella@posteo.de) (akonadi_imap_resource), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  0x00007fe82fb9fc4c in __pthread_kill_implementation () at /lib64/libc.so.6
#6  0x00007fe82fb4f9c6 in raise () at /lib64/libc.so.6
#7  0x00007fe82fb397f4 in abort () at /lib64/libc.so.6
#8  0x00007fe83001a4d5 in qt_message_output(QtMsgType, QMessageLogContext const&, QString const&) [clone .cold] () at /lib64/libQt5Core.so.5
#9  0x00007fe830019818 in qt_assert_x(char const*, char const*, char const*, int) () at /lib64/libQt5Core.so.5
#10 0x00007fe83237f390 in KIMAP::ImapSet::add(QVector<long long> const&) (this=0x7fffd9287de0, values=...) at /home/tobias/kde/src/kimap/src/imapset.cpp:240
#11 0x00007fe83237f0a0 in KIMAP::ImapSet::ImapSet(long long) (this=0x7fffd9287de0, value=-1) at /home/tobias/kde/src/kimap/src/imapset.cpp:194
#12 0x000055877d6c5201 in RetrieveItemTask::triggerFetchJob() ()
#13 0x00007fe8302449a6 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
#14 0x00007fe83196d3c2 in KJob::result(KJob*, KJob::QPrivateSignal) (this=0x55877f77f5e0, _t1=0x55877f77f5e0, _t2=...) at /home/tobias/kde/build/kcoreaddons/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:633
#15 0x00007fe83196ab07 in KJob::finishJob(bool) (this=0x55877f77f5e0, emitResult=true) at /home/tobias/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:98
#16 0x00007fe83196b6c3 in KJob::emitResult() (this=0x55877f77f5e0) at /home/tobias/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:338
#17 0x00007fe83238842c in KIMAP::Job::handleErrorReplies(KIMAP::Response const&) (this=0x55877f77f5e0, response=...) at /home/tobias/kde/src/kimap/src/job.cpp:72
#18 0x00007fe83239e990 in KIMAP::SelectJob::handleResponse(KIMAP::Response const&) (this=0x55877f77f5e0, response=...) at /home/tobias/kde/src/kimap/src/selectjob.cpp:222
#19 0x00007fe8323a18a5 in KIMAP::SessionPrivate::responseReceived(KIMAP::Response const&) (this=0x7fe80c02b7c0, response=...) at /home/tobias/kde/src/kimap/src/session.cpp:288
#20 0x00007fe8323a6817 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KIMAP::Response const&>, void, void (KIMAP::SessionPrivate::*)(KIMAP::Response const&)>::call(void (KIMAP::SessionPrivate::*)(KIMAP::Response const&), KIMAP::SessionPrivate*, void**) (f=(void (KIMAP::SessionPrivate::*)(class KIMAP::SessionPrivate * const, const struct KIMAP::Response &)) 0x7fe8323a1004 <KIMAP::SessionPrivate::responseReceived(KIMAP::Response const&)>, o=0x7fe80c02b7c0, arg=0x7fe7f4013108) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#21 0x00007fe8323a61f2 in QtPrivate::FunctionPointer<void (KIMAP::SessionPrivate::*)(KIMAP::Response const&)>::call<QtPrivate::List<KIMAP::Response const&>, void>(void (KIMAP::SessionPrivate::*)(KIMAP::Response const&), KIMAP::SessionPrivate*, void**) (f=(void (KIMAP::SessionPrivate::*)(class KIMAP::SessionPrivate * const, const struct KIMAP::Response &)) 0x7fe8323a1004 <KIMAP::SessionPrivate::responseReceived(KIMAP::Response const&)>, o=0x7fe80c02b7c0, arg=0x7fe7f4013108) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#22 0x00007fe8323a572b in QtPrivate::QSlotObject<void (KIMAP::SessionPrivate::*)(KIMAP::Response const&), QtPrivate::List<KIMAP::Response const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55877f7801d0, r=0x7fe80c02b7c0, a=0x7fe7f4013108, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#23 0x00007fe83023bc44 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#24 0x00007fe830e0cd02 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#25 0x00007fe8302111c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#26 0x00007fe830214534 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt5Core.so.5
#27 0x00007fe830262537 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#28 0x00007fe82ea8afaf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#29 0x00007fe82eae02c8 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#30 0x00007fe82ea88940 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#31 0x00007fe83026202a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#32 0x00007fe83020fc1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#33 0x00007fe830217ce2 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#34 0x00007fe831f839e0 in Akonadi::ResourceBase::init(Akonadi::ResourceBase&) (r=...) at /home/tobias/kde/src/akonadi/src/agentbase/resourcebase.cpp:555
#35 0x000055877d685a09 in main ()
[Inferior 1 (process 28148) detached]

Merge request reports