https://bugs.documentfoundation.org/show_bug.cgi?id=131533
Bug ID: 131533
Summary: Qt5 crash when closing LO with a 2nd consecutive
selection
Product: LibreOffice
Version: 7.0.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: graphics stack
Assignee: [email protected]
Reporter: [email protected]
I couldn't really come up with a good summary, as the reproducer is a bit
complex.
While debugging bug 125809, I found the following crash, easiest reproducible
with Draw.
1. Start Draw from a terminal
2. Open galleries sidebar
3. Drag anything from the Sidebar into the document. The new item will be and
has to stay selected!
4. Drag anything from the Sidebar into the document again. The new item will be
and has to stay selected!
- on the terminal you'll see: "QXcbClipboard::setMimeData: Cannot set X11
selection owner"
- at this point the Qt5 internal selection state doesn't match the LO state
anymore.
5. Close and discard the document without removing the selection (Ctrl + w)
6. Close the start center (Ctrl + w).
7. Crash when QApplication tries to release the LO selection on shutdown.
LO normally release the clipboard when closing a module (Draw). This doesn't
happen correctly now.
The simple workaround is to select something else before closing the document,
so the clipboard state is corrected.
Clearing the clipboard somehow interferes with the D'n'D action when there is
already a selection. I tried to understand, why the setMimeData() call after
the clear() fails, but came up with nothing. I guess the someone else
(clipboard manager?) claims the clipboard after LO gives it up with the
clear(). The current fix is to queue the clear and ignore it, if it's directly
followed by a claiming setContent.
This initially "nice" Qt5Clipboard code already feels like it needs some
refactoring to make it easier to follow...
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs