Issue 124096

Summary: CRASH when page preview or close particular document
Product: Writer Reporter: Jens611 <jd>
Component: save-exportAssignee: Oliver-Rainer Wittmann <orw>
Status: CLOSED FIXED QA Contact: Clarence GUO <clarence.guo.bj>
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, awf.aoo, elish, fanyuzhen, issues, orw, rainerbielefeld_ooo_qa
Version: 4.0.1Keywords: crash, regression
Target Milestone: 4.1.0   
Hardware: PC   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Sample document none

Description Jens611 2014-01-24 06:54:16 UTC
If I press close while the writer is exporting a document to a *.pdf file, the application aborts and has to be recovered at restart.
Comment 1 Edwin Sharp 2014-01-24 08:03:30 UTC
Where do you press close?
What is your operating system?
Comment 2 Jens611 2014-01-24 09:16:10 UTC
In the upper right corner on a Win 8 machine.
Comment 3 Rainer Bielefeld 2014-01-27 18:20:43 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

My test:
1. New writer Document from AOO Start Center
2. Create 350 pages Lorem Ipsum contents
3. Save as 'Sample.odt'
4. Menu 'File -> Export as PDF -> Lossless -> no redruced graphic resolution
   -  all rest unchecked in General-TAB
   -> Initial View -TAB: all first radio buttons 
   -> UI-TAB: all unchecked, all bookmark levels
   -> Security-TAB: Nothing done
   -> Links-TAB: only 'RULs relative' checked, 
                 Cross-Document-Links = Default mode
      [Export] -> [Export] (with auto-filename-extensio
5. After 20% Progress bar click 'Close-X' at top right corner of AOO window
   No Crash, 'Close-X' click will be ignored.

I also tried via 'Export ...', also no crash

Jens611:
Thank you for your feedback – unfortunately important information we will 
need to reproduce your problem is missing.
Please add all information requested in following:
a) Write a meaningful Summary describing exactly what the problem is
b) Attach a sample document (not only screenshot) or refer to an existing 
  sample document in an other Bug with a link; to attach a file to this 
  bug report, just click on "Add an attachment" right on this page.
  If you want to attach a test kit with multiple documents zip them into
  a single testkit.zip and attach the  testkit.zip
c) Contribute a document related step by step instruction containing every 
  key press and every mouse click how to reproduce your problem 
e) if possible contribute an instruction how to create a sample document 
  from the scratch
f) add information 
  f3) concerning your PC (video card, ...)
  f4) concerning your Operating System (Version, Distribution, Language)
  f5) concerning your AOO version (with Build/revision ID if it's not a 
     public release) and localization (UI language, Locale setting)
  f6) AOO settings that might be related to your problems 
     (video hardware acceleration, ...)
  f7) how you launch AOO and how you opened the sample document
  f8) Whether your problem persists when you renamed your user profile 
     (Quit Quickstart before!) before you launch AOO (please see
     <http://www.openoffice.org/development/releases/3.4.1.html#AOO3.4.1ReleaseNotes-KnownIssues>)
  f9) Whether that worked in former OOO / AOO Versions 
  f10) Whether that is 100% reproducible for you with any kind of Writer 
       document
  f11) Whether also CALC is affected.
 
Please do not cite these hints in your reply, but cite the items like:
c): Yes, also in CALC, not in Impress
Comment 4 Jens611 2014-01-28 06:28:43 UTC
I just did this

1. copy the article only to the clipboard from 

http://blogs.hbr.org/2014/01/strengthen-your-strategic-thinking-muscles/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+harvardbusiness%2Fweekly-hotlist+%28HBR+Blog+Network+Newsletter+Feed+-+Weekly+Hotlist%29&cm_ite=WeeklyHotlist-012714+%281%29&cm_lm=sp%3Ajd%40cococo.de&cm_ven=Spop-Email

2. create new text document in OO

3. paste it from clipboard

4. change to print preview

5. press export the PDF button and start saving the document

6. immediate afterwards press right upper cross

7. a crash window appeared
Comment 5 Rainer Bielefeld 2014-01-28 07:58:42 UTC
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

For me document with mentionend  contents also crashes in other situations:
(a) Crash when simply close document with click on "Close-X"
(b) Crash when Click 'Page Preview' icon in Standard Toolbar.
(c) (a) and (b) already crash with
    ? If necessary I can try to find out when the problem started
(d) (a) and (b) did not crash with
    * "AOO 4.0.0 Final – German UI / German locale [AOO400m3(Build:9702) - 
       Rev. 1503704 2013-07-16 14:54:56 (Di, 16 Jul 2013)]" on
       German German WIN7 Home Premium (64bit)", Common 4.0-dev User Profile
    * server installation of "AOO 3.4.0 – German UI / German locale 
     [AOO340m1(Build:9590) - Rev.1327774]" on German WIN7 Home Premium (64bit)"
     own separate user profile
    * OOo 3.1.1


@Jens611:
Can you confirm my observation that also other actions crash?

@Edwin:
Can you please check whether also Linux is affected?
Comment 6 Rainer Bielefeld 2014-01-28 08:00:05 UTC
Created attachment 82408 [details]
Sample document

For me crashes (a) and (b) are reproducible with attached sample document.
Comment 7 Armin Le Grand 2014-01-29 17:16:39 UTC
Took a look, I alraedy get lots of assertions during load. Assertions continue when scrolling a little bit down, then office hangs already.

Here is the list from load:

******************************************************************************
dbgsv.log
Wed Jan 29 10:15:55 2014

Error: OElementImport::implApplyGenericProperties: unsupported value type! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 463
Error: OElementImport::EndElement: could not set the property "ObjIDinMSO"! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 481
Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246
Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246
Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246
Error: OElementImport::implApplyGenericProperties: unsupported value type! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 463
Error: OElementImport::EndElement: could not set the property "ObjIDinMSO"! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 481
Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246
Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246
Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246
Error: Assertion failed
==================
FILE      :  c:/aoo/svn_trunk45/main/sw/source/core/layout/tabfrm.cxx at line 3499
ERROR :  "SwTabFrm::FindLastCntnt failed" From File c:/aoo/svn_trunk45/main/sw/source/core/except/errhdl.cxx at Line 80
Error: Assertion failed
==================
FILE      :  c:/aoo/svn_trunk45/main/sw/source/core/layout/tabfrm.cxx at line 3499
ERROR :  "SwTabFrm::FindLastCntnt failed" From File c:/aoo/svn_trunk45/main/sw/source/core/except/errhdl.cxx at Line 80
Error: Assertion failed
==================
FILE      :  c:/aoo/svn_trunk45/main/sw/source/core/layout/tabfrm.cxx at line 3499
ERROR :  "SwTabFrm::FindLastCntnt failed" From File c:/aoo/svn_trunk45/main/sw/source/core/except/errhdl.cxx at Line 80
Comment 8 Armin Le Grand 2014-01-29 17:18:29 UTC
And when scrolling:

Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857
Error: WebDAV Parse error (!) From File C:/aoo/svn_trunk45/main/ucb/source/ucp/webdav/webdavresponseparser.cxx at Line 857

Getting sw and xmloff with debug, looking at the file xml content...
Comment 9 Armin Le Grand 2014-01-29 17:21:22 UTC
There are comments in the document, the comment display looks strange (checkable if load survived). Adding olli to CC...
Comment 10 Armin Le Grand 2014-01-29 21:22:04 UTC
The unsupported value type is TypeClass_UNSIGNED_SHORT, checking if I can simply add it to the switch statement, its a control import of a control of type ControlTypeinMSO (or one before it?).
Comment 11 Armin Le Grand 2014-01-29 21:30:09 UTC
Its a ObjIDinMSO. Looking at the content shows

<office:document-content 
  xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
  xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
  xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
  xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
  xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
  xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
  xmlns:xlink="http://www.w3.org/1999/xlink" 
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
  xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
  xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
  xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
  xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
  xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
  xmlns:math="http://www.w3.org/1998/Math/MathML" 
  xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
  xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
  xmlns:ooo="http://openoffice.org/2004/office" 
  xmlns:ooow="http://openoffice.org/2004/writer" 
  xmlns:oooc="http://openoffice.org/2004/calc" 
  xmlns:dom="http://www.w3.org/2001/xml-events" 
  xmlns:xforms="http://www.w3.org/2002/xforms" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:rpt="http://openoffice.org/2005/report" 
  xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
  xmlns:xhtml="http://www.w3.org/1999/xhtml" 
  xmlns:grddl="http://www.w3.org/2003/g/data-view#" 
  xmlns:tableooo="http://openoffice.org/2009/table" 
  xmlns:textooo="http://openoffice.org/2013/office" 
  xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2">

Looks like some experimental, non ODF-compatible extensions were used; probably not written by AOO.
Comment 12 Armin Le Grand 2014-01-29 21:37:33 UTC
Simple working around te wrong types is not enough, the next error (Error: OElementImport::EndElement: did not find a name attribute! From File c:/aoo/svn_trunk45/main/xmloff/source/forms/elementimport.cxx at Line 246) comes up.
This is simply not an ODF compatible file; I am not the expert but looks so to me. Beware of apps writing non-ODF compatible files, they will force you in a similar dependent relationship as MS does...
Comment 13 Oliver-Rainer Wittmann 2014-02-13 09:31:36 UTC
taking over to have a closer look.
Comment 14 Oliver-Rainer Wittmann 2014-02-13 11:30:32 UTC
(In reply to Jens611 from comment #4)
> I just did this
> 
> 1. copy the article only to the clipboard from 
> 
> http://blogs.hbr.org/2014/01/strengthen-your-strategic-thinking-muscles/
> ?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+harvardbusiness%2
> Fweekly-hotlist+%28HBR+Blog+Network+Newsletter+Feed+-
> +Weekly+Hotlist%29&cm_ite=WeeklyHotlist-
> 012714+%281%29&cm_lm=sp%3Ajd%40cococo.de&cm_ven=Spop-Email
> 
> 2. create new text document in OO
> 
> 3. paste it from clipboard
> 
> 4. change to print preview
> 
> 5. press export the PDF button and start saving the document
> 
> 6. immediate afterwards press right upper cross
> 
> 7. a crash window appeared

I used the Internet Explorer on Windows 7 to copy the mentioned article. I opened the website, select all (Ctrl-A) and copied it (Ctrl-C).
Behavior in Writer will depend on what exactly is copied into the clipboard (e.g. what kind of browser options/plug-ins were blocking the one or the other website content).
I am observing crashes in AOO 3.4.0, AOO 3.4.1, AOO 4.0.0 and AOO 4.0.1 on step 4 and on close of the document directly after the content has been pasted.

When I am using my Firefox which blocks the one or the further content I am observing the following:
- AOO 3.4.0: no crashes, during PDF export in page preview no close document is possible
- AOO 3.4.1: no crashes, during PDF export in page preview no close document is possible
- AOO 4.0.0: crash as described above as it is possible to close document while the PDF export is running. Note: You have to be fast or use Ctrl-W to close document right after triggering the PDF export.
- AOO 4.0.1: abort, but no "crash window" as described above. Instead of a crash window I got an error message, but AOO is killed afterwards.

With the given sample document from Rainer I observed the following:
- AOO 3.4.0: no crashes
- AOO 3.4.1: crash on step 4 and close document after load
- AOO 4.0.0: crash on step 4, but no crash on close document after load
- AOO 4.0.1: no crashes
These observations were strange.
Thus, I 'cleaned' the user profiles of my AOO 3.4.1 and AOO 4.0.0. The observations are:
- copy-and-paste from given website
-- AOO 3.4.1: crash on step 4 and close document after load
-- AOO 4.0.0: crash on step 4 and close document after load
- sample document from Rainer
-- AOO 3.4.1: no crashes
-- AOO 4.0.0: crash on step 5 (bug 122868 solved in AOO 4.0.1)
Somehow the results are now consistent.

We have the following crashes:
(1) (Jens611) crash on close document after PDF export in page preview
(2) (Rainer) crash on close document after loading
(3) (Rainer) crash on close document on switch to page preview

It seems that (2) and (3) depend on the user profile and on the pasted/loaded content. There are reproducible by Rainer and myself.

Crash (1) seems to occur since AOO 4.0.0. I was able to reproduce it in developer snapshot, rev. 1560773. Unfortunately, in my local debug build of a recent trunk version having the debugger attached to AOO I was not able to reproduce it.
Comment 15 Oliver-Rainer Wittmann 2014-02-13 11:39:33 UTC
(In reply to Armin Le Grand from comment #11)
>  
>  [snip]
>  
> xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.
> 0" office:version="1.2">
> 
> Looks like some experimental, non ODF-compatible extensions were used;
> probably not written by AOO.

This is an additional namespace written by AOO into the ODF document. This is allowed in ODF. As far as I can see this namespace is not used.
If it were used the resulting ODF would be ODF-conform, not the strict one, but the one which allows foreign elements and attributes.
Comment 16 Oliver-Rainer Wittmann 2014-02-17 15:27:40 UTC
deeper investigations reveals that the observed crashes (2) and (3) depend on whether certain embedded object's content has been loaded or not.

With the sample document given by Rainer I can reproduce the crashes (2) and (3) in AOO 3.4.0, AOO 3.4.1, AOO 4.0.0 and AOO 4.0.1. I just have to move to the end of the document and to wait until the embedded object, named 'Object 5' has loaded its content - it will look like a list box.
Comment 17 SVN Robot 2014-02-17 16:25:56 UTC
"orw" committed SVN revision 1569041 into trunk:
124096: correct clearance of <LayoutManager::m_xDockingAreaAcceptor> on dispo...
Comment 18 Oliver-Rainer Wittmann 2014-02-17 16:30:09 UTC
fixed the crashes (2) and (3) with change made in rev. 1569041
Comment 19 SVN Robot 2014-02-17 16:38:10 UTC
"orw" committed SVN revision 1569052 into trunk:
124096: avoid unlock of dispatcher by recursive Lock-Unlock-pattern
Comment 20 Oliver-Rainer Wittmann 2014-02-17 16:41:56 UTC
fixed crash (1) with changes made by rev. 1569052

issue fixed on trunk for next release.
Comment 21 Andre 2014-02-18 09:28:57 UTC
See bug 122576 for a related problem for which I already had the same fix but came a couple of hours too late :-)
Comment 22 Clarence GUO 2014-02-27 10:09:40 UTC
Verified on AOO Rev 1571942 en-US, no crash happen, so this defect has been fixed

Test ENV: Win7 professional 64 bit SP1, Chinese version.
Comment 23 Clarence GUO 2014-02-27 10:10:00 UTC
change status per my previous comment