Bug 122042 - CRASH KDE5 backend crashes writer on close with selected text
Summary: CRASH KDE5 backend crashes writer on close with selected text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Katarina Behrens (Inactive)
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords: bisected
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2018-12-12 13:08 UTC by Jan-Marek Glogowski
Modified: 2018-12-14 23:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
GDB backtrace (9.39 KB, text/plain)
2018-12-12 14:13 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2018-12-12 13:08:16 UTC
Steps to reproduce:

1. Open writer with SAL_USE_VCLPLUGIN=kde5 soffice --writer
2. Type something
3. Select text
4. Close LO and select "Don't save"
5. Crash via assertion

/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322: typename add_lvalue_reference<element_type>::type std::unique_ptr<SwWrtShell, std::default_delete<SwWrtShell> >::operator*() const [_Tp = SwWrtShell, _Dp = std::default_delete<SwWrtShell>]: Assertion 'get() != pointer()' failed.

Couldn't reproduce with either gen or gtk3 in Ubuntu 18.04 chroot via remote SSH.
Comment 1 Michael Weghorn 2018-12-12 13:20:18 UTC
Confirmed with a current master build (as of 3911bf8364dae4c855ad37237c114f9007f70657 + https://gerrit.libreoffice.org/#/c/65023/ on top) and the kde5 VCL plugin.
Comment 2 Michael Weghorn 2018-12-12 14:13:38 UTC
Created attachment 147467 [details]
GDB backtrace
Comment 3 Michael Weghorn 2018-12-12 14:15:34 UTC
Reverting this commit makes the crash disappear:

commit 1e3d6c801ffa051f42188c917b17f171aedaeddf
Author: Katarina Behrens <Katarina.Behrens@cib.de>
Date:   Thu Dec 6 15:46:57 2018 +0100

    tdf#120625: All vcl windows now share 1 instance of clipboard
    
    so we can copy'n'pasta between apps (or 2 instances of the same app)
    Copy'n'pasta into system clipboard is still buggy for non-Writer apps
    
    Change-Id: I07f025172654dd3e6c0ef9cd5ad78d24224f039f
    Reviewed-on: https://gerrit.libreoffice.org/64721
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Comment 4 Commit Notification 2018-12-14 09:41:42 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/bdeabe631f951a7d63f02426856cdbcdfc73328d%5E%21

tdf#122042: It's two clipboards, actually

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Katarina Behrens (Inactive) 2018-12-14 10:48:11 UTC
Presumably fixed but with those things one never knows
Comment 6 Michael Weghorn 2018-12-14 23:45:02 UTC
Fix verified with

Version: 6.3.0.0.alpha0+
Build ID: 977a98c5729b4301c11cab1a421d4e6f2758e41e
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded
Comment 7 Commit Notification 2018-12-14 23:46:38 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/d126c07e02963c1262eaa0f9f0aee0f8ed401550%5E%21

tdf#122042: It's two clipboards, actually

It will be available in 6.2.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.