Bug 118382 - Crash with RTF paste
Summary: Crash with RTF paste
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: x86 (IA32) Windows (All)
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.2.0 target:6.1.2
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2018-06-25 19:56 UTC by Telesto
Modified: 2021-03-08 16:41 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["SwPosition::~SwPosition()"]


Attachments
Example file (90.44 KB, application/vnd.oasis.opendocument.text)
2018-06-25 19:56 UTC, Telesto
Details
gdb bt (13.66 KB, text/plain)
2018-06-30 13:13 UTC, Julien Nabet
Details
PICTURE: paste without error but not exactly (218.52 KB, image/png)
2018-09-15 14:44 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-06-25 19:56:08 UTC
Description:
Crash with RTF paste

Steps to Reproduce:
1. Open the attached file
2. Select all
3. Open a new document
4. CTRL+SHIFT+V -> Crash

Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.0.0.alpha0+
Build ID: 7414e07f52af87094240f5c3d9a0eb764e8642f5
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-06-24_01:44:59
Locale: nl-NL (nl_NL); Calc: CL

but not with
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 1 Telesto 2018-06-25 19:56:30 UTC
Created attachment 143118 [details]
Example file
Comment 2 Telesto 2018-06-25 19:58:38 UTC
File source: bug 92433
Comment 3 Jean-Baptiste Faure 2018-06-25 20:03:12 UTC
No crash for me under Ubuntu 16.04 x86-64 with the following versions:

Version: 6.2.0.0.alpha0+
Build ID: 03c14b836ab03735870b36c2388fd88782b97550
CPU threads: 4; OS: Linux 4.4; UI render: GL; VCL: gtk3; 
Ubuntu_16.04_x86-64
Locale: fr-FR (fr_FR.UTF-8); Calc: threaded

Version: 6.1.0.0.beta2+
Build ID: 8f56cf1f5b29326371b9c29e2b9ccd81ed760941
Threads CPU : 4; OS : Linux 4.4; UI Render : par défaut; VCL: gtk3; 
Ubuntu_16.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Calc: threaded

Version: 6.0.4.2
Build ID: 1:6.0.4~rc2-0ubuntu0.16.04.1
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group threaded

Best regards. JBF
Comment 4 Aron Budea 2018-06-25 20:29:30 UTC
I got an assert:

https://opengrok.libreoffice.org/xref/core/svl/source/undo/undo.cxx#755
assert(!"SfxUndoManager::Undo: not possible when within a list action!");

With a 6.2 master debug build (7ad1c45c3ef07147681c9f084ae2d0936a2438fe) / Windows 7.
Comment 5 Xisco Faulí 2018-06-25 21:21:01 UTC
I get a crash in

Version: 6.2.0.0.alpha0+
Build ID: dbfa1c452fd9d02330cb3ec5bf2fd4f2c7782d1a
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

if do:

1. Open the attached file
2. Select all
3. Open a new document
4. Paste
5. UNDO
Comment 6 Telesto 2018-06-25 21:25:38 UTC
(In reply to Xisco Faulí from comment #5)
> I get a crash in
> 
> Version: 6.2.0.0.alpha0+
> Build ID: dbfa1c452fd9d02330cb3ec5bf2fd4f2c7782d1a
> CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
> 
> if do:
> 
> 1. Open the attached file
> 2. Select all
> 3. Open a new document
> 4. Paste
> 5. UNDO

Probably bug 117749
Comment 7 Xisco Faulí 2018-06-25 21:40:22 UTC
Regression introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=83243003b46dfb258c2b41049b0e1cb82a2d7ddb, which is the same as in bug 117749

*** This bug has been marked as a duplicate of bug 117749 ***
Comment 8 Telesto 2018-06-25 21:50:31 UTC
@Xisco Faille
Is this really a dupe of bug 117749? Of course, when interpreting it as comment 5. However, de crash happens when pasting, without the undo part. BT differs to
Comment 9 Xisco Faulí 2018-06-25 22:17:56 UTC
(In reply to Telesto from comment #8)
> @Xisco Faille
> Is this really a dupe of bug 117749? Of course, when interpreting it as
> comment 5. However, de crash happens when pasting, without the undo part. BT
> differs to

Just to be sure, have you cleaned your profile?

I can't reproduce it in

Version: 6.2.0.0.alpha0+
Build ID: b047ae6e5bde45555a20a9ad8b7d570d93496187
CPU threads: 16; OS: Windows 6.3; UI render: default; 
Locale: en-GB (en_GB); Calc: group threaded
Comment 10 Aron Budea 2018-06-26 04:09:03 UTC
Also crashes with 6.1 beta2 (x86), but not with x64 / Windows 7.
Crash report:
http://crashreport.libreoffice.org/stats/crash_details/48e2a1fd-9da9-4883-bf90-5b1b08e53370
Comment 11 Aron Budea 2018-06-26 04:32:40 UTC
Bibisected to the following commit using repo bibisect-win32-6.1. Adding Cc: to Serge Krot, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=deaa16bd24fba4a3a6b072ab2b94542a7dbd41c6
author		Serge Krot <Serge.Krot@cib.de>	2018-01-29 12:17:06 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2018-01-31 01:30:39 +0100

tdf#72942 Do not overwrite styles from the inserted doc
Comment 12 Xisco Faulí 2018-06-26 08:37:26 UTC
I can't reproduce it in

Version: 6.2.0.0.alpha0+
Build ID: dbfa1c452fd9d02330cb3ec5bf2fd4f2c7782d1a
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

so it seems to be a only Win problem
Comment 13 Julien Nabet 2018-06-30 13:13:41 UTC
Created attachment 143228 [details]
gdb bt

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.

I attached bt with console logs
Comment 14 Telesto 2018-06-30 15:08:45 UTC
(In reply to Julien Nabet from comment #13)
Did you use the steps of comment 0 or comment 5. The BT looks like comment 5 (and fits bug 117749). This bug probably limited to x86 builds (see comment 10)
Comment 15 Julien Nabet 2018-06-30 16:35:03 UTC
I used your description comment 0.
Comment 16 Julien Nabet 2018-06-30 16:35:50 UTC
Forgot to tell that it crashes after 4. CTRL+SHIFT+V, when choosing RTF and click Insert.
Comment 17 Telesto 2018-07-26 10:16:08 UTC
Not a WriterMultiListener-regressions based on comment 11
Comment 18 Caolán McNamara 2018-08-24 08:06:15 UTC
The commit of "Do not overwrite styles from the inserted doc" results in "don't overwrite or add styles in the inserted doc", but the styles are still set on the paragraphs, and as they don't exist various exceptions are thrown, causing the problem.
Comment 19 Commit Notification 2018-08-27 07:28:21 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1f1e349bbee1b2bff01a850d9a7fe4d6a77c4f29

Resolves: tdf#118382 crash on paste of rtf

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 20 Caolán McNamara 2018-08-27 07:30:36 UTC
backport to 6-1 in gerrit
Comment 21 Commit Notification 2018-08-30 00:20:24 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=634527cf866adf5cc7fb501b09e36bb3f7be89e5&h=libreoffice-6-1

Resolves: tdf#118382 crash on paste of rtf

It will be available in 6.1.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 22 BogdanB 2018-09-15 14:44:31 UTC
Created attachment 144896 [details]
PICTURE: paste without error but not exactly

I attached a picture. No crash on CTRL+SHIFT+V, but the new document looks different by the original document (I don't know if this is a problem).

Version: 6.2.0.0.alpha0+
Build ID: 9a9b81c7212fa6a6762246593acf3f1950677a22
CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-09-08_00:00:43
Locale: ro-RO (ro_RO.UTF-8); Calc: threaded