Issue 123578 - CRASH / freeze when open particular .doc
Summary: CRASH / freeze when open particular .doc
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: 4.0.1
Hardware: All All
: P3 Major (vote)
Target Milestone: 4.1.0
Assignee: Oliver-Rainer Wittmann
QA Contact: zhaoshzh
URL:
Keywords: crash, regression
Depends on:
Blocks:
 
Reported: 2013-10-30 09:39 UTC by fanyuzhen
Modified: 2014-04-03 06:50 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Doc file to freeze AOO (426.00 KB, application/msword)
2013-10-31 06:22 UTC, fanyuzhen
no flags Details
PDF of given document created by printing from Microsoft Word 2003 via CutePDF Writer (500.42 KB, application/pdf)
2013-10-31 08:57 UTC, Oliver-Rainer Wittmann
no flags Details
PDF export from AOO 4.0.1 WIN (does not hang) (432.95 KB, application/pdf)
2013-10-31 10:33 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description fanyuzhen 2013-10-30 09:39:19 UTC
Steve Guo reports a freeze defect as below

I'm using AOO4.0.1(Build 9714, Rev 1524958) to open the file in the attachment, but AOO4.0.1 get freezed. The problem cannot be reproduced against AOO4.0(Build 9702).
I also find once remove the 'repeat headings' attribute from the first row of the first table under section 'Exercise 2' and resave to a new DOC by MS Word 2003, the problem will disappear. But I believe it is not related to that attribute because I also tried to delete all contents except the content under section 'Exercise 2', leaving the content under section 'Exercise 2' including the table(and the table layout is same with it's original layout) there, and resave to a new DOC, then problem will disappear too. So I guess maybe the problem is because of layout?
Comment 1 fanyuzhen 2013-10-30 09:42:23 UTC
I make an error, the problem is reported by Clarence Guo, not Steve Guo. I am contacting Clarence to get the doc file.
Comment 2 Rainer Bielefeld 2013-10-30 11:56:20 UTC
We have several open .doc will hang, but currently I can not find any other one where the problem starts with 4.0.1, so this one indeed might describe a new bug.
Comment 3 fanyuzhen 2013-10-31 06:22:51 UTC
Created attachment 81849 [details]
Doc file to freeze AOO
Comment 4 Rainer Bielefeld 2013-10-31 06:41:38 UTC
NOT reproducible with "AOO 4.0.1   – German UI / German locale  [Rev. 1524958 2013-09-20 11:40:29]" on  German WIN7 Home Premium (64bit)", “historic”  4.0  User Profile used for all  predecessor versions. I can open attached sample 2013-10-31 07:22 CET from AOO Start Center without any problem. 

May be we can get some information concerning Steve Guo's Operating System and PC (Pentium I 500 MB RAM?)
Comment 5 Oliver-Rainer Wittmann 2013-10-31 08:27:16 UTC
I had a short look:
- On my system (Windows 7 64bit, English) I can reproduce the freeze with AOO 4.0.0 en_US, AOO 4.0.0 de and AOO 4.0.1 en_US.
- On another system (Windows 7 64bit, German) I can also reproduce the freeze with AOO 4.0.0 en_US
- On a Ubuntu VM I can _not_ reproduce the freeze with AOO 4.0.1 en_US. But the layout of the 'Table5' on page 12 and 13 is not correct.
- With my local debug build I figured out that the freeze is a 'loop' in the layout algorithm in Writer.
- I also observed an 'incorrect' layout of 'Table5' in OOo 3.3.0 en_US on my system.
--> As the freeze is a 'layout loop' the different experience on different systems could be explained.
Comment 6 Oliver-Rainer Wittmann 2013-10-31 08:41:26 UTC
With AOO 4.0.1 de on the Windows 7 64bit, German system I also reproduced the freeze.
Comment 7 Rainer Bielefeld 2013-10-31 08:45:37 UTC
Tricky thing ...

I think no essential info missing after after Oliver-Rainer's research, after recognized loop I believe info concerning reporter's system no longer will be required?

BTW, also no problem with server installation of "AOO 4.1.0-Dev – English  UI / German locale - [AOO410m1(Build:9750)  -  Rev. 1536316 - 2013-10-30]" on German WIN7 Home Premium (64bit)", own separate user profile.
Comment 8 Rainer Bielefeld 2013-10-31 08:48:42 UTC
.
Comment 9 Oliver-Rainer Wittmann 2013-10-31 08:54:53 UTC
(In reply to Rainer Bielefeld from comment #7)
> Tricky thing ...
> 

Yes, it is somehow tricky.

Just a question:
How is the layout of 'Table5' in your AOO installations?

I will attach a PDF created by printing from Microsoft Word 2003 via CutePDF Writer.
Comment 10 Oliver-Rainer Wittmann 2013-10-31 08:57:13 UTC
Created attachment 81850 [details]
PDF of given document created by printing from Microsoft Word 2003 via CutePDF Writer
Comment 11 Rainer Bielefeld 2013-10-31 10:33:13 UTC
Created attachment 81852 [details]
PDF export from AOO 4.0.1 WIN (does not hang)

So it looks for me with WIN AOO 4.0.1, quick check did not show significant differences between PDF export and original document view.
Comment 12 Clarence GUO 2013-11-05 06:17:31 UTC
Another finding.
Open the sample by MS Word, it only has 14 pages, however open it by AOO4.0, it has 25 pages. Check page number from the tail of the sample backward, it is 24, 22, 20... so there are many blank pages.
Open the sample by MS Word 2003, open options dialog from Tools->Options, switch to view tab page, check "All" under "Formatting Marks" section, go to page4, you will find a section there "Section Break(Odd Page)", delete this break and insert a section break type as "Next page" from Insert->Break, resave to a new DOC.
Open this new DOC by AOO4.0, there's only 15 pages and no freeze.
So it seems, that's because of the blank pages caused by "Section Break(Odd Page)", the freeze happen.
Comment 13 Clarence GUO 2013-11-13 08:21:25 UTC
I did a simple test about page breaks. Input several lines in a document, for example,

AAA
BBB
CCC
DDD

then insert a left/right page break after 'AAA', the all content from 'BBB' will be moved to a new page(2nd or 3rd page according to left or right page break you inserted. Continuously input 'Enter' key after 'BBB', once every time 'CCC' was moved to a new page, you will find always a blank page will be inserted first.
So seems when AOO insert left/right page breaks, it will insert a left/right blank page beside every real page. It is not like the behavior in MS Word. In Word, insert odd/even page will insert only at largest 1 empty page because in word insert odd/even page means the following content will be start at a new odd/even page but will never affect following pages.
I cannot understand AOO's behavior. There's no detailed information on AOO help. I think Word's behavior is reasonable.
Could anybody teach me why AOO adapt such behavior?
Comment 14 Oliver-Rainer Wittmann 2013-11-13 12:17:18 UTC
(In reply to Clarence GUO from comment #13)
> 
> [snip...]
> 
> So seems when AOO insert left/right page breaks, it will insert a left/right
> blank page beside every real page. It is not like the behavior in MS Word.
> In Word, insert odd/even page will insert only at largest 1 empty page
> because in word insert odd/even page means the following content will be
> start at a new odd/even page but will never affect following pages.
> I cannot understand AOO's behavior. There's no detailed information on AOO
> help. I think Word's behavior is reasonable.
> Could anybody teach me why AOO adapt such behavior?

Page Styles and the corresponding behavior is a feature of AOO. Such a feature is not available in Microsoft Word.
One feature of Page Styles is that you can defined that it only creates left/right resp. even/odd pages. This is the case for the built-in Page Styles "Left Page" and "Right Page".
Thus, the behavior you are observing in AOO regarding Page Styles is intended. It can not be compared to any existing feature in Microsoft Word.
Comment 15 Oliver-Rainer Wittmann 2013-11-13 12:17:47 UTC
I will take care of this issue.
Comment 16 Oliver-Rainer Wittmann 2013-11-19 10:46:11 UTC
Changes made for bug 119620 causes imported page style "Convert 1" to be only applied for for right pages. This may be causes Clarence' comment #13 on OpenOffice's page style behavior which is not available in Microsoft Word.
Comment 17 Oliver-Rainer Wittmann 2013-11-19 15:58:56 UTC
fix in progress
Comment 18 SVN Robot 2013-11-20 13:26:35 UTC
"orw" committed SVN revision 1543811 into trunk:
123578: adjust table layout algorithm to avoid layout loops
Comment 19 SVN Robot 2013-11-20 13:32:31 UTC
"orw" committed SVN revision 1543812 into trunk:
123578: revert part of changes made for bug 119620 as page styles for only le...
Comment 20 Oliver-Rainer Wittmann 2013-11-20 13:35:29 UTC
fixed on trunk for the next release
Comment 21 liuping 2014-02-25 06:05:14 UTC
verify AOO410m1(Build:9750)  -  Rev. 1570848
Rev.1570848,Pass
Comment 22 zhaoshzh 2014-02-27 03:03:00 UTC
verified on  AOO410m1(build:9750) - rev:1566593
Comment 23 Clarence GUO 2014-04-03 06:50:38 UTC
Verified on trunk build rev. 1582712, fixed.
ENV: Win7 64 bit professional SP1
Close the defect