Bug 54968 - FILEOPEN CRASH ZipIOException on particular .doc
Summary: FILEOPEN CRASH ZipIOException on particular .doc
Status: RESOLVED DUPLICATE of bug 49819
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-15 14:10 UTC by Terrence Enger
Modified: 2013-12-12 16:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
typescript of gdb session with backtraces (207.49 KB, text/plain)
2012-09-15 14:10 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2012-09-15 14:10:08 UTC
Created attachment 67207 [details]
typescript of gdb session with backtraces

An attempt to open file Document2.doc attached to fdo#45207 crashes LO
as shown in the attached scriptfile of a gdb session.  Briefly, ...

    line   87 : break on the throw
    line  114 : `backtrace full`
    line  652 : exception caught, and `backtrace full`
    line  1062 : next exception caught, and `backtrace full`
    line  4180 : SIGABRT and `backtrace full`


LibreOffice is id 741c56a, pulled 2012-09-13.

autogen.lastrun:
    --enable-symbols
    --enable-dbgutil
    --enable-crashdump
    --disable-build-mozilla
    --without-system-postgresql
    --enable-debug
    --enable-werror

Build and execution environment:
    $ uname -a
    Linux cougar-natty 2.6.38-15-generic #64-Ubuntu SMP Fri Jul 6 17:18:17 UTC
2012 i686 athlon i386 GNU/Linux
    $ gcc --version
    gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2


Note for comparison that fdo#49690 reports the same exception being
thrown when opening a .xlsx file.
Comment 1 Julien Nabet 2012-09-16 10:10:15 UTC
Just for information:
The file isn't corrupted (I opened it with Word2010, Win7).
Nothing detected with unzip -t:
julien@julienPC:~/compile-libreoffice/bugs/54968_terrence$ unzip -t Document2.docx
Archive:  Document2.docx
    testing: [Content_Types].xml      OK
    testing: _rels/.rels              OK
    testing: word/_rels/document.xml.rels   OK
    testing: word/document.xml        OK
    testing: word/theme/theme1.xml    OK
    testing: word/settings.xml        OK
    testing: word/webSettings.xml     OK
    testing: word/stylesWithEffects.xml   OK
    testing: docProps/core.xml        OK
    testing: word/styles.xml          OK
    testing: word/fontTable.xml       OK
    testing: docProps/app.xml         OK
    testing: docProps/thumbnail.jpeg   OK
No errors detected in compressed data of Document2.docx.
Comment 2 Julien Nabet 2012-09-16 10:10:47 UTC
I confirm I can't open too the file on pc Debian x86-64 with master sources updated today.
Comment 3 Julien Nabet 2012-09-16 16:01:11 UTC
I put a break in package/source/zipapi/ZipFile.cxx, function ZipFile::readLOC
Here are the differents locations I got:
_rels/.rels
[Content_Types].xml
[Content_Types].xml
_rels/.rels
docProps/core.xml (different time => ZipIOException but no segfault)
[Content_Types].xml
_rels/.rels
word/_rels/document.xml.rels
word/document.xml
word/settings.xml
word/theme/theme1.xml
word/fontTable.xml (different time => ZipIOException segfault)

Now questions are:
- to what correspond the 2 time values?
- why to compare time values?
- why first exception doesn't give a segfault, the second yes?

BTW, if I remove time comparison part, I can open the file.
Comment 4 Julien Nabet 2012-09-20 22:05:09 UTC
Must recognized I'm a bit stuck here :-(

Terrence: any idea?
Comment 5 Julien Nabet 2012-09-21 15:08:49 UTC
Michael: I just read about this commit (http://cgit.freedesktop.org/libreoffice/core/commit/?id=9b0198b2442bc749491d0f1e5e2c811346e5d568). Any idea about this or about how could help here?
Comment 6 Michael Meeks 2012-09-21 15:35:43 UTC
Ah - I was looking for this bug :-) I suspect it of being a duplicate of / related to either bug#49819 and/or bug#48366.

You did some great debugging here thanks for that, I'm digging at bug#49819 just now.
Comment 7 Michael Meeks 2012-09-21 15:38:50 UTC
oh- and to answer the question ;-) no my ZIP64 preparations shouldn't fix this issue.
Comment 8 Michael Meeks 2012-09-21 15:47:35 UTC
Thanks Terrence - I checked this document - (unusual to do the debugging in another bug - why not share it ? ;-) - and it's exactly the same symptom.

unzip/re-zip of that file -should- give you a working document; it -looks- like the stream timestamps mismatch in there - not sure why.

*** This bug has been marked as a duplicate of bug 49819 ***
Comment 9 Terrence Enger 2012-09-24 11:33:01 UTC
@Michael ...

I remember that I tried quite hard to find an existing bug report for
this problem.  Alas, I discarded the notes I made at the time.  Maybe
I jus got lost among all the reports which were "close but not quite".

@Julien ...

I am sorry to have let your question slide.  I lost my internet
connection for a few days.
Comment 10 Julien Nabet 2012-09-24 11:46:57 UTC
No pb Terrence.
BTW, Fridrich pushed this commit:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=5db7ac239278634c39cbb15f0173db0524b5dcd6

So next bug please! :)