Bug 346264 - okular crashed when reloading file via emacs
Summary: okular crashed when reloading file via emacs
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-04-16 14:09 UTC by schochet
Modified: 2018-10-31 14:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schochet 2015-04-16 14:09:27 UTC
Application: okular (0.21.3)
KDE Platform Version: 4.14.6
Qt Version: 4.8.6
Operating System: Linux 3.16.7-13-desktop x86_64
Distribution: "openSUSE 13.2 (Harlequin) (x86_64)"

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

running emacs command kdvi-jump-to-line, which relaods the dvi file at the 
line indicayed by the point in emacs

- Custom settings of the application:

set symbolic link from ~/bin/kdvi to the okular exec so that the above emacs command runs okular

The crash can be reproduced sometimes.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#5  0x00007ff80a1b3434 in QProcess::readChannel() const () at /usr/lib64/libQtCore.so.4
#6  0x00007ff80a1b8652 in QProcess::readAllStandardError() () at /usr/lib64/libQtCore.so.4
#7  0x00007ff7f5962f9f in  () at /usr/lib64/kde4/okularGenerator_dvi.so
#8  0x00007ff80a23a59e in QObject::event(QEvent*) () at /usr/lib64/libQtCore.so.4
#9  0x00007ff80ac3076c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#10 0x00007ff80ac36cad in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#11 0x00007ff80b948cea in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#12 0x00007ff80a2222ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#13 0x00007ff80a22557d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQtCore.so.4
#14 0x00007ff80a24f8fe in  () at /usr/lib64/libQtCore.so.4
#15 0x00007ff806258a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#16 0x00007ff806258c48 in  () at /usr/lib64/libglib-2.0.so.0
#17 0x00007ff806258cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#18 0x00007ff80a24f0be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#19 0x00007ff80accd676 in  () at /usr/lib64/libQtGui.so.4
#20 0x00007ff80a220e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#21 0x00007ff80a221165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#22 0x00007ff80a2265b9 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#23 0x000000000040a480 in  ()
#24 0x00007ff809794b05 in __libc_start_main () at /lib64/libc.so.6
#25 0x000000000040bda2 in _start ()

Reported using DrKonqi
Comment 1 Albert Astals Cid 2015-04-17 22:04:43 UTC
Hmmm  this backtrace is pretty unuseful, can you please install the debug symbols for okular and qtbase/qtcore of your distribution and try to attach a better backtrace?

Also it'd be great if you could try to reproduce the crash running valgrind under okular (i.e. run "valgrind okular" in a shell)
Comment 2 schochet 2015-04-28 11:10:05 UTC
(In reply to Albert Astals Cid from comment #1)
> Hmmm  this backtrace is pretty unuseful, can you please install the debug
> symbols for okular and qtbase/qtcore of your distribution and try to attach
> a better backtrace?


For a while I thought that just installing the debug symbols fixed the problem, but today it happened again. Here is the backtrace:

Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#5  0x00007f04fe766434 in QProcess::readChannel() const () at /usr/lib64/libQtCore.so.4
#6  0x00007f04fe76b652 in QProcess::readAllStandardError() () at /usr/lib64/libQtCore.so.4
#7  0x00007f04e9f12f9f in fontPool::mf_output_receiver() (this=0xd317a0) at /usr/src/debug/okular-14.12.3/generators/dvi/fontpool.cpp:447
#8  0x00007f04fe7ed59e in QObject::event(QEvent*) () at /usr/lib64/libQtCore.so.4
#9  0x00007f04ff1e376c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#10 0x00007f04ff1e9cad in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#11 0x00007f04ffefbcea in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#12 0x00007f04fe7d52ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#13 0x00007f04fe7d857d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQtCore.so.4
#14 0x00007f04fe8028fe in  () at /usr/lib64/libQtCore.so.4
#15 0x00007f04fa80ba04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#16 0x00007f04fa80bc48 in  () at /usr/lib64/libglib-2.0.so.0
#17 0x00007f04fa80bcec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#18 0x00007f04fe8020be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#19 0x00007f04ff280676 in  () at /usr/lib64/libQtGui.so.4
#20 0x00007f04fe7d3e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#21 0x00007f04fe7d4165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#22 0x00007f04fe7d95b9 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#23 0x000000000040a480 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/okular-14.12.3/shell/main.cpp:64
Comment 3 Albert Astals Cid 2015-05-03 23:05:50 UTC
Can you please try running it under valgrind as i suggested? May give us some extra info, and also installing qtcore debug info would be nice too
Comment 4 schochet 2015-05-12 08:05:21 UTC
When I run okular via valgrind then the whole kde window manager crashes rather than just okular, so I can't get any more information. It may be that my system is messed up, since I have done several system upgrades  rather than doing clean installations.
Comment 5 Albert Astals Cid 2015-05-24 04:16:38 UTC
Have you tried installed qtcore debug info as requested? That may give a somewhat useful backtrace
Comment 6 schochet 2015-05-28 15:56:56 UTC
(In reply to Albert Astals Cid from comment #5)
> Have you tried installed qtcore debug info as requested? That may give a
> somewhat useful backtrace

Here is a backtrace from a crash after installing whatever OpenSuse packages I could find containing qt and debug in the package names:

Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#5  0x00007f13ab4e8998 in Okular::Document::closeDocument() (this=0x922b90) at /usr/src/debug/okular-14.12.3/core/document.cpp:2517
#6  0x00007f13ab7b7547 in Okular::Part::closeUrl(bool) (this=0x841470, promptToSave=<optimized out>) at /usr/src/debug/okular-14.12.3/part.cpp:1611
#7  0x00007f13ab7b5120 in Okular::Part::openUrl(KUrl const&) (this=0x841470, _url=...) at /usr/src/debug/okular-14.12.3/part.cpp:1492
#8  0x000000000040ff4f in Shell::openUrl(KUrl const&, QString const&) (this=this@entry=0x8462c0, url=..., serializedOptions=...) at /usr/src/debug/okular-14.12.3/shell/shell.cpp:215
#9  0x00000000004100e9 in Shell::openDocument(QString const&, QString const&) (this=0x8462c0, url=..., serializedOptions=...) at /usr/src/debug/okular-14.12.3/shell/shell.cpp:181
#10 0x000000000041135d in Shell::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x8462c0, _id=15836784, _id@entry=4, _a=0x7ffeecd20120, _c=<optimized out>) at /usr/src/debug/okular-14.12.3/build/shell/shell.moc:101
#11 0x0000000000411513 in Shell::qt_metacall(QMetaObject::Call, int, void**) (_a=0x7ffeecd20120, _id=4, _c=QMetaObject::InvokeMetaMethod, _o=0x8462c0) at /usr/src/debug/okular-14.12.3/build/shell/shell.moc:165
#12 0x0000000000411513 in Shell::qt_metacall(QMetaObject::Call, int, void**) (this=0x8462c0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffeecd20120) at /usr/src/debug/okular-14.12.3/build/shell/shell.moc:166
#13 0x00007f13bb1ccd4d in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) (this=this@entry=0x790180, object=object@entry=0x8462c0, msg=..., metaTypes=..., slotIdx=54) at qdbusintegrator.cpp:951
#14 0x00007f13bb1cded9 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x790180, object=0x8462c0, flags=16, msg=...) at qdbusintegrator.cpp:856
#15 0x00007f13bb1ce65f in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x790180, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1447
#16 0x00007f13bb1cea8b in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x8305d0) at qdbusintegrator.cpp:1541
#17 0x00007f13bb5bf59e in QObject::event(QEvent*) (this=this@entry=0x8462c0, e=e@entry=0x8305d0) at kernel/qobject.cpp:1231
#18 0x00007f13bc004c5b in QWidget::event(QEvent*) (this=this@entry=0x8462c0, event=event@entry=0x8305d0) at kernel/qwidget.cpp:8859
#19 0x00007f13bc3ba0b3 in QMainWindow::event(QEvent*) (this=0x8462c0, event=0x8305d0) at widgets/qmainwindow.cpp:1478
#20 0x00007f13bcdb9599 in KXmlGuiWindow::event(QEvent*) () at /usr/lib64/libkdeui.so.5
#21 0x00007f13bbfb576c in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x6dfc60, receiver=receiver@entry=0x8462c0, e=e@entry=0x8305d0) at kernel/qapplication.cpp:4565
#22 0x00007f13bbfbbcad in QApplication::notify(QObject*, QEvent*) (this=0x7ffeecd20ba0, receiver=0x8462c0, e=0x8305d0) at kernel/qapplication.cpp:4351
#23 0x00007f13bcccdcea in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#24 0x00007f13bb5a72ad in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7ffeecd20ba0, receiver=receiver@entry=0x8462c0, event=event@entry=0x8305d0) at kernel/qcoreapplication.cpp:953
#25 0x00007f13bb5aa57d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x8305d0, receiver=0x8462c0) at kernel/qcoreapplication.h:231
#26 0x00007f13bb5aa57d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x693ad0) at kernel/qcoreapplication.cpp:1577
#27 0x00007f13bb5aaa23 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#28 0x00007f13bb5d48fe in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) () at kernel/qcoreapplication.h:236
#29 0x00007f13bb5d48fe in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x6d0b60) at kernel/qeventdispatcher_glib.cpp:300
#30 0x00007f13b75dda04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#31 0x00007f13b75ddc48 in  () at /usr/lib64/libglib-2.0.so.0
#32 0x00007f13b75ddcec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#33 0x00007f13bb5d40be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x6d0500, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#34 0x00007f13bc052676 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007f13bb5a5e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffeecd20b20, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007f13bb5a6165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffeecd20b20, flags=...) at kernel/qeventloop.cpp:204
#37 0x00007f13bb5ab5b9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#38 0x00007f13bbfb3f3c in QApplication::exec() () at kernel/qapplication.cpp:3823
#39 0x000000000040a480 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/okular-14.12.3/shell/main.cpp:64
Comment 7 schochet 2015-05-28 16:33:54 UTC
(In reply to schochet from comment #6)
> (In reply to Albert Astals Cid from comment #5)
> > Have you tried installed qtcore debug info as requested? That may give a
> > somewhat useful backtrace
> 

Here is another backtrace from a crash that occurred at a more typical time.

Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#5  0x00007f615eecb434 in QProcess::readChannel() const (this=this@entry=0x7f613c8a7440) at io/qprocess.cpp:1244
#6  0x00007f615eed0652 in QProcess::readAllStandardError() (this=0x7f613c8a7440) at io/qprocess.cpp:1933
#7  0x00007f614a677f9f in fontPool::mf_output_receiver() (this=0x2e49a00) at /usr/src/debug/okular-14.12.3/generators/dvi/fontpool.cpp:447
#8  0x00007f615ef5259e in QObject::event(QEvent*) (this=0x2e49a00, e=<optimized out>) at kernel/qobject.cpp:1231
#9  0x00007f615f94876c in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x2493c60, receiver=receiver@entry=0x2e49a00, e=e@entry=0x7f613c66e190) at kernel/qapplication.cpp:4565
#10 0x00007f615f94ecad in QApplication::notify(QObject*, QEvent*) (this=0x7ffe2f0cd340, receiver=0x2e49a00, e=0x7f613c66e190) at kernel/qapplication.cpp:4351
#11 0x00007f6160660cea in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#12 0x00007f615ef3a2ad in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7ffe2f0cd340, receiver=receiver@entry=0x2e49a00, event=event@entry=0x7f613c66e190) at kernel/qcoreapplication.cpp:953
#13 0x00007f615ef3d57d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x7f613c66e190, receiver=0x2e49a00) at kernel/qcoreapplication.h:231
#14 0x00007f615ef3d57d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x2447ad0) at kernel/qcoreapplication.cpp:1577
#15 0x00007f615ef3da23 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#16 0x00007f615ef678fe in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) () at kernel/qcoreapplication.h:236
#17 0x00007f615ef678fe in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x2484b60) at kernel/qeventdispatcher_glib.cpp:300
#18 0x00007f615af70a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#19 0x00007f615af70c48 in  () at /usr/lib64/libglib-2.0.so.0
#20 0x00007f615af70cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#21 0x00007f615ef670be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x2484500, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#22 0x00007f615f9e5676 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#23 0x00007f615ef38e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe2f0cd2c0, flags=...) at kernel/qeventloop.cpp:149
#24 0x00007f615ef39165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe2f0cd2c0, flags=...) at kernel/qeventloop.cpp:204
#25 0x00007f615ef3e5b9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#26 0x00007f615f946f3c in QApplication::exec() () at kernel/qapplication.cpp:3823
#27 0x000000000040a480 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/okular-14.12.3/shell/main.cpp:64
Comment 8 Albert Astals Cid 2015-07-09 20:40:32 UTC
This is really strange, the two backtraces are totally different altogether and the fact that valgrinds makes your system crash is still even weirder.

How easy is for you to reproduce this kind of crash?
Comment 9 schochet 2015-07-12 10:12:24 UTC
(In reply to Albert Astals Cid from comment #8)
> This is really strange, the two backtraces are totally different altogether
> and the fact that valgrinds makes your system crash is still even weirder.
> 
> How easy is for you to reproduce this kind of crash?

It was very hard to get a crash using valgrind, but it was also painfully slow to try to work using it.
Without valgrind, it varies a lot. Some days I get crashes very often and other days not at all or only once or twice.
Comment 10 Albert Astals Cid 2015-07-12 11:28:27 UTC
Ok, i can't figure out the crashes from the backtrace sadly, probably valgrind backtrac would help but if it brings down your system :/

Will leave it as unconfirmed in case in the future reading the bactkrace someone has a better idea.

Sorry can't help :/
Comment 11 Andrew Crouthamel 2018-10-31 04:13:02 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 12 schochet 2018-10-31 06:02:52 UTC
I have not had this problem in at least a year, although I still regularly call okular from within emacs as described in the original bug report.

My current system is: 
OpenSuse 15.0
kernel 4.12.14
KDE plasma 5.12.6
KDE frameworks 5.45.0
Qt 5.9.4
okular 1.3.3
emacs 25.3.1

Steve
Comment 13 schochet 2018-10-31 06:05:09 UTC
See previous comment
Comment 14 Andrew Crouthamel 2018-10-31 14:40:28 UTC
Thanks for the update!