Bug 408801

Summary: Crash while creating folders in the save as dialog
Product: [Frameworks and Libraries] frameworks-kio Reporter: Dmitry Ivanov <dm.vl.ivanov>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: crash CC: a.samirh78, aacid, faure, jaap.geurts, kdelibs-bugs, montel
Priority: NOR Keywords: drkonqi
Version: 5.59.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitry Ivanov 2019-06-16 19:03:19 UTC
Application: okular (1.7.2)

Qt Version: 5.12.3
Frameworks Version: 5.59.0
Operating System: Linux 4.18.0-21-generic x86_64
Distribution: KDE neon User Edition 5.16

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

I opened a pdf file attached to an e-mail from Thunderbird (so it got saved somewhere in /tmp/mozilla_<username> before opening in Okular), then selected "File" -> "Save As" and started to navigate to the folder in which I'd like to have the file saved within the dialog. During this navigation I created a couple of folders (folder and folder inside it) for the file. And right before I was ready to finally save the pdf file in the created folder Okular crashed.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fd08908b200 (LWP 17377))]

Thread 3 (Thread 0x7fd06e61d700 (LWP 17379)):
#0  0x00007fd084cf5bf9 in __GI___poll (fds=0x7fd0680127f0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fd07f7674c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fd07f7675dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fd085638dcb in QEventDispatcherGlib::processEvents (this=0x7fd068000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fd0855da03a in QEventLoop::exec (this=this@entry=0x7fd06e61cd70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007fd0854014ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6  0x00007fd085aa7015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fd085402c72 in QThreadPrivate::start (arg=0x7fd085d1ed80) at thread/qthread_unix.cpp:361
#8  0x00007fd081a986db in start_thread (arg=0x7fd06e61d700) at pthread_create.c:463
#9  0x00007fd084d0288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fd0772d5700 (LWP 17378)):
#0  0x00007fd084cf5bf9 in __GI___poll (fds=0x7fd0772d4ca8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fd08251b747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fd08251d36a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fd07a0bc578 in QXcbEventQueue::run (this=0x556169bf6bf0) at qxcbeventqueue.cpp:228
#4  0x00007fd085402c72 in QThreadPrivate::start (arg=0x556169bf6bf0) at thread/qthread_unix.cpp:361
#5  0x00007fd081a986db in start_thread (arg=0x7fd0772d5700) at pthread_create.c:463
#6  0x00007fd084d0288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fd08908b200 (LWP 17377)):
[KCrash Handler]
#6  0x00007fd0886efd16 in std::__atomic_base<int>::operator-- (this=0x21) at /usr/include/c++/7/bits/atomic_base.h:304
#7  QAtomicOps<int>::deref<int> (_q_value=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:271
#8  QBasicAtomicInteger<int>::deref (this=0x21) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:115
#9  QSharedDataPointer<KFileItemPrivate>::~QSharedDataPointer (this=0x55616a697b38, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qshareddata.h:89
#10 KFileItem::~KFileItem (this=0x55616a697b38, __in_chrg=<optimized out>) at ./src/core/kfileitem.h:47
#11 0x00007fd0887ae6a5 in QList<KFileItem>::node_destruct (this=0x55616a83a220, n=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:455
#12 QList<KFileItem>::erase (this=0x55616a83a220, it=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:539
#13 0x00007fd0887aec6a in KCoreDirListerCache::reinsert (this=this@entry=0x7fd088a113c0 <(anonymous namespace)::Q_QGS_kDirListerCache::innerFunction()::holder>, item=..., oldUrl=...) at ./src/core/kcoredirlister_p.h:309
#14 0x00007fd0887a3d4d in KCoreDirListerCache::processPendingUpdates (this=this@entry=0x7fd088a113c0 <(anonymous namespace)::Q_QGS_kDirListerCache::innerFunction()::holder>) at ./src/core/kcoredirlister.cpp:2014
#15 0x00007fd0887a4324 in KCoreDirListerCache::slotResult (this=0x7fd088a113c0 <(anonymous namespace)::Q_QGS_kDirListerCache::innerFunction()::holder>, j=<optimized out>) at ./src/core/kcoredirlister.cpp:1341
#16 0x00007fd08560b98f in QtPrivate::QSlotObjectBase::call (a=0x7fff92dcdd80, r=0x7fd088a113c0 <(anonymous namespace)::Q_QGS_kDirListerCache::innerFunction()::holder>, this=0x55616a7e57a0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#17 QMetaObject::activate (sender=sender@entry=0x55616a82e6d0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff92dcdd80) at kernel/qobject.cpp:3776
#18 0x00007fd08560bf47 in QMetaObject::activate (sender=sender@entry=0x55616a82e6d0, m=m@entry=0x7fd087003500 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff92dcdd80) at kernel/qobject.cpp:3648
#19 0x00007fd086da59ec in KJob::result (this=this@entry=0x55616a82e6d0, _t1=<optimized out>, _t1@entry=0x55616a82e6d0, _t2=...) at ./obj-x86_64-linux-gnu/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:573
#20 0x00007fd086da6521 in KJob::finishJob (this=0x55616a82e6d0, emitResult=<optimized out>) at ./src/lib/jobs/kjob.cpp:109
#21 0x00007fd086da83da in KJob::emitResult (this=<optimized out>) at ./src/lib/jobs/kjob.cpp:293
#22 0x00007fd088759160 in KIO::SimpleJob::slotFinished (this=this@entry=0x55616a82e6d0) at ./src/core/simplejob.cpp:232
#23 0x00007fd08874e47b in KIO::ListJob::slotFinished (this=0x55616a82e6d0) at ./src/core/listjob.cpp:247
#24 0x00007fd08560b98f in QtPrivate::QSlotObjectBase::call (a=0x7fff92dcdfc0, r=0x55616a82e6d0, this=0x55616a3b5760) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#25 QMetaObject::activate (sender=sender@entry=0x55616a6a43a0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3776
#26 0x00007fd08560bf47 in QMetaObject::activate (sender=sender@entry=0x55616a6a43a0, m=m@entry=0x7fd088a0b620 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3648
#27 0x00007fd08872ca33 in KIO::SlaveInterface::finished (this=this@entry=0x55616a6a43a0) at ./obj-x86_64-linux-gnu/src/core/KF5KIOCore_autogen/include/moc_slaveinterface.cpp:441
#28 0x00007fd088730a84 in KIO::SlaveInterface::dispatch (this=0x55616a6a43a0, _cmd=<optimized out>, rawdata=...) at ./src/core/slaveinterface.cpp:160
#29 0x00007fd08872d188 in KIO::SlaveInterface::dispatch (this=0x55616a6a43a0) at ./src/core/slaveinterface.cpp:89
#30 0x00007fd0887334b1 in KIO::Slave::gotInput (this=0x55616a6a43a0) at ./src/core/slave.cpp:406
#31 0x00007fd08560b98f in QtPrivate::QSlotObjectBase::call (a=0x7fff92dce260, r=0x55616a6a43a0, this=0x55616a235490) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#32 QMetaObject::activate (sender=0x55616a690d30, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3776
#33 0x00007fd08560bf47 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fd088a0a380 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3648
#34 0x00007fd0886d3f89 in KIO::Connection::readyRead (this=<optimized out>) at ./obj-x86_64-linux-gnu/src/core/KF5KIOCore_autogen/include/moc_connection_p.cpp:147
#35 KIO::ConnectionPrivate::dequeue (this=0x55616a602df0) at ./src/core/connection.cpp:46
#36 0x00007fd08560c3e2 in QObject::event (this=0x55616a690d30, e=<optimized out>) at kernel/qobject.cpp:1260
#37 0x00007fd08666665c in QApplicationPrivate::notify_helper (this=this@entry=0x556169bd60f0, receiver=receiver@entry=0x55616a690d30, e=e@entry=0x55616a8dbd90) at kernel/qapplication.cpp:3736
#38 0x00007fd08666db90 in QApplication::notify (this=0x7fff92dcfc80, receiver=0x55616a690d30, e=0x55616a8dbd90) at kernel/qapplication.cpp:3483
#39 0x00007fd0855dbd18 in QCoreApplication::notifyInternal2 (receiver=0x55616a690d30, event=0x55616a8dbd90) at kernel/qcoreapplication.cpp:1060
#40 0x00007fd0855dbeee in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x55616a8dbd90) at kernel/qcoreapplication.cpp:1450
#41 0x00007fd0855de8d7 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x556169bcdab0) at kernel/qcoreapplication.cpp:1799
#42 0x00007fd0855dee78 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1653
#43 0x00007fd085639793 in postEventSourceDispatch (s=0x556169c2ed80) at kernel/qeventdispatcher_glib.cpp:276
#44 0x00007fd07f767317 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007fd07f767550 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007fd07f7675dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007fd085638daf in QEventDispatcherGlib::processEvents (this=0x556169c4d510, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#48 0x00007fd0855da03a in QEventLoop::exec (this=this@entry=0x7fff92dce870, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#49 0x00007fd086858097 in QDialog::exec (this=0x55616a412880) at dialogs/qdialog.cpp:602
#50 0x00007fd086857f9c in QDialog::exec (this=this@entry=0x7fff92dce9b0) at dialogs/qdialog.cpp:598
#51 0x00007fd08686a113 in QFileDialog::getSaveFileUrl (parent=0x556169d2df80, caption=..., dir=..., filter=..., selectedFilter=selectedFilter@entry=0x7fff92dceab8, options=..., supportedSchemes=...) at dialogs/qfiledialog.cpp:2455
#52 0x00007fd06ced8cb5 in Okular::Part::slotSaveFileAs (this=<optimized out>, showOkularArchiveAsDefaultFormat=showOkularArchiveAsDefaultFormat@entry=false, this=<optimized out>, this=<optimized out>, this=<optimized out>) at ./part.cpp:2535
#53 0x00007fd06cf8ec62 in Okular::Part::qt_static_metacall (_o=0x556169d08a00, _c=<optimized out>, _id=<optimized out>, _a=0x7fff92dcec90) at ./obj-x86_64-linux-gnu/okularpart_autogen/EWIEGA46WW/moc_part.cpp:472
#54 0x00007fd08560b875 in QMetaObject::activate (sender=sender@entry=0x556169f32160, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff92dcec90) at kernel/qobject.cpp:3795
#55 0x00007fd08560bf47 in QMetaObject::activate (sender=sender@entry=0x556169f32160, m=m@entry=0x7fd086d3a4a0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff92dcec90) at kernel/qobject.cpp:3648
#56 0x00007fd08665ff12 in QAction::triggered (this=this@entry=0x556169f32160, _t1=<optimized out>) at .moc/moc_qaction.cpp:380
#57 0x00007fd08666252c in QAction::activate (this=0x556169f32160, event=<optimized out>) at kernel/qaction.cpp:1166
#58 0x00007fd0867d812c in QMenuPrivate::activateCausedStack (this=this@entry=0x55616a07c9c0, causedStack=..., action=action@entry=0x556169f32160, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1354
#59 0x00007fd0867df69b in QMenuPrivate::activateAction (this=this@entry=0x55616a07c9c0, action=action@entry=0x556169f32160, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1431
#60 0x00007fd0867e0513 in QMenu::mouseReleaseEvent (this=<optimized out>, e=0x7fff92dcf370) at widgets/qmenu.cpp:2924
#61 0x00007fd0866a69c8 in QWidget::event (this=this@entry=0x55616a154470, event=event@entry=0x7fff92dcf370) at kernel/qwidget.cpp:9322
#62 0x00007fd0867e27db in QMenu::event (this=0x55616a154470, e=0x7fff92dcf370) at widgets/qmenu.cpp:3046
#63 0x00007fd08666665c in QApplicationPrivate::notify_helper (this=this@entry=0x556169bd60f0, receiver=receiver@entry=0x55616a154470, e=e@entry=0x7fff92dcf370) at kernel/qapplication.cpp:3736
#64 0x00007fd08666ea58 in QApplication::notify (this=<optimized out>, receiver=0x55616a154470, e=0x7fff92dcf370) at kernel/qapplication.cpp:3197
#65 0x00007fd0855dbd18 in QCoreApplication::notifyInternal2 (receiver=0x55616a154470, event=0x7fff92dcf370) at kernel/qcoreapplication.cpp:1060
#66 0x00007fd0855dbefe in QCoreApplication::sendSpontaneousEvent (receiver=receiver@entry=0x55616a154470, event=event@entry=0x7fff92dcf370) at kernel/qcoreapplication.cpp:1462
#67 0x00007fd08666d05f in QApplicationPrivate::sendMouseEvent (receiver=0x55616a154470, event=event@entry=0x7fff92dcf370, alienWidget=0x0, nativeWidget=0x55616a154470, buttonDown=buttonDown@entry=0x7fd086d698d0 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2683
#68 0x00007fd0866c1f84 in QWidgetWindow::handleMouseEvent (this=this@entry=0x7fd070005cf0, event=event@entry=0x7fff92dcf800) at kernel/qwidgetwindow.cpp:558
#69 0x00007fd0866c46fa in QWidgetWindow::event (this=0x7fd070005cf0, event=0x7fff92dcf800) at kernel/qwidgetwindow.cpp:281
#70 0x00007fd08666665c in QApplicationPrivate::notify_helper (this=this@entry=0x556169bd60f0, receiver=receiver@entry=0x7fd070005cf0, e=e@entry=0x7fff92dcf800) at kernel/qapplication.cpp:3736
#71 0x00007fd08666db90 in QApplication::notify (this=0x7fff92dcfc80, receiver=0x7fd070005cf0, e=0x7fff92dcf800) at kernel/qapplication.cpp:3483
#72 0x00007fd0855dbd18 in QCoreApplication::notifyInternal2 (receiver=0x7fd070005cf0, event=0x7fff92dcf800) at kernel/qcoreapplication.cpp:1060
#73 0x00007fd0855dbefe in QCoreApplication::sendSpontaneousEvent (receiver=receiver@entry=0x7fd070005cf0, event=event@entry=0x7fff92dcf800) at kernel/qcoreapplication.cpp:1462
#74 0x00007fd085e341fb in QGuiApplicationPrivate::processMouseEvent (e=0x55616a4a4930) at kernel/qguiapplication.cpp:2102
#75 0x00007fd085e35365 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x55616a4a4930) at kernel/qguiapplication.cpp:1837
#76 0x00007fd085e0db4b in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1151
#77 0x00007fd07a0bd59a in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#78 0x00007fd07f767317 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#79 0x00007fd07f767550 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#80 0x00007fd07f7675dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#81 0x00007fd085638daf in QEventDispatcherGlib::processEvents (this=0x556169c4d510, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#82 0x00007fd0855da03a in QEventLoop::exec (this=this@entry=0x7fff92dcfba0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#83 0x00007fd0855e3170 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1363
#84 0x0000556167cd39c7 in main (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:90

Reported using DrKonqi
Comment 1 Albert Astals Cid 2019-06-22 09:41:20 UTC
Seems more like a crash in KCoreDirListerCache

Looking at the changes there i am worried it may be Laurent's foreach -> for changes since it's the only recent-ish change in kcoredirlister.cpp

David? Laurent?
Comment 2 Friedrich W. H. Kossebau 2019-07-06 10:05:22 UTC
*** Bug 409547 has been marked as a duplicate of this bug. ***
Comment 3 Ahmad Samir 2019-09-02 13:11:29 UTC
I couldn't reproduce this issue following the steps posted here or at bug 409547.

Do you still see this issue or was it transient?
Comment 4 Ahmad Samir 2019-09-02 13:12:50 UTC
I forgot to mention, I am using kf5 5.61.0.
Comment 5 Ahmad Samir 2019-09-03 13:01:09 UTC
(Bugzilla janitor bot might close the report if left as needsinfo...).
Comment 6 Ahmad Samir 2019-09-03 13:51:16 UTC
OK, I was able to reproduce this crash:
- Open a pdf from, say /tmp in okular
- in okular, select "Save As"
- in the "save as" dialog, save the file by creating a dir "aaa" and inside it create a dir "aaa" and inside it create a dir "aaa" (e.g. ~/aaa/aaa/aaa); at some point the crash happens
Comment 7 Ahmad Samir 2019-09-14 18:44:27 UTC

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