Bug 64997 - FILEOPEN: Problem with ".doc" file conversion: crash / freeze
Summary: FILEOPEN: Problem with ".doc" file conversion: crash / freeze
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: BSA target:7.2.0
Keywords: bibisected, bisected, filter:doc, haveBacktrace, perf
Depends on:
Blocks: DOC
  Show dependency treegraph
 
Reported: 2013-05-26 10:40 UTC by Emilio Cobos Álvarez (:emilio)
Modified: 2021-08-09 08:12 UTC (History)
3 users (show)

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


Attachments
A doc file from my school. (659.50 KB, application/msword)
2013-05-26 10:40 UTC, Emilio Cobos Álvarez (:emilio)
Details
screenshot of doc in MS Word Viewer (68.00 KB, image/png)
2015-07-11 15:25 UTC, Gordo
Details
reduced document (61.00 KB, application/msword)
2015-09-09 15:56 UTC, Xisco Faulí
Details
Backtrace (8.15 KB, text/plain)
2015-09-09 20:39 UTC, Emilio Cobos Álvarez (:emilio)
Details
bt with debug symbols (12.02 KB, text/plain)
2015-11-08 09:41 UTC, Julien Nabet
Details
DOCX from DOC (559.12 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-06-09 14:45 UTC, Timur
Details
Header from DOC and DOCX compared in MSO 2016 and LO 7.2+ (165.43 KB, image/png)
2021-06-10 08:55 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Cobos Álvarez (:emilio) 2013-05-26 10:40:38 UTC
Created attachment 79797 [details]
A doc file from my school.

Problem description: 
The software isn't able to open the attached file. When you try to open it the program crashes.

My OS is Ubuntu 13.04

Steps to reproduce:
1. Open the file

Current behavior:
The program crashes after trying to convert the file.

Expected behavior:
The program opens after converting the file.

              
Operating System: Ubuntu
Version: 4.0.2.2 release
Comment 1 retired 2013-05-26 12:59:06 UTC
Hi Emilio, thanks for the report.

I can confirm a hang on OS X 10.8.3 with LO 4.0.3.3 when opening the attached file "A doc file from my school.".

Thus setting OS to "All".

Crash log is here: http://paste.ubuntu.com/5703429/
Comment 2 Cor Nouws 2013-05-26 14:36:15 UTC
thanks for report / info.
Was this OK in a previous version, that you know?
Comment 3 Emilio Cobos Álvarez (:emilio) 2013-05-26 19:08:13 UTC
No, not really. I just received the file this morning xD
Comment 4 Emilio Cobos Álvarez (:emilio) 2013-05-26 19:09:47 UTC
PS: How can I see/generate the crash report?
Comment 5 QA Administrators 2015-03-04 02:23:36 UTC Comment hidden (obsolete)
Comment 6 Emilio Cobos Álvarez (:emilio) 2015-03-04 16:02:50 UTC
Bug still present in LibreOffice 4.2.7.2
Comment 7 Gordo 2015-07-11 15:25:52 UTC
Created attachment 117181 [details]
screenshot of doc in MS Word Viewer

Reproducible.

There is an object on the last page that sits over in the left margin with the anchor down below.

Windows Vista 64
Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Comment 8 Xisco Faulí 2015-09-09 15:56:09 UTC
Created attachment 118552 [details]
reduced document

This issue is still present in

Version: 5.0.1.2
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: es-ES (es_ES)

on Windows 7 (64-bit)
Comment 9 Emilio Cobos Álvarez (:emilio) 2015-09-09 20:39:57 UTC
Created attachment 118559 [details]
Backtrace

I downloaded libreoffice source, built it with debug symbols and run `make debugbuild`

I attached the output, and it seems to hang on `SwTextFlyCnt::_GetFlyFrm(SwFrm const*)`...
Comment 10 Julien Nabet 2015-11-08 09:41:29 UTC
Created attachment 120384 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I don't have a crash but a freeze.
I attached a bt at random.
Comment 11 Julien Nabet 2015-11-08 09:49:48 UTC Comment hidden (obsolete)
Comment 12 Mike Kaganski 2015-11-12 12:19:46 UTC
As with bug 76219, the loop is in
void SwLayAction::InternalAction(OutputDevice* pRenderContext)
(sw/source/core/layout/layact.cxx)

Entering the loop
while ( (pPage && !IsInterrupt()) || nCheckPageNum != USHRT_MAX )
it never reaches exit conditions.

Don't know if these are the same, though; the documents don't resemble each other.
Comment 13 Robinson Tryon (qubit) 2015-12-10 02:02:48 UTC Comment hidden (obsolete)
Comment 14 Xisco Faulí 2017-01-26 18:03:58 UTC
It opens if 347bb1634b10eba577742fe8a7edb4b2dd69265d is reverted. Closing as
RESOLVED DUPLICATED of bug 76219

*** This bug has been marked as a duplicate of bug 76219 ***
Comment 15 Timur 2021-06-09 14:31:28 UTC
Of course, not a duplicate.
Resolved in 6.3.
Comment 16 Timur 2021-06-09 14:37:56 UTC
commit 43125276ec9b2a837acb83e96ba1e12e2cc16180
Date:   Sun Apr 7 01:22:48 2019 +0200
    source 421e6fc3cd2e6fe37afbef341e2d0ad7b8edde37
    prev 63497d3a60dfb045cafd6db9ce89c4bff0dc8507

author	Regina Henschel <rb.henschel@t-online.de>	2019-04-02 21:36:57 +0200
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-04-07 01:14:31 +0200
commit 421e6fc3cd2e6fe37afbef341e2d0ad7b8edde37 (patch)
tree 95c3c297eda7d0ac54987a5bd08f6bcdae68d123
parent 63497d3a60dfb045cafd6db9ce89c4bff0dc8507 (diff)
tdf#118375, tdf#70838 correct position of rotated shape in doc
Comment 17 Timur 2021-06-09 14:45:45 UTC
Created attachment 172742 [details]
DOCX from DOC

This bug is about DOC (it is 16 pages). 

Just to store here MSO saved DOCX (17 pages). It opens but it crashes on scroll,  which is another issue.
Comment 18 Timur 2021-06-10 08:00:10 UTC
This bug was about DOC opening. MSO opens 16 pages and LO 17 pages.

As for contents, those are different issues, should be searched separately.
1. Header is different (worth reporting if not found). 
2. Some formulas and shapes in 4. LA DESINTEGRACIÓN RADIACTIVA
3. graph in LEY DE LA DESINTEGRACIÓN RADIACTIVA
4. Formula in 6.RADIACTIVIDAD ARTIFICIAL Y REACCIONES NUCLEARES and 8.REACCIONES DE FISIÓN Y FUSIÓN NUCLEAR

That formula are lighter is known bug.
Layout per pages is not worth reporting. 

DOCX is now bug 142753.
Comment 19 Timur 2021-06-10 08:55:36 UTC
Created attachment 172757 [details]
Header from DOC and DOCX compared in MSO 2016 and LO 7.2+

If header from DOC is saved in MSO as DOCX, it's slightly different there. 
So no wonder LO has problem to open it as in MSO.
I won't report, if someone does, needs to explain what's expected.
Comment 20 Timur 2021-06-10 08:58:12 UTC
Note for header comparison:
" TEMA 9: FÍSICA NUCLEAR" is Segoe Condensed in MSO, which is not available in LO, so it's substituted. Basically not a bug, on should have that font or find replacement or have it embedded.
Comment 21 Timur 2021-06-10 08:59:00 UTC Comment hidden (obsolete)
Comment 22 Xisco Faulí 2021-06-10 09:04:36 UTC
(In reply to Timur from comment #21)
> Xisco, please confirm that Regina's UI test is sufficient also for this case
> of filopen problem.

it's not a UItest, it's an export test in sw/qa/extras/ww8export/ww8export3.cxx.
Anyway, I've created a unittest for this issue as well: https://gerrit.libreoffice.org/c/core/+/116968
Comment 23 Commit Notification 2021-06-10 11:38:47 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/02af9b8ef1f87bb6bc5fee22ad184681b20f201a

tdf#64997: sw_ww8export3: Add unittest

It will be available in 7.2.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 24 Justin L 2021-08-04 08:54:26 UTC
(In reply to Xisco Faulí from comment #22)
> it's not a UItest, it's an export test in
> sw/qa/extras/ww8export/ww8export3.cxx.
> Anyway, I've created a unittest for this issue as well:
> https://gerrit.libreoffice.org/c/core/+/116968

I have reverted the test - perhaps mistakenly - along with the revert for bug 104254. I don't think it is useful to add "does not crash any more" tests just because another patch just happens to avoid the layout crashing condition - as seems likely here. [Regina's code had nothing to do with layout, which I assume is where the hanging was taking place.]
Comment 25 Xisco Faulí 2021-08-09 08:12:37 UTC
(In reply to Justin L from comment #24)
> (In reply to Xisco Faulí from comment #22)
> > it's not a UItest, it's an export test in
> > sw/qa/extras/ww8export/ww8export3.cxx.
> > Anyway, I've created a unittest for this issue as well:
> > https://gerrit.libreoffice.org/c/core/+/116968
> 
> I have reverted the test - perhaps mistakenly - along with the revert for
> bug 104254. I don't think it is useful to add "does not crash any more"
> tests just because another patch just happens to avoid the layout crashing
> condition - as seems likely here. [Regina's code had nothing to do with
> layout, which I assume is where the hanging was taking place.]

Hi Justin,
yep, I think it was a mistake to revert the unittest for this issue, it's still fine after d03aaef3dcb5d142955457ae9b8ca4469cfafa38 < Revert "tdf#104254 sw DOCX import: fix text wrapping in headers" > so there was no need to revert it...