[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-10-10 Thread David
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #13 from David  ---
Should be able to.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-10-09 Thread David Hurka
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #12 from David Hurka  ---
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?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-10-09 Thread David
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #11 from David  ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-10-08 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=426698

Albert Astals Cid  changed:

   What|Removed |Added

 CC||aa...@kde.org

--- Comment #10 from Albert Astals Cid  ---
> 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-10-08 Thread David Hurka
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #9 from David Hurka  ---
>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 0x2. 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
0x20x2 probably...

This is my backtrace when I break on setDpiFromWidget():

> Thread 1 "okular" hit Breakpoint 2, QScrollerPrivate::setDpiFromWidget 
> (this=this@entry=0x55868680, widget=0x557c5750) at 
> util/qscroller.cpp:1033
> 1033in util/qscroller.cpp
> (gdb) bt
> #0  QScrollerPrivate::setDpiFromWidget (this=this@entry=0x55868680, 
> widget=0x557c5750) at util/qscroller.cpp:1033
> #1  0x7760cbcc in QScrollerPrivate::prepareScrolling 
> (this=this@entry=0x55868680, position=...) at util/qscroller.cpp:1431
> #2  0x7760e0bf in QScroller::scrollTo (this=0x5582d210, pos=..., 
> scrollTime=0) at ../../include/QtCore/../../src/corelib/tools/qpoint.h:289
> #3  0x703971e3 in PageView::scrollTo (this=0x558491b0, x=-1, 
> y=21, smoothMove=false) at ../ui/pageview.cpp:4018
> #4  0x703970a6 in PageView::center (this=0x558491b0, cx=620, 
> cy=380, smoothMove=false) at ../ui/pageview.cpp:4002
> #5  0x70399352 in PageView::slotRelayoutPages (this=0x558491b0) 
> at ../ui/pageview.cpp:4307
> #6  0x7029a1c5 in PageView::qt_static_metacall (_o=0x558491b0, 
> _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x5603af18) at 
> okularpart_autogen/UYX5XTB5RZ/moc_pageview.cpp:342
> #7  0x766c9129 in QObject::event (this=this@entry=0x558491b0, 
> e=e@entry=0x5603aed0) at kernel/qobject.cpp:1314
> #8  0x772b4d5d in QWidget::event (this=this@entry=0x558491b0, 
> event=event@entry=0x5603aed0) at kernel/qwidget.cpp:9088
> #9  0x77365062 in QFrame::event (this=this@entry=0x558491b0, 
> e=e@entry=0x5603aed0) at widgets/qframe.cpp:550
> #10 0x77367da9 in QAbstractScrollArea::event (this=0x558491b0, 
> e=0x5603aed0) at widgets/qabstractscrollarea.cpp:1042
> #11 0x7038770a in PageView::event (this=0x558491b0, 
> event=0x5603aed0) at ../ui/pageview.cpp:1543
> #12 0x77271cc3 in QApplicationPrivate::notify_helper 
> (this=this@entry=0x555abcd0, receiver=receiver@entry=0x558491b0, 
> e=e@entry=0x5603aed0) at kernel/qapplication.cpp:3671
> #13 0x7727ac70 in QApplication::notify (this=0x7fffdbe0, 
> receiver=0x558491b0, e=0x5603aed0) at kernel/qapplication.cpp:3417
> #14 0x7669b6aa in QCoreApplication::notifyInternal2 
> (receiver=0x558491b0, event=0x5603aed0) at 
> ../../include/QtCore/5.15.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
> #15 0x7669dfa1 in QCoreApplicationPrivate::sendPostedEvents 
> (receiver=0x0, event_type=0, data=0x555a2b20) at 
> kernel/qcoreapplication.cpp:1815
> #16 0x766f6837 in postEventSourceDispatch (s=0x55613080) at 
> kernel/qeventdispatcher_glib.cpp:277
> #17 0x74d67fbd in g_main_context_dispatch () from 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> 
> #18 0x74d68240 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #19 0x74d682e3 in g_main_context_iteration () from 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #20 0x766f5e92 in QEventDispatcherGlib::processEvents 
> (this=0x55619bb0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
> #21 0x7669a1bb in QEventLoop::exec (this=this@entry=0x7fffdb10, 
> flags=..., flags@entry=...) at 
> ../../include/QtCore/../../src/corelib/global/qflags.h:141
> #22 0x766a2354 in QCoreApplication::exec () at 
> ../../include/QtCore/../../src/corelib/global/qflags.h:121
> #23 0x5556578a in main (argc=1, argv=0x7fffdd08) 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-21 Thread David Hurka
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #8 from David Hurka  ---
Hmm. You successfully installed some Qt private debugging symbols, but Okular
debugging symbols still seem to be missing:

> #14 0x7f7b70f4c38c 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=0x2) 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-20 Thread David
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #7 from David  ---
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  0x7f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x7f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so
#2  0x7f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so
#3  0x7f7b85b894f9 in start_thread () from /lib64/libpthread.so.0
#4  0x7f7b879e3fbf in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f7b613c8700 (LWP 10947)):
#0  0x7f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x7f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so
#2  0x7f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so
#3  0x7f7b85b894f9 in start_thread () from /lib64/libpthread.so.0
#4  0x7f7b879e3fbf in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f7b61bc9700 (LWP 10946)):
#0  0x7f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x7f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so
#2  0x7f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so
#3  0x7f7b85b894f9 in start_thread () from /lib64/libpthread.so.0
#4  0x7f7b879e3fbf in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f7b623ca700 (LWP 10945)):
#0  0x7f7b85b8f87d in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x7f7b6323cfbb in ?? () from /usr/lib64/dri/i965_dri.so
#2  0x7f7b6323cba7 in ?? () from /usr/lib64/dri/i965_dri.so
#3  0x7f7b85b894f9 in start_thread () from /lib64/libpthread.so.0
#4  0x7f7b879e3fbf in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f7b72f5c700 (LWP 10941)):
#0  0x7f7b82a4839a in ?? () from /usr/lib64/libglib-2.0.so.0
#1  0x7f7b82a49965 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x7f7b82a4ac13 in g_main_context_prepare () from
/usr/lib64/libglib-2.0.so.0
#3  0x7f7b82a4b6ab in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x7f7b82a4b88c in g_main_context_iteration () from
/usr/lib64/libglib-2.0.so.0
#5  0x7f7b888bf19b in QEventDispatcherGlib::processEvents
(this=0x7f7b6c000b10, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x7f7b8886032a in QEventLoop::exec (this=this@entry=0x7f7b72f5bc80,
flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#7  0x7f7b8868610a in QThread::exec (this=) at
thread/qthread.cpp:531
#8  0x7f7b88d2fcd5 in ?? () from /usr/lib64/libQt5DBus.so.5
#9  0x7f7b886878b2 in QThreadPrivate::start (arg=0x7f7b88fa7d80) at
thread/qthread_unix.cpp:361
#10 0x7f7b85b894f9 in start_thread () from /lib64/libpthread.so.0
#11 0x7f7b879e3fbf in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f7b7b335700 (LWP 10940)):
#0  0x7f7b879d96db in poll () from /lib64/libc.so.6
#1  0x7f7b85fb0307 in ?? () from /usr/lib64/libxcb.so.1
#2  0x7f7b85fb1f3a in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x7f7b7e12a300 in QXcbEventQueue::run (this=0x12dc8c0) at
qxcbeventqueue.cpp:228
#4  0x7f7b886878b2 in QThreadPrivate::start (arg=0x12dc8c0) at
thread/qthread_unix.cpp:361
#5  0x7f7b85b894f9 in start_thread () from /lib64/libpthread.so.0
#6  0x7f7b879e3fbf in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f7b8dfcf900 (LWP 10939)):
[KCrash Handler]
#4  QScopedPointer
>::operator-> (this=0x20008) at
../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:118
#5  qGetPtrHelper > > (ptr=...) at
../../include/QtCore/../../src/corelib/global/qglobal.h:1038
#6  QScreen::d_func (this=this@entry=0x2) at kernel/qscreen.h:69
#7  QScreen::size (this=this@entry=0x2) at kernel/qscreen.cpp:215
#8  0x7f7b890fa6dd in QScreen::physicalDotsPerInchY
(this=this@entry=0x2) at kernel/qscreen.cpp:246
#9  0x7f7b89c85ce8 in QScrollerPrivate::setDpiFromWidget
(this=this@entry=0x13dfe40, widget=) at util/qscroller.cpp:1035
#10 0x7f7b89c890c8 in QScrollerPrivate::prepareScrolling
(this=this@entry=0x13dfe40, position=...) at util/qscroller.cpp:1430
#11 0x7f7b89c8a56f in QScroller::scrollTo (this=0x15355d0, pos=...,
scrollTime=0) at util/qscroller.cpp:680
#12 0x7f7b70ff29fd in ?? () from /usr/lib64/qt5/plugins/okularpart.so
#13 0x7f7b70ff2e9a in ?? () from /usr/lib64/qt5/plugins/okularpart.so
#14 0x7f7b70f4c38c in ?? () from /usr/lib64/qt5/plugins/okularpart.so
#15 0x7f7b888927a2 in QObject::event (this=this@entry=0x14be3f0,
e=e@entry=0x1ae33c0) at kernel/qobject.cpp:1261
#16 0x7f7b89961f23 in QWidget::event (this=this@entry=0x14be3f0,
event=event@entry=0x1ae33c0) at kernel/qwidget.cpp:9409
#17 0x7f7b89a04f2e in QFrame::event (this=this@entry=0x14be3f0,
e=e@entry=0x1ae33c0) at widgets/qframe.cpp:550
#18 0x7f7b89a07c63 in QAbstractScrollArea::event (this=0x14be3f0,
e=0x1ae33c0) at widgets/qabstractsc

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-19 Thread David
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #6 from David  ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-19 Thread David Hurka
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #5 from David Hurka  ---
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. :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-19 Thread David Hurka
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #4 from David Hurka  ---
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?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-19 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #3 from Christoph Feck  ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-19 Thread David
https://bugs.kde.org/show_bug.cgi?id=426698

--- Comment #2 from David  ---
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?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426698] Okular crashes starting with 2 differently orientated screens

2020-09-18 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=426698

Nate Graham  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 CC||n...@kde.org
 Status|REPORTED|RESOLVED

--- Comment #1 from Nate Graham  ---


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

-- 
You are receiving this mail because:
You are the assignee for the bug.