Summary: | Okular crashes starting with 2 differently orientated screens | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | David <dav75uk> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | CC: | aacid, nate |
Priority: | NOR | ||
Version First Reported In: | 1.10.2 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
David
2020-09-18 18:42:39 UTC
*** This bug has been marked as a duplicate of bug 425188 *** I assume if it's the same as another bug and you've not asked for anything (nothing like a resolution report on the linked bug), you don't need anything else, can reproduce, and this bug will be fixed shortly? The duplication simply means that the issue was already reported in a previous ticket, and that any further comments should be added there. That's the reason you have automatically been added to the CC list of that ticket. Regarding more feedback that you could provide, please check comment 3 there. Well, thanks for reporting! The observation about screen orientations might be very helpful. Sadly, this observation suggests that it is actually a Qt bug which we can’t fix directly. I need to add that I did not try to debug yet. Is it possible that you install Okular debugging packages (like okular-dbg or okular-dbgsym or similar) or compile Okular yourself (if you know how to do that), so we get a complete backtrace? To answer your question:
> I assume [...] you don't need anything else, can reproduce, and this bug will be fixed shortly?
No, we couldn’t yet reproduce the problem. In particular, I can not reproduce it when I attach more screens in different rotations, so it might require some more special screen properties.
That is why we would be happy about someone being able to provide a complete backtrace. :)
It might be down to the resolution if both aren't 4K. I don't remember seeing a problem with 4K + 2K both horizontal (that's not also rectangular), but I only recently upgraded from leap 15.1, 15.2 so might be a new problem. If I can I'll try to get a backtrace, but yes looking at the stack it is probably a QT issue, so needs ideally a test case for them to investigate. Application: Okular (okular), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7f7b8dfcf900 (LWP 10939))] Thread 7 (Thread 0x7f7b60bc7700 (LWP 10948)): #0 0x00007f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so #2 0x00007f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so #3 0x00007f7b85b894f9 in start_thread () from /lib64/libpthread.so.0 #4 0x00007f7b879e3fbf in clone () from /lib64/libc.so.6 Thread 6 (Thread 0x7f7b613c8700 (LWP 10947)): #0 0x00007f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so #2 0x00007f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so #3 0x00007f7b85b894f9 in start_thread () from /lib64/libpthread.so.0 #4 0x00007f7b879e3fbf in clone () from /lib64/libc.so.6 Thread 5 (Thread 0x7f7b61bc9700 (LWP 10946)): #0 0x00007f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so #2 0x00007f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so #3 0x00007f7b85b894f9 in start_thread () from /lib64/libpthread.so.0 #4 0x00007f7b879e3fbf in clone () from /lib64/libc.so.6 Thread 4 (Thread 0x7f7b623ca700 (LWP 10945)): #0 0x00007f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so #2 0x00007f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so #3 0x00007f7b85b894f9 in start_thread () from /lib64/libpthread.so.0 #4 0x00007f7b879e3fbf in clone () from /lib64/libc.so.6 Thread 3 (Thread 0x7f7b72f5c700 (LWP 10941)): #0 0x00007f7b82a4839a in ?? () from /usr/lib64/libglib-2.0.so.0 #1 0x00007f7b82a49965 in ?? () from /usr/lib64/libglib-2.0.so.0 #2 0x00007f7b82a4ac13 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0 #3 0x00007f7b82a4b6ab in ?? () from /usr/lib64/libglib-2.0.so.0 #4 0x00007f7b82a4b88c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #5 0x00007f7b888bf19b in QEventDispatcherGlib::processEvents (this=0x7f7b6c000b10, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #6 0x00007f7b8886032a in QEventLoop::exec (this=this@entry=0x7f7b72f5bc80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225 #7 0x00007f7b8868610a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531 #8 0x00007f7b88d2fcd5 in ?? () from /usr/lib64/libQt5DBus.so.5 #9 0x00007f7b886878b2 in QThreadPrivate::start (arg=0x7f7b88fa7d80) at thread/qthread_unix.cpp:361 #10 0x00007f7b85b894f9 in start_thread () from /lib64/libpthread.so.0 #11 0x00007f7b879e3fbf in clone () from /lib64/libc.so.6 Thread 2 (Thread 0x7f7b7b335700 (LWP 10940)): #0 0x00007f7b879d96db in poll () from /lib64/libc.so.6 #1 0x00007f7b85fb0307 in ?? () from /usr/lib64/libxcb.so.1 #2 0x00007f7b85fb1f3a in xcb_wait_for_event () from /usr/lib64/libxcb.so.1 #3 0x00007f7b7e12a300 in QXcbEventQueue::run (this=0x12dc8c0) at qxcbeventqueue.cpp:228 #4 0x00007f7b886878b2 in QThreadPrivate::start (arg=0x12dc8c0) at thread/qthread_unix.cpp:361 #5 0x00007f7b85b894f9 in start_thread () from /lib64/libpthread.so.0 #6 0x00007f7b879e3fbf in clone () from /lib64/libc.so.6 Thread 1 (Thread 0x7f7b8dfcf900 (LWP 10939)): [KCrash Handler] #4 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator-> (this=0x200000008) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:118 #5 qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > > (ptr=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1038 #6 QScreen::d_func (this=this@entry=0x200000000) at kernel/qscreen.h:69 #7 QScreen::size (this=this@entry=0x200000000) at kernel/qscreen.cpp:215 #8 0x00007f7b890fa6dd in QScreen::physicalDotsPerInchY (this=this@entry=0x200000000) at kernel/qscreen.cpp:246 #9 0x00007f7b89c85ce8 in QScrollerPrivate::setDpiFromWidget (this=this@entry=0x13dfe40, widget=<optimized out>) at util/qscroller.cpp:1035 #10 0x00007f7b89c890c8 in QScrollerPrivate::prepareScrolling (this=this@entry=0x13dfe40, position=...) at util/qscroller.cpp:1430 #11 0x00007f7b89c8a56f in QScroller::scrollTo (this=0x15355d0, pos=..., scrollTime=0) at util/qscroller.cpp:680 #12 0x00007f7b70ff29fd in ?? () from /usr/lib64/qt5/plugins/okularpart.so #13 0x00007f7b70ff2e9a in ?? () from /usr/lib64/qt5/plugins/okularpart.so #14 0x00007f7b70f4c38c in ?? () from /usr/lib64/qt5/plugins/okularpart.so #15 0x00007f7b888927a2 in QObject::event (this=this@entry=0x14be3f0, e=e@entry=0x1ae33c0) at kernel/qobject.cpp:1261 #16 0x00007f7b89961f23 in QWidget::event (this=this@entry=0x14be3f0, event=event@entry=0x1ae33c0) at kernel/qwidget.cpp:9409 #17 0x00007f7b89a04f2e in QFrame::event (this=this@entry=0x14be3f0, e=e@entry=0x1ae33c0) at widgets/qframe.cpp:550 #18 0x00007f7b89a07c63 in QAbstractScrollArea::event (this=0x14be3f0, e=0x1ae33c0) at widgets/qabstractscrollarea.cpp:1168 #19 0x00007f7b89921a0c in QApplicationPrivate::notify_helper (this=this@entry=0x12b9030, receiver=receiver@entry=0x14be3f0, e=e@entry=0x1ae33c0) at kernel/qapplication.cpp:3701 #20 0x00007f7b89929020 in QApplication::notify (this=0x7ffeeef08500, receiver=0x14be3f0, e=0x1ae33c0) at kernel/qapplication.cpp:3447 #21 0x00007f7b888620d8 in QCoreApplication::notifyInternal2 (receiver=0x14be3f0, event=0x1ae33c0) at kernel/qcoreapplication.cpp:1088 #22 0x00007f7b888622ae in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x1ae33c0) at kernel/qcoreapplication.cpp:1476 #23 0x00007f7b88864c97 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x12af1c0) at kernel/qcoreapplication.cpp:1825 #24 0x00007f7b88865238 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1679 #25 0x00007f7b888bfb63 in postEventSourceDispatch (s=0x132e2b0) at kernel/qeventdispatcher_glib.cpp:276 #26 0x00007f7b82a4b464 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #27 0x00007f7b82a4b800 in ?? () from /usr/lib64/libglib-2.0.so.0 #28 0x00007f7b82a4b88c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #29 0x00007f7b888bf17f in QEventDispatcherGlib::processEvents (this=0x132eeb0, flags=...) at kernel/qeventdispatcher_glib.cpp:422 #30 0x00007f7b8886032a in QEventLoop::exec (this=this@entry=0x7ffeeef08470, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225 #31 0x00007f7b88869530 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1389 #32 0x000000000040fa0f in main (argc=2, argv=0x7ffeeef08808) at /home/dav/okular/okular/shell/main.cpp:107 [Inferior 1 (process 10939) detached] Also noted that running okular without a pdf (no file) seems to work fine. Hmm. You successfully installed some Qt private debugging symbols, but Okular debugging symbols still seem to be missing: > #14 0x00007f7b70f4c38c in ?? () from /usr/lib64/qt5/plugins/okularpart.so Here I expect that it shows us some PageView function names. (PageView is the only place where we added QScroller.) > #7 QScreen::size (this=this@entry=0x200000000) at kernel/qscreen.cpp:215 This looks somewhat interesting to me, like a nullptr with some additional flag, which prevented it from being recognized as invalid pointer by QScrollerPrivate::setDpiFromWidget(). But I can’t see where this could happen in QWidget::screen(). Do you know how to use gdb? It will be complicated, but if Okular debugging symbols don’t work, it could give us further hints about which QEvent is involved. From qscroller.cpp, I can tell: prepareScrolling() is called with QPointF(). setDpiFromWidget() is called with `target`, i. e. our PageView widget. > void QScrollerPrivate::setDpiFromWidget(QWidget *widget) > { > const QScreen *screen = widget ? widget->screen() : QGuiApplication::primaryScreen(); > Q_ASSERT(screen); > setDpi(QPointF(screen->physicalDotsPerInchX(), screen->physicalDotsPerInchY())); > } This means either widget->screen() or QGuiApplication::primaryScreen() must have returned 0x200000000. From reading QWidget code, I have no idea where that could have happened. There appears to be a QTLWExtra object with a window member of type QWidgetWindow*, and that must have been written with 0x20x200000000 probably... This is my backtrace when I break on setDpiFromWidget(): > Thread 1 "okular" hit Breakpoint 2, QScrollerPrivate::setDpiFromWidget (this=this@entry=0x555555868680, widget=0x5555557c5750) at util/qscroller.cpp:1033 > 1033 in util/qscroller.cpp > (gdb) bt > #0 QScrollerPrivate::setDpiFromWidget (this=this@entry=0x555555868680, widget=0x5555557c5750) at util/qscroller.cpp:1033 > #1 0x00007ffff760cbcc in QScrollerPrivate::prepareScrolling (this=this@entry=0x555555868680, position=...) at util/qscroller.cpp:1431 > #2 0x00007ffff760e0bf in QScroller::scrollTo (this=0x55555582d210, pos=..., scrollTime=0) at ../../include/QtCore/../../src/corelib/tools/qpoint.h:289 > #3 0x00007ffff03971e3 in PageView::scrollTo (this=0x5555558491b0, x=-1, y=21, smoothMove=false) at ../ui/pageview.cpp:4018 > #4 0x00007ffff03970a6 in PageView::center (this=0x5555558491b0, cx=620, cy=380, smoothMove=false) at ../ui/pageview.cpp:4002 > #5 0x00007ffff0399352 in PageView::slotRelayoutPages (this=0x5555558491b0) at ../ui/pageview.cpp:4307 > #6 0x00007ffff029a1c5 in PageView::qt_static_metacall (_o=0x5555558491b0, _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x55555603af18) at okularpart_autogen/UYX5XTB5RZ/moc_pageview.cpp:342 > #7 0x00007ffff66c9129 in QObject::event (this=this@entry=0x5555558491b0, e=e@entry=0x55555603aed0) at kernel/qobject.cpp:1314 > #8 0x00007ffff72b4d5d in QWidget::event (this=this@entry=0x5555558491b0, event=event@entry=0x55555603aed0) at kernel/qwidget.cpp:9088 > #9 0x00007ffff7365062 in QFrame::event (this=this@entry=0x5555558491b0, e=e@entry=0x55555603aed0) at widgets/qframe.cpp:550 > #10 0x00007ffff7367da9 in QAbstractScrollArea::event (this=0x5555558491b0, e=0x55555603aed0) at widgets/qabstractscrollarea.cpp:1042 > #11 0x00007ffff038770a in PageView::event (this=0x5555558491b0, event=0x55555603aed0) at ../ui/pageview.cpp:1543 > #12 0x00007ffff7271cc3 in QApplicationPrivate::notify_helper (this=this@entry=0x5555555abcd0, receiver=receiver@entry=0x5555558491b0, e=e@entry=0x55555603aed0) at kernel/qapplication.cpp:3671 > #13 0x00007ffff727ac70 in QApplication::notify (this=0x7fffffffdbe0, receiver=0x5555558491b0, e=0x55555603aed0) at kernel/qapplication.cpp:3417 > #14 0x00007ffff669b6aa in QCoreApplication::notifyInternal2 (receiver=0x5555558491b0, event=0x55555603aed0) at ../../include/QtCore/5.15.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325 > #15 0x00007ffff669dfa1 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5555555a2b20) at kernel/qcoreapplication.cpp:1815 > #16 0x00007ffff66f6837 in postEventSourceDispatch (s=0x555555613080) at kernel/qeventdispatcher_glib.cpp:277 > #17 0x00007ffff4d67fbd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #18 0x00007ffff4d68240 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #19 0x00007ffff4d682e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #20 0x00007ffff66f5e92 in QEventDispatcherGlib::processEvents (this=0x555555619bb0, flags=...) at kernel/qeventdispatcher_glib.cpp:423 > #21 0x00007ffff669a1bb in QEventLoop::exec (this=this@entry=0x7fffffffdb10, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141 > #22 0x00007ffff66a2354 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 > #23 0x000055555556578a in main (argc=1, argv=0x7fffffffdd08) at ../shell/main.cpp:109 The delivered event is of type QEvent::MetaCall. The breakpoint triggered when I launched Okular and then opened a document using “Open...”. It already shows the “Loaded a 2-page document.” message in the corner. Of course this breakpoint triggers more often, with every call to scrollTo(). But the other backtraces don’t say anything more (which I can see). My conclusion is that this is probably a bug in Qt. > My conclusion is that this is probably a bug in Qt.
The user doesn't care where the bug is, the user cares that Okular didn't use to crash and now it does.
If there's a bug in Qt, we should either stop using that part of Qt or fix that part of Qt.
Well if it's something to raise against QT they probably want more than try it out on okular and you'll see, which is why it's come to okular first to find out what it's doing. Ideally some kind of simple reproduction that is simulating whatever okular is doing. Possible it's the cause of a number of other bugs I'm going to raise against kwin for daft window placement in this setup, particularly when pulling and replacing the cable. I'm guessing the QT folks are missing some test cases around non-rectangular desktop arrangements. Maybe we could try to automatically uncheck (once) “Smooth Scrolling” when multiple screens are connected, and then work around QScroller::scrollTo()? A simple test case will not be easy, because no one of us seems to be able to reproduce the bug. If someone tries to write a simple test case, would you be able to test it, David? Should be able to. |