Bug 51601 - Cannot open xlsx file
Summary: Cannot open xlsx file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:3.5.5 target:3.6.0.0.beta3 tar...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-06-30 11:30 UTC by Peter Page
Modified: 2019-10-31 19:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen capture of error message in Calc (20.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-06-30 11:30 UTC, Peter Page
Details
MEMBERSHIP TEST.xlsx (373.18 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-07-01 01:35 UTC, Peter Page
Details
linux gdb sessions with backtraces (447.71 KB, text/plain)
2012-07-01 09:57 UTC, Terrence Enger
Details
backtrace for LO 3.5.6.0+ (12.98 KB, application/x-xz)
2012-07-01 21:14 UTC, Jean-Baptiste Faure
Details
simplified testcase (12.80 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-07-02 16:02 UTC, Eike Rathke
Details
errors on 3.5 with cherry pick (121.03 KB, text/x-log)
2012-07-02 22:57 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Page 2012-06-30 11:30:47 UTC
Created attachment 63650 [details]
Screen capture of error message in Calc

When I try to open an xlsx file of 380K, I get the following error message when about 2/3rds loaded.  Other, smaller, xlsx files open OK.

Error message was (see screen capture in attachment):

General Error
General input/output error

Tried 4 times, same result each time.
Comment 1 Julien Nabet 2012-06-30 14:11:17 UTC
Created attachment 63660 [details]
MEMBERSHIP TEST.xlsx

Could you attach the file so we can try to reproduce the problem ?
Comment 2 Peter Page 2012-07-01 01:35:20 UTC
File attached.  I have blacked out some information and locked the sheets, otherwise it is unchanged.  You may destroy this file when you are finished with it.


Peter Page

This e-mail was scanned with Norton Internet Security 


This email was sent on 01 Jul, 2012 at 9:27 AM by Peter Page

-----Original Message-----
From: bugzilla-daemon@freedesktop.org [mailto:bugzilla-daemon@freedesktop.org] 
Sent: 30 June 2012 22:11
To: page@ppeter98.orangehome.co.uk
Subject: [Bug 51601] Cannot open xlsx file

https://bugs.freedesktop.org/show_bug.cgi?id=51601

Julien Nabet <serval2412@yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |serval2412@yahoo.fr

--- Comment #1 from Julien Nabet <serval2412@yahoo.fr> 2012-06-30 14:11:17 PDT --- Could you attach the file so we can try to reproduce the problem ?

--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: ------- You reported the bug.
Comment 3 Jean-Baptiste Faure 2012-07-01 02:50:26 UTC
I do not reproduce with LO version 3.6.0.0.beta2+ (Build ID: 86869de) under Ubuntu 11.10 x86_64 with gnome-shell.
Open fine (but it take a longer time than LO 3.6) with LibreOffice 3.5.4.2 
Version ID : 165a79a-7059095-e13bb37-fef39a4-9503d18

But crash with LO 3.5.5.2 (Version ID : 24b32b4-b87ec2e-85c8e98-87a4e20-9a1b8c1)

Best regards. JBF
Comment 4 Julien Nabet 2012-07-01 09:06:08 UTC
On pc Debian x86-64, with 3.5 sources updated 2 days ago (c2096b71ac7b6ba71779505484e7a10e0dd2db88) no crash. However, it's quite long to open.
With master sources updated today, 2 or 3 times to less to open the same file.

JBFaure: could you try to retrieve a backtrace with symbols ? (see http://wiki.documentfoundation.org/BugReport#How_to_get_backtrace_.28on_Linux.29)
Comment 5 Terrence Enger 2012-07-01 09:57:17 UTC
Created attachment 63672 [details]
linux gdb sessions with backtraces

Note that ...
    (a) My observations are from Linux rather than Windows.
    (b) My failure is a SIGSEGV rather than an error dialog.
There is a real possibility that this crash is a completely different failure.
I see that other commenters consider observations on Linux relevant, so I shall
go ahead and comment here.  Advice welcome.

Current attachment is typescript is of a gdb session opening 
"MEMBERSHIP TEST.xlsx" previously attached to this bug.  Following a SIGSEGV
(line 1463), it includes output of `thread backtrace all` (line 1477) and
`backtrace full` (line 1606).  The message "IndexError: list index out of range"
catches my eye, but I do not know if it is implicated in the crash.

My LibreOffice is built from master commit id 96caa3b with Julien Nabet's patch
offered for bug 50894 "SIGSEGV: ODBC to PostgreSQL, renaming column in SELECT
list".  I think that my local patch has nothing to do with the current bug.  The
build and execution environments are ubuntu-natty (11.04); configuration options
are ...

    --disable-mozilla
    --enable-symbols
    --enable-dbgutil
    --enable-crashdump
    --disable-build-mozilla
    --without-system-postgresql
    --enable-debug
    --enable-werror
Comment 6 Julien Nabet 2012-07-01 10:02:33 UTC
Terrence: you meant fdo#50849 I suppose. BTW did it work ?
Comment 7 Jean-Baptiste Faure 2012-07-01 10:07:43 UTC
(In reply to comment #4)
> [...]
> JBFaure: could you try to retrieve a backtrace with symbols ? (see
> http://wiki.documentfoundation.org/BugReport#How_to_get_backtrace_.28on_Linux.29)

Strange: when running LO in gdb (LO 3.5.5.2 and LO 3.5.6+) there is no crash when opening the bugdoc. But I get a crash when I close the file. For LO 3.5.6.0+ gdb says:
Program received signal SIGSEGV, Segmentation fault.
0x00007fffc8d71b89 in formula::FormulaTokenArray::HasOpCode(unsigned short) const ()
   from /home/jbf/LibO/lo35/solver/unxlngx6.pro/installation/opt/program/../program/libforlo.so

I do not have symbols in my LO build. I can rebuild with symbols activated if needed.

Best regards. JBF
Comment 8 Julien Nabet 2012-07-01 10:12:00 UTC
JBFaure: before you do this, have you tried to use a brand new LO profile ? (I always do that to be sure there's no side effect from something).

I didn't notice a crash when closing too with 3.5 branch, that's why i ask this question.
Comment 9 Jean-Baptiste Faure 2012-07-01 10:22:59 UTC
(In reply to comment #8)
> JBFaure: before you do this, have you tried to use a brand new LO profile ? 

Yes. In that case, no crash on opening but crash on closing. Next start crash on opening.

> (I always do that to be sure there's no side effect from something).
Me too ;-)
> 
> I didn't notice a crash when closing too with 3.5 branch, that's why i ask this question.

More precisely, LO close without any message. When restarting I get the recovery window.

Best regards. JBF
Comment 10 Jean-Baptiste Faure 2012-07-01 21:14:34 UTC
Created attachment 63685 [details]
backtrace for LO 3.5.6.0+

backtrace for LO 3.5.6.0+ with segfault crash on opening the bugdoc.

Best regards. JBF
Comment 11 Björn Michaelsen 2012-07-02 04:03:15 UTC
Is the version set wrong? Comments seem to suggest this is a regression between 3.5.4 and 3.5.5.
Comment 12 Eike Rathke 2012-07-02 10:46:12 UTC
I could reproduce a crash in both 3.5.5 and 3.5.4 Linux.
Comment 13 Eike Rathke 2012-07-02 16:02:53 UTC
Created attachment 63742 [details]
simplified testcase

Great, Moggi simplified the testcase, and that crashes even 3.5.0 ...
Comment 14 Eike Rathke 2012-07-02 16:11:18 UTC
Taking this for the crasher.
Comment 15 Julien Nabet 2012-07-02 22:57:14 UTC
Created attachment 63746 [details]
errors on 3.5 with cherry pick

On Pc Debian x86-64 with 3.5 branch, if I cherry-pick bba176a844bd993cf7fe6acce9ff18027870dfa5, I don't have a crash during the opening of the original bugdoc but have a crash when I close LO (see logs attached).
Comment 16 Björn Michaelsen 2012-07-03 00:57:34 UTC
updating version field (_not_ a regression on the stable branch)
Comment 17 Not Assigned 2012-07-03 04:00:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be67632e9eb298af8a5582c0e06cad9218fa5b71&g=libreoffice-3-5-5

resolved fdo#51601 do not attempt to compile running formula cell


It will be available already in LibreOffice 3.5.5.
Comment 18 Not Assigned 2012-07-03 04:55:23 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e031258c7689219c64c030490c123c0e2544b91a&g=libreoffice-3-5

resolved fdo#51601 do not attempt to compile running formula cell


It will be available in LibreOffice 3.5.6.
Comment 19 Not Assigned 2012-07-03 12:36:59 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b6dcf00472b8f9573ff23ae8cadadeaad58ea4bb&g=libreoffice-3-6

do not attempt to compile running formula cell (fdo#51601 related)


It will be available in LibreOffice 3.6.
Comment 20 Not Assigned 2012-07-03 12:43:02 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2bf5edb1893df2d253ea0b7cf20f3bb7c62ae7f1

do not attempt to compile running formula cell (fdo#51601 related)
Comment 21 Eike Rathke 2012-07-03 13:05:53 UTC
(In reply to comment #15)
> On Pc Debian x86-64 with 3.5 branch, if I cherry-pick
> bba176a844bd993cf7fe6acce9ff18027870dfa5, I don't have a crash during the
> opening of the original bugdoc but have a crash when I close LO (see logs
> attached).

Julien, could you please try again with the current 3-5 branch. If your error persists it is something unrelated/different and worth a different bug report. If the error went away I don't know how bba176a844bd993cf7fe6acce9ff18027870dfa5 should had been responsible for that, maybe some difference in memory layout where we attempted to delete a pointer twice.
Comment 22 Jean-Baptiste Faure 2012-07-03 13:18:35 UTC
Hi, I tested the patch this afternoon on LO 3.5 (LibreOffice 3.5.6.0+ 
Version ID : 7f2bea4-a73d29c-33cdb70-cb0b024-0593f04 under Ubuntu 11.10) with both bugdocs -> no crash on openning, no crash on closing the files.
Will try again after new compilation without symbols.

Best regards. JBF
Comment 23 Julien Nabet 2012-07-03 13:31:39 UTC
No crash for me too on opening or closing.
Comment 24 Not Assigned 2012-07-03 17:28:31 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=823788d83bd7151a35b95a927dd26e2af1c66804

test related to fdo#51601
Comment 25 Commit Notification 2019-10-31 19:13:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/28ef7a8ce82e50066c911199ef1280669e732a95

crashtesting: null deref on import of fdo51601-2.xlsx

It will be available in 6.4.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.