Bug 118170 - LibreOffice Writer crash if I insert a rtf document into a Text Document
Summary: LibreOffice Writer crash if I insert a rtf document into a Text Document
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.6.2 release
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 15:56 UTC by robert.rong
Modified: 2018-06-18 17:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["com::sun::star::uno::Reference<com::sun::star::text::XTextAppend>::operator=(com::sun::star::uno::Reference<com::sun::star::text::XTextAppend> const &)"]


Attachments
the rtf cause LIbreOffice Writer crash (123.51 KB, application/msword)
2018-06-14 17:16 UTC, robert.rong
Details
the screenshot open the rtf directly in LibreOffice (74.33 KB, image/png)
2018-06-15 14:36 UTC, robert.rong
Details
the screenshot insert the rtf into a text document (128.17 KB, image/png)
2018-06-15 14:37 UTC, robert.rong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert.rong 2018-06-14 15:56:20 UTC
Description:
The rtf document can be opened and displayed in LibreOffice Writer. But the same document cause LibreOffice Writer crash when I insert it into a Text Document.

Steps to Reproduce:
1. Lanuch LibreOffice Writer on Windows 7
2. select File ->New -> Text Document
3. focus on the document pane
4. select Insert -> Document, browse and select the rtf 'bug3.rtf' (the rtf is attached)
5. click 'Insert' button on the Insert window.
6. LibreOffice crash

Actual Results:
LibreOffice Writer crash

Expected Results:
The content of the rtf file 'bug3.rtf' should be display insert into the document.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
This crash happen when I insert the rtf document into a Text document, it doesn't happen when I open the rtf in LibreOffice.

The rtf 'bug3.rtf' can be open and viewed if I open the rtf file directly in LibreOffice.

In LibreOffice go to File -> Open, then browse and select the 'bug3.rtf', click 'Open' button on the Open window. see the bug3.rtf open in LibreOffice Writer.
Comment 1 Xisco Faulí 2018-06-14 16:21:08 UTC
Could you please attach the document ?
Comment 2 Xisco Faulí 2018-06-14 16:43:47 UTC
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 3 robert.rong 2018-06-14 17:16:36 UTC
Created attachment 142756 [details]
the rtf cause LIbreOffice Writer crash
Comment 4 robert.rong 2018-06-14 17:19:03 UTC
Thanks for the quick response.

Here is the crash report.
http://crashreport.libreoffice.org/stats/crash_details/7a73044a-f051-4c0a-8c55-5acad46ed9f9

the rtf was attached.
Comment 5 Roman Kuznetsov 2018-06-14 18:48:12 UTC
confirmed with file from attach in
Version: 5.4.7.2 (x64)
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL


crashreport.libreoffice.org/stats/crash_details/08201847-21b4-48bd-9a33-52fe10dc4416

but i don't see menu item Insert > Document into LibreOffice 6.0.4 and 6.1 beta 1

Xisco, what do you think? There isn't item of menu - there isn't a problem?
Yousuf moved items of menu and forgot about this menu item?
Comment 6 Buovjaga 2018-06-14 19:06:28 UTC
In latest versions, the menu is Insert - Text from file.

It does not crash for me. Please test with recent master.

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 90e4c55d01637178418c33ffe818263114a53374
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-06-11_23:27:09
Locale: fi-FI (fi_FI); Calc: group threaded

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 8447d31e529985ef7fc71933f0e55685530f9fc9
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 14th 2018
Comment 7 Roman Kuznetsov 2018-06-14 19:19:31 UTC
(In reply to Buovjaga from comment #6)
> In latest versions, the menu is Insert - Text from file.
 

are you sure?

if i use this item "Insert - Text from file", then no crash, text from RTF just adds into document. In

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

And updates for 5.4.x will not be. WONT FIX?
Comment 8 Buovjaga 2018-06-14 19:20:51 UTC
(In reply to kompilainenn from comment #7)
> (In reply to Buovjaga from comment #6)
> > In latest versions, the menu is Insert - Text from file.
> are you sure?

https://cgit.freedesktop.org/libreoffice/core/commit/?id=67d245adca298134fc8ab4364acbe880b4e0911a

-          <value xml:lang="en-US">Doc~ument...</value>
+          <value xml:lang="en-US">Text from File...</value>
Comment 9 Buovjaga 2018-06-14 19:21:29 UTC
Yeah, let's be happy with worksforme.
Comment 10 Xisco Faulí 2018-06-14 19:40:07 UTC
Sorry for the FIXED change.
AS you can see in https://crashreport.libreoffice.org/stats/signature/com::sun::star::uno::Reference%3Ccom::sun::star::text::XTextAppend%3E::operator=(com::sun::star::uno::Reference%3Ccom::sun::star::text::XTextAppend%3E%20const%20&), it's fixed and no longer reproducible in 6.0.3.2 and 6.0.4.2
Comment 11 Xisco Faulí 2018-06-14 19:41:13 UTC
@Robert Rong, please update to the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/
Comment 12 robert.rong 2018-06-15 14:34:47 UTC
tested on Windows 7 with LibreOffice 6.0.4.2 (x64)

confirmed that insert bug3.rtf to a Text Document will not crash LibreOffice.

But there are missing text lines and wrong layout with the inserted text:

the attached screenshot DirectOpenRTF_bug3.rtf.png is the content viewed in LibreOffice by directly open the file bug3.rtf (File -> Open -> select bug3.rtf)

the attached screenshot Insert_bug3.rtf.png is the content viewed in LibreOffice by insert the file bug3.rtf into a Text document (File ->New -> Text Document, then Insert -> Text from File and select bug3.rtf)

The differences:

1. The second table was put at the top of the page, it should be in the middle of the page.  (see note 1 on the attached screenshot Insert_bug3.rtf.png)

2. Missing content in the third table (see note 2 on the attached screenshot Insert_bug3.rtf.png) 

3. missing text lines "OPTINIAO:",  "Exame sem ..." and "Medidas das ..." (see note 3 on the attached screenshot DirectOpenRTF_bug3.rtf.png)
Comment 13 robert.rong 2018-06-15 14:36:00 UTC
Created attachment 142773 [details]
the screenshot open the rtf directly in LibreOffice

see the expected content and layout
Comment 14 robert.rong 2018-06-15 14:37:13 UTC
Created attachment 142775 [details]
the screenshot insert the rtf into a text document

the actual result: missing text and wrong table position
Comment 15 Roman Kuznetsov 2018-06-15 14:48:18 UTC
(In reply to robert.rong from comment #12)
> tested on Windows 7 with LibreOffice 6.0.4.2 (x64)
> 
> confirmed that insert bug3.rtf to a Text Document will not crash LibreOffice.
> 

good point

> But there are missing text lines and wrong layout with the inserted text:
> 
> ... 
>
> The differences:
> 
> 1. The second table was put at the top of the page, it should be in the
> middle of the page.  (see note 1 on the attached screenshot
> Insert_bug3.rtf.png)
> 
> 2. Missing content in the third table (see note 2 on the attached screenshot
> Insert_bug3.rtf.png) 
> 
> 3. missing text lines "OPTINIAO:",  "Exame sem ..." and "Medidas das ..."
> (see note 3 on the attached screenshot DirectOpenRTF_bug3.rtf.png)

Please fill a new bug about this problem because this is another problem
Comment 16 robert.rong 2018-06-15 15:14:41 UTC
Opened a bug for the content issue with inserted rtf.
https://bugs.documentfoundation.org/show_bug.cgi?id=118181