Bug 124937 - crash when trying to open a .doc file
Summary: crash when trying to open a .doc file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All All
: high critical
Assignee: Mark Hung
URL:
Whiteboard: target:6.3.0 target:6.2.5
Keywords: bibisected, bisected, filter:doc, haveBacktrace, regression
Depends on:
Blocks: DOC-Opening
  Show dependency treegraph
 
Reported: 2019-04-24 16:06 UTC by Laura
Modified: 2019-05-20 12:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["SwTextFormatter::MergeCharacterBorder(SwLinePortion &,SwLinePortion const *,SwTextFormatInfo &)"]


Attachments
sample file for LibreOffice crashing (168.00 KB, application/msword)
2019-04-29 14:40 UTC, Laura
Details
bt with debug symbols (6.17 KB, text/plain)
2019-04-29 20:33 UTC, Julien Nabet
Details
Valgrind trace (45.87 KB, application/gzip)
2019-04-29 20:50 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laura 2019-04-24 16:06:21 UTC
Description:
LibreOffice simply doesn't work when I try to open a .doc file (I don't remember this happening with the previous releases -- if it ever did it has been very occasional); the file opens for a second, and then I get a notification that due to an "unexpected error" LibreOffice has stopped working.

I manage to open the file approximately in every 10th attempt.

I manage to open the file instantly if I open it in Microsoft Word first and save it as .docx.

Steps to Reproduce:
First of all even though I tried to download LibreOffice in English (choosing the language option specifically) I get it in Italian only and can't change the language of the interface. So I'm just assuming what the notifications say in EN:

1) I try to open a .doc, and I get a notification "Due to an unexpected error, LibreOffice was blocked.(...)"

2) I then get a 2nd notification for sending an error report and I also have the option to "Restart LibreOffice to access the safe mode"

3) I try to restart LibreOffice and restore the file I had tried to open --> Windows notification "LibreOffice has stopped working". This happens also if I decide NOT to restore the file I had tried to open.

4) All the above points apply also if I open the program in Safe Mode

I have uninstalled the program and reinstalled it and opened it in safe mode but it just keeps crashing.

Actual Results:
The program keeps crashing. Only very occasionally I manage to open the file.

The crash reason is EXCEPTION_ACCESS_VIOLATION_READ 

Workaround is to open it in Microsoft Word and save it as .docx and then open it in LibreOffice -- naturally applies only if you have the access to MS Word, or if not, I suppose you have to get another application for the file conversion.

Expected Results:
It should open the .doc file.


Reproducible: Always


User Profile Reset: No



Additional Info:
Versione: 6.2.3.2 (x64)
Build ID: aecc05fe267cc68dde00352a451aa867b3b546ac
Thread CPU: 2; SO: Windows 6.1; Resa interfaccia: predefinito; VCL: win; 
Versione locale: it-IT (it_IT); Lingua interfaccia: it-IT
Calc: threaded

Also, as said I received the program in Italian even though I specifically downloaded it from the language list as English (US) and I can't change the language of the interface after installing it.
Comment 1 Oliver Brinzing 2019-04-24 17:00:52 UTC Comment hidden (obsolete)
Comment 2 Laura 2019-04-24 17:11:43 UTC
Thanks Oliver,

Many thanks for your reply. I didn't reset the profile because the wiki link you sent (I had already seen it earlier) says the following:

• select Continue in safe mode
• Test and see if the problem is gone.

  •  If the problem persists, you can exit the safe mode because the user profile was not the cause of the problem.

And I did try to use the safe mode but nothing changed.

I'll reset the profile as soon as I can and will update the situation then.

Many thanks again,
Laura
Comment 3 Julien Nabet 2019-04-24 19:00:46 UTC
Does it happen with a specific doc file only or with any doc file?
In the last case, if you create a brand new file on MSOffice containing just "test" and save it with doc extension, does LO crash too?

Did you install some extensions?

Could you give a look to https://wiki.documentfoundation.org/QA/FirstSteps?
It could be interesting to know your UI Rendering.
Comment 4 Laura 2019-04-29 14:40:36 UTC
Created attachment 151070 [details]
sample file for LibreOffice crashing

Please see my comment on April 29th.
Comment 5 Laura 2019-04-29 14:42:43 UTC
Hello everyone,

I managed to reproduce a file that creates/carries the issue I've had recently, and I've attached it.

The file is from a CAT tool (Computer-Assisted Translation) called Wordfast (this particular version is Wordfast Pro 5) and the file is a bilingual report used for reviewing; I use that sometimes for spellcheck, and I have installed an add-on called Voikko (for Finnish) in LibreOffice.

As you can see, the file is full of "comments" - those are for the glossary matches, i.e. (in case you don't know) you can add glossaries/terminologies to the CAT tools and when you translate, the program suggests you preferred translations for certain words.

So all those color-highlighted words/expressions on the left column are present in the glossary that I should follow and on the right the text shows if and how much I have followed the glossary (I now added some obvious ones to the glossary just to create the effect for this test).

So:

1) If I try to open that file as it is now, LibreOffice crashes.

2) If I remove the "comments" in MS Office and then open the file in LibreOffice, it opens just fine.

3) If I open the file on my Mac, that has the version 4.2.6003 of LibreOffice, the file opens without any issues - but it doesn't have the "comments" in it (which I wouldn't need anyway).

Let me know if you need some further information on this.

Many thanks,
Laura
Comment 6 Laura 2019-04-29 14:43:44 UTC Comment hidden (obsolete)
Comment 7 Laura 2019-04-29 14:46:10 UTC
(In reply to Julien Nabet from comment #3)
Hi Julien,

I've now added some further information, see my new comment below. Also, my rendering is "default" (I hadn't yet figured out how to change the UI in English so above the detail "predefinito" refers to it), and I have installed an extension called Voikko. Thanks!
Comment 8 Oliver Brinzing 2019-04-29 16:36:15 UTC
confirming crash with:

Version: 6.2.3.2 (x64)
Build-ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

no crash with:

Version: 6.1.6.2 (x64)
Build-ID: 104be1be28d1c5200e1c50b0a00747fe8c907aa8
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc:
Comment 9 Julien Nabet 2019-04-29 20:33:12 UTC
Created attachment 151076 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 10 Julien Nabet 2019-04-29 20:50:23 UTC
Created attachment 151077 [details]
Valgrind trace
Comment 11 Xisco Faulí 2019-04-30 10:11:50 UTC
Also reproduced in

Version: 6.3.0.0.alpha0+
Build ID: f45f8d0c6eb1d5d28a92399b82d13c2894f06069
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 12 Xisco Faulí 2019-04-30 10:23:18 UTC
Regression introduced by:

author	Mark Hung <marklh9@gmail.com>	2016-07-28 20:20:26 +0800
committer	Mark Hung <marklh9@gmail.com>	2016-08-24 00:06:38 +0000
commit	d5fab973d0af95c433c5f6a9492014f7db642489 (patch)
tree	f19158f0387942588c76dda42293b377fb462273
parent	cc497d86e092315f78a89f3ace8b81623dad7b46 (diff)
tdf#87224 Merge character borders across different scripts.

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Mark Hung
Comment 13 Mark Hung 2019-05-05 17:24:46 UTC
SwLinePortion::Truncate() called in SwTextFormatter::FormatReset() delete the portion referred by m_pFirstOfBorderMerge.
Comment 14 Commit Notification 2019-05-18 02:34:22 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

tdf#124937 reset m_pFirstOfBorderMerge before truncate.

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 15 Commit Notification 2019-05-20 09:35:31 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

tdf#124937 reset m_pFirstOfBorderMerge before truncate.

It will be available in 6.2.5.

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 16 Xisco Faulí 2019-05-20 09:42:33 UTC
Verified in

Version: 6.3.0.0.alpha1+
Build ID: 9c7fac47aacb0877c7d212217089a680400c1377
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Mark Hung, thanks for fixing this issue!
Comment 17 Laura 2019-05-20 12:19:39 UTC
Excellent, many thanks! So, do you recommend uninstalling LibreOffice and downloading & installing the latest version again?
Comment 18 Xisco Faulí 2019-05-20 12:22:08 UTC
(In reply to Laura from comment #17)
> Excellent, many thanks! So, do you recommend uninstalling LibreOffice and
> downloading & installing the latest version again?

Please, wait until LibreOffice 6.2.5 is available at the beginning of July
Comment 19 Laura 2019-05-20 12:23:23 UTC
(In reply to Xisco Faulí from comment #18)

> Please, wait until LibreOffice 6.2.5 is available at the beginning of July

Ok will do thanks!