Bug 134693 - The Write crashes when I "cut and paste" a text from a PDF document
Summary: The Write crashes when I "cut and paste" a text from a PDF document
Status: RESOLVED DUPLICATE of bug 126179
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: high major
Assignee: Not Assigned
Keywords: bibisected, bisected, regression, wantBacktrace
: 133531 (view as bug list)
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
Reported: 2020-07-09 14:58 UTC by Gustavo Branco Jr
Modified: 2021-01-15 12:23 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:
Regression By:

PDF document for example (378.38 KB, application/pdf)
2020-07-13 13:40 UTC, Gustavo Branco Jr
Table as InsideClipboard file (35.47 KB, application/octet-stream)
2020-07-14 18:33 UTC, Telesto
Bibisect log (3.06 KB, text/plain)
2020-07-14 18:42 UTC, Telesto

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Branco Jr 2020-07-09 14:58:01 UTC
I was writing a text with a Write when I needed to cut and to paste a text from a PDF document. So, when I decided to undo the copy and I typed Ctrl Z, the Write crashed.
Write version (x64)
Adobe Acrobat Reader DC version 2020.009.20074
OS Windows 10.0 Build 18362 

Steps to Reproduce:
1. cut a paragraph from a PDF document with Acrobat Reader (ctrl C)
2. paste on Write document (Ctrl V)
3. then, type "Ctrl Z", the Write will crash

Actual Results:
The LibreOffice crashes

Expected Results:
Undo the copy

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Version: (x64)
Build ID: 04ba7e3f1e51af6c5d653e543a620e36719083fd
Threads da CPU: 4; SO: Windows 10.0 Build 18362; Realizador da interface: Skia/Vulkan; VCL: win
Locale: pt-BR (pt_BR); Interface: pt-BR
Calc: threaded
Comment 1 Gustavo Branco Jr 2020-07-09 15:11:39 UTC
The copy needs to be made from a table in the PDF document. Normal text paragraphs do not cause the problem.
Comment 2 Telesto 2020-07-09 15:21:56 UTC
Any change to share a PDF with tables where this is happening. I'm only getting text pastes (so without table)
Comment 3 Xisco Faulí 2020-07-09 18:58:47 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 4 Gustavo Branco Jr 2020-07-13 13:40:26 UTC
Created attachment 162974 [details]
PDF document for example

This PDF document is to simulate the failure:
Open the document with "Adobe Acrobat Reader DC" and look for the table on page 05 "TABELA DE DESEMPENHO RF".
Copy some lines from the table (Ctrl C) and paste in the Write document(Crtl V - mode: Rich text formating RTF). After copying, press "Ctrl Z".
Comment 5 Roman Kuznetsov 2020-07-14 17:36:28 UTC
I got a crash after copying part of the table from Acrobat Reader (but only from it! I tried PDF Exchange Viewer and Chrome), pasting it as RTF and undoing it


Version: (x64)
Build ID: 04ba7e3f1e51af6c5d653e543a620e36719083fd
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

crashreport.libreoffice.org/stats/crash_details/60a4c4df-33ac-433a-a87f-db38bba31339 - from LO 6.3.3
Comment 6 Telesto 2020-07-14 18:33:46 UTC
Created attachment 163024 [details]
Table as InsideClipboard file

For the people without Adobe
1. Download https://www.nirsoft.net/utils/insideclipboard.zip
2. Open File -> Table on the clipboard
Comment 7 Telesto 2020-07-14 18:42:52 UTC
Created attachment 163025 [details]
Bibisect log

Bisected to
author	Michael Stahl <Michael.Stahl@cib.de>	2019-04-05 19:30:45 +0200
committer	Caolán McNamara <caolanm@redhat.com>	2019-04-13 20:28:39 +0200
commit 9dbff5b4e1dabb715ed146827f69f8fbaba8644a (patch)
tree 833960d75a36c3ff5235bd653c53889cfdbbce0b
parent 915ec0b5f5ce9a2da6a51f5278ea4faaffa19839 (diff)
writerfilter: implement RTF derived styles defaulting
It turns out that the situation fixed in commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 also applies to the definition
of the styles themselves.

To implement the same style import as Word, the style definitions need
to be stored twice: once as read from the file, and another time with
attributes defaulted and deduplicated vs. the parent style; the second
representation is then sent to the domain mapper.

To make this easier, add a bool parameter to cloneAndDeduplicate()
to disable the implicit pPr dereferencing that happens when creating the
hard formatted paragraph properties (this could potentially be cleaned
up further if those paragraph properties would use pPr wrapper

Also implement defaulting of line spacing in getDefaultSPRM().

Comment 8 Telesto 2020-07-14 18:43:34 UTC
Adding CC: to Michael Stahl
Comment 9 Michael Stahl (allotropia) 2020-07-15 09:41:24 UTC
if it crashes in undo, and it's bisected to a writerfilter change, then i'll assume the crash is not caused by the commit, but a pre-existing problem that was just not reachable by this scenario previously, but probably reachable in a different way previously.
Comment 10 Telesto 2020-07-16 14:35:16 UTC
Would you mind checking the bibisect; to be sure. 

You can load clp in Inside clipboard; after that you just paste in writer. 

Of course, you might opt for using Adobe Acrobat..
Comment 11 Martin Srdoš 2020-12-21 10:07:29 UTC
*** Bug 133531 has been marked as a duplicate of this bug. ***
Comment 12 Justin L 2021-01-15 12:23:15 UTC
I didn't at first notice that this bibisect likely pointed to the wrong commit. Since it sounds exactly like bug 126179, lets mark this as its duplicate.

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