Bug 333639

Summary: Okular crashes when opening PDF file with xRandR disabled
Product: [Plasma] KScreen Reporter: Jason Kendall <jason.kendall>
Component: libkscreenAssignee: Alex Fiestas <afiestas>
Status: RESOLVED DUPLICATE    
Severity: crash CC: cfeck, dvratil, okular-devel
Priority: NOR Keywords: drkonqi
Version: 1.0.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jason Kendall 2014-04-20 02:43:46 UTC
Application: okular (0.19.0)
KDE Platform Version: 4.13.0
Qt Version: 4.8.6
Operating System: Linux 3.13.0-24-generic x86_64
Distribution: Ubuntu 14.04 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I attempted to open a PDF file

- Custom settings of the application:
I run multiple GPUs and require the use of xinerama, thus, xRandR is disabled. 

Note: I did find KDE bug id: 331784 which related to kded4 crashing for the same reason. However, after correcting that issue (same solution) okular still crashes.

The crash can be reproduced every time.

-- 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 0x7ff54f18b7c0 (LWP 10154))]

Thread 3 (Thread 0x7ff5386d7700 (LWP 10155)):
#0  0x00007ff548dc162a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ff548dc19b9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff548d7fe9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff548d800ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff54cb987be in QEventDispatcherGlib::processEvents (this=0x7ff5300008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#5  0x00007ff54cb6a0af in QEventLoop::processEvents (this=this@entry=0x7ff5386d6de0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007ff54cb6a3a5 in QEventLoop::exec (this=this@entry=0x7ff5386d6de0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007ff54ca66c5f in QThread::exec (this=this@entry=0x29dddc0) at thread/qthread.cpp:537
#8  0x00007ff54cb4b823 in QInotifyFileSystemWatcherEngine::run (this=0x29dddc0) at io/qfilesystemwatcher_inotify.cpp:265
#9  0x00007ff54ca6932f in QThreadPrivate::start (arg=0x29dddc0) at thread/qthread_unix.cpp:349
#10 0x00007ff54925f182 in start_thread (arg=0x7ff5386d7700) at pthread_create.c:312
#11 0x00007ff54c1a430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7ff53777d700 (LWP 10157)):
#0  0x00007ff549261569 in __GI___pthread_mutex_lock (mutex=0x7ff528000a60) at ../nptl/pthread_mutex_lock.c:125
#1  0x00007ff548dc1991 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff548d7fbc6 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff548d80048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff548d800ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff54cb987be in QEventDispatcherGlib::processEvents (this=0x7ff5280008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#6  0x00007ff54cb6a0af in QEventLoop::processEvents (this=this@entry=0x7ff53777cde0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007ff54cb6a3a5 in QEventLoop::exec (this=this@entry=0x7ff53777cde0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007ff54ca66c5f in QThread::exec (this=this@entry=0x2ae7c30) at thread/qthread.cpp:537
#9  0x00007ff54cb4b823 in QInotifyFileSystemWatcherEngine::run (this=0x2ae7c30) at io/qfilesystemwatcher_inotify.cpp:265
#10 0x00007ff54ca6932f in QThreadPrivate::start (arg=0x2ae7c30) at thread/qthread_unix.cpp:349
#11 0x00007ff54925f182 in start_thread (arg=0x7ff53777d700) at pthread_create.c:312
#12 0x00007ff54c1a430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7ff54f18b7c0 (LWP 10154)):
[KCrash Handler]
#5  QObject::thread (this=0x0) at kernel/qobject.cpp:1370
#6  0x00007ff54d00e45e in KDBusConnectionPool::threadConnection() () from /usr/lib/libkdecore.so.5
#7  0x00007ff54e7affdc in ?? () from /usr/lib/libkio.so.5
#8  0x00007ff54e7b066a in OrgKdeKDirNotifyInterface::emitLeftDirectory(QString const&) () from /usr/lib/libkio.so.5
#9  0x00007ff54e799447 in ?? () from /usr/lib/libkio.so.5
#10 0x00007ff54e7994f9 in ?? () from /usr/lib/libkio.so.5
#11 0x00007ff54c0e5509 in __run_exit_handlers (status=1, listp=0x7ff54c4686c8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#12 0x00007ff54c0e5555 in __GI_exit (status=<optimized out>) at exit.c:104
#13 0x00007ff54d5c4878 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:783
#14 0x00007ff54e267760 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib/libkdeui.so.5
#15 0x00007ff54b0c95ee in _XIOError (dpy=dpy@entry=0x23dda70) at ../../src/XlibInt.c:1498
#16 0x00007ff54b0c6a8e in require_socket (dpy=0x23dda70) at ../../src/xcb_io.c:70
#17 0x00007ff54b0c7259 in _XFlush (dpy=0x23dda70) at ../../src/xcb_io.c:511
#18 0x00007ff54b0c9c75 in _XGetRequest (dpy=dpy@entry=0x23dda70, type=type@entry=4 '\004', len=len@entry=8) at ../../src/XlibInt.c:1735
#19 0x00007ff54b0a765c in XDestroyWindow (dpy=0x23dda70, w=94372119) at ../../src/DestWind.c:40
#20 0x00007ff535f93d1c in XRandRX11Helper::~XRandRX11Helper (this=0x2b214e0, __in_chrg=<optimized out>) at /build/buildd/libkscreen-1.0.2/backends/xrandr/xrandrx11helper.cpp:62
#21 0x00007ff535f93d49 in XRandRX11Helper::~XRandRX11Helper (this=0x2b214e0, __in_chrg=<optimized out>) at /build/buildd/libkscreen-1.0.2/backends/xrandr/xrandrx11helper.cpp:64
#22 0x00007ff535f91f97 in XRandR11::~XRandR11 (this=0x2dac8a0, __in_chrg=<optimized out>) at /build/buildd/libkscreen-1.0.2/backends/xrandr1.1/xrandr11.cpp:67
#23 0x00007ff535f91fc9 in XRandR11::~XRandR11 (this=0x2dac8a0, __in_chrg=<optimized out>) at /build/buildd/libkscreen-1.0.2/backends/xrandr1.1/xrandr11.cpp:68
#24 0x00007ff53c338f69 in BackendLoader::init () at /build/buildd/libkscreen-1.0.2/src/backendloader.cpp:67
#25 0x00007ff53c339809 in KScreen::Config::current () at /build/buildd/libkscreen-1.0.2/src/config.cpp:58
#26 0x00007ff53d081402 in Okular::Utils::realDpi (widgetOnScreen=0x259ccd0) at ../core/utils.cpp:102
#27 0x00007ff53d05c0db in Okular::DocumentPrivate::openDocumentInternal (this=0x2596f20, offer=..., isstdin=isstdin@entry=false, docFile=..., filedata=...) at ../core/document.cpp:939
#28 0x00007ff53d05c745 in Okular::Document::openDocument (this=0x255f710, docFile=..., url=..., _mime=...) at ../core/document.cpp:2225
#29 0x00007ff53d31ec0c in Okular::Part::openFile (this=0x25452a0) at ../part.cpp:1244
#30 0x00007ff54ed76c47 in ?? () from /usr/lib/libkparts.so.4
#31 0x00007ff54ed7822e in KParts::ReadOnlyPart::openUrl(KUrl const&) () from /usr/lib/libkparts.so.4
#32 0x00007ff53d313f5b in Okular::Part::openUrl (this=0x25452a0, _url=...) at ../part.cpp:1394
#33 0x000000000040f117 in Shell::openUrl (this=this@entry=0x25255d0, url=...) at ../../shell/shell.cpp:246
#34 0x0000000000410393 in Shell::fileOpen (this=0x25255d0) at ../../shell/shell.cpp:409
#35 0x0000000000410645 in Shell::qt_static_metacall (_o=0x0, _id=1205958512, _a=0x7fff47e184d0, _c=<optimized out>) at ./shell.moc:100
#36 0x00007ff54cb7f87a in QMetaObject::activate (sender=sender@entry=0x2950fe0, m=m@entry=0x7ff54e007de0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff47e184d0) at kernel/qobject.cpp:3539
#37 0x00007ff54d557a62 in QAction::triggered (this=this@entry=0x2950fe0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#38 0x00007ff54d559433 in QAction::activate (this=this@entry=0x2950fe0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#39 0x00007ff54d987489 in QMenuPrivate::activateCausedStack (this=this@entry=0x2984450, causedStack=..., action=action@entry=0x2950fe0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#40 0x00007ff54d98b9b9 in QMenuPrivate::activateAction (this=0x2984450, action=0x2950fe0, action_e=QAction::Trigger, self=<optimized out>) at widgets/qmenu.cpp:1130
#41 0x00007ff54e31f4f5 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#42 0x00007ff54d5ad50a in QWidget::event (this=this@entry=0x29762e0, event=event@entry=0x7fff47e18c00) at kernel/qwidget.cpp:8376
#43 0x00007ff54d98f7bb in QMenu::event (this=0x29762e0, e=0x7fff47e18c00) at widgets/qmenu.cpp:2481
#44 0x00007ff54d55de2c in QApplicationPrivate::notify_helper (this=this@entry=0x23a8a60, receiver=receiver@entry=0x29762e0, e=e@entry=0x7fff47e18c00) at kernel/qapplication.cpp:4567
#45 0x00007ff54d5645dd in QApplication::notify (this=<optimized out>, receiver=0x29762e0, e=0x7fff47e18c00) at kernel/qapplication.cpp:4110
#46 0x00007ff54e268baa in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#47 0x00007ff54cb6b4dd in QCoreApplication::notifyInternal (this=0x7fff47e194c0, receiver=receiver@entry=0x29762e0, event=event@entry=0x7fff47e18c00) at kernel/qcoreapplication.cpp:953
#48 0x00007ff54d563d93 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#49 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x29762e0, event=event@entry=0x7fff47e18c00, alienWidget=alienWidget@entry=0x0, nativeWidget=nativeWidget@entry=0x29762e0, buttonDown=buttonDown@entry=0x7ff54e043318 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#50 0x00007ff54d5d8cfc in QETWidget::translateMouseEvent (this=this@entry=0x29762e0, event=event@entry=0x7fff47e18f50) at kernel/qapplication_x11.cpp:4568
#51 0x00007ff54d5d8269 in QApplication::x11ProcessEvent (this=0x7fff47e194c0, event=event@entry=0x7fff47e18f50) at kernel/qapplication_x11.cpp:3627
#52 0x00007ff54d5ffb02 in x11EventSourceDispatch (s=0x2399d10, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#53 0x00007ff548d7fe04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007ff548d80048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007ff548d800ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007ff54cb987a1 in QEventDispatcherGlib::processEvents (this=0x236db50, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#57 0x00007ff54d5ffbb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#58 0x00007ff54cb6a0af in QEventLoop::processEvents (this=this@entry=0x7fff47e19320, flags=...) at kernel/qeventloop.cpp:149
#59 0x00007ff54cb6a3a5 in QEventLoop::exec (this=this@entry=0x7fff47e19320, flags=...) at kernel/qeventloop.cpp:204
#60 0x00007ff54cb6fb79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#61 0x00007ff54d55c37c in QApplication::exec () at kernel/qapplication.cpp:3828
#62 0x00000000004099c6 in main (argc=<optimized out>, argv=<optimized out>) at ../../shell/main.cpp:174

Possible duplicates by query: bug 324786.

Reported using DrKonqi
Comment 1 Jason Kendall 2014-04-20 02:45:53 UTC
In looking at the backtrace (again) looks like this is also related to 331784 which is libkscreen - possible the same issue?
Comment 2 Christoph Feck 2014-04-20 08:57:19 UTC
Yes, the crash is caused by libkscreen, so it could be a duplicate of bug 331784. I was curious how you "corrected the issue", because that bug is unresolved.
Comment 3 Jason Kendall 2014-04-20 12:01:22 UTC
Not so much fixed, but worked around kded4 crashing by removing kscreen service from launching. Sorry, it was late ;)
Comment 4 Jekyll Wu 2014-04-23 00:54:17 UTC

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