Bug 45209 - CRASH when FILEOPEN particular .xls
Summary: CRASH when FILEOPEN particular .xls
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 3.4.5 release
Hardware: Other Windows (All)
: medium major
Assignee: Markus Mohrhard
QA Contact:
URL:
Whiteboard: target:3.7.0 target:3.6.0.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-01-25 00:44 UTC by Mikeyy - L10n HR
Modified: 2012-07-24 19:52 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mikeyy - L10n HR 2012-01-25 00:44:22 UTC
LO won't open some xls files, it just crashes, doesn't open anything.
It happened on several different files, I think they are ports from .xlsx to .xls.

I can supply xls file but not publicly. If some dev is interested I'll send it directly.

Best regards,
Mihovil
Comment 1 Rainer Bielefeld Retired 2012-06-09 01:01:46 UTC
NOT reproducible as a general problem with "LibreOffice 3.5.4.2  German UI/Locale [Build-ID: 165a79a-7059095-e13bb37-fef39a4-9503d18] on German WIN7 Home Premium (64bit) 

@reporter:
Thank you for your report – unfortunately important information is missing.
May be hints on <http://wiki.documentfoundation.org/BugReport> will help you to find out what information will be useful to reproduce your problem? If you believe that that  is really sophisticated please as for Help on a user mailing list
Please:
- Write a meaningful Summary describing exactly what the problem is
- Send a sample document to me
- Contribute a step by step instruction containing every key press and every 
  mouse click how to reproduce your problem (due to example in Bug 43431)
– if possible contribute an instruction how to create a sample document 
  from the scratch
- add information 
  -- concerning your PC (video card, ...)
  -- concerning your OS (Version, Distribution, Language)
  -- concerning your LibO (UI language, Locale setting)
  –- Libo settings that might be related to your problems 
    (video hardware acceleration ...)
  -- how you launch LibO and how you opened the sample document
  -- everything else crossing your mind after you read linked texts

Even if you can not provide all demanded information, every little new information might bring the breakthrough.

May be you can test <https://www.libreoffice.org/get-help/bug/> for submitting bug reports? You reach that Bug Submission Assistant via LibO menu 'Help -> Feedback / Bug Report'
Comment 2 Mikeyy - L10n HR 2012-06-10 23:48:10 UTC
As I said in my comment, I cannot publicly send you that file.
Please check your email, I'm sending you file in question.

As you will notice, it doesn't open, even with latest LO.
Windows XP SP3, LO 3.5.4.2
LO just crashes without opening file and without any crash messages.
Comment 3 Rainer Bielefeld Retired 2012-06-11 01:23:34 UTC
[Reproducible] with reporter's confidential document Server Installation of  "LibreOffice 3.6.0beta1  German UI/Locale [Build-ID: 1f1cdd8] on German WIN7 Home Premium (64bit) and
LigO 3.4.5 (others not tested)

Worked fine with 3.3.3, so regression

Unfortunately the crash disappears when I simply save the document from 3.3.3, so that I can not do further tests what the reason for the crash might be.

@Mikeyy:
We will not publish your sample, but I will have to forward it to a handful of developers for bugfix, bugfix reviews, ...
Do you agree that I send it to involved developers?
Comment 4 Mikeyy - L10n HR 2012-06-11 01:40:20 UTC
Yes.
Comment 5 Rainer Bielefeld Retired 2012-06-11 04:47:15 UTC
Already [Reproducible] with "LibreOffice Daly based on 3.4.2 RC - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:201) from libreoffice-3-4~2011-07-22_15.35.00_LibO_3.4.2rc1_Win_x86_install_multi.exe]"  from 2011-07-23. 
It seems problem came with 3.4.

@Kohei:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug. You can get the confidential sample document from reporter or from me.
Comment 6 Markus Mohrhard 2012-06-25 17:59:53 UTC
I suppose I'll take this one. Kohei is still not here and 3-6Beta3 is only one week away.
Comment 7 Markus Mohrhard 2012-07-05 08:15:37 UTC
File does neither crash my OpenSuse 3.4.5 build nor my master build with dgbutil.

I'll run it once with memcheck to check that there are no hidden memory problems.
Comment 8 Markus Mohrhard 2012-07-05 08:39:11 UTC
Wow. Memcheck is badly complaining. There are quite some invalid memory access while loading this document.

Will need to understand them before I can start fixing them.
Comment 9 Markus Mohrhard 2012-07-05 08:46:28 UTC
Problem is the SvMemoryStream inside of XclImpChangeTrack::ReadFormula. This seems to be initialized wrongly and then all future access to this memory stream is invalid.
Comment 10 Not Assigned 2012-07-05 13:09:09 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1b57e80858dd61986bea6da7358d9f8433d9685e

prevent invalid memory when loading change tracking from xls, fdo#45209
Comment 11 Markus Mohrhard 2012-07-05 13:11:53 UTC
I have no idea how that ever worked. The code is obviously wrong and operates on invalid memory if the file is broken. The problem here was that at some point we were only able to load 245 from 847 bytes but still used all 847 bytes to generate formulas.

I hope that this fix prevents the crash. I'm not sure because I did not see a crash myself, only entries generated by memcheck.
Comment 12 Not Assigned 2012-07-05 14:08:16 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

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

prevent invalid memory when loading change tracking from xls, fdo#45209


It will be available in LibreOffice 3.6.
Comment 13 Markus Mohrhard 2012-07-05 14:10:05 UTC
Please test with a master build and/or a 3.6.0RC1 build and report if it is still broken.
Comment 14 Mikeyy - L10n HR 2012-07-13 10:41:00 UTC
Tried to test with 3.6.0.1 but installation has error, cannot start LO after install. I'll try to test again in few days or with RC2.
Comment 15 Mikeyy - L10n HR 2012-07-24 19:52:23 UTC
Finally managed to get around bug 51252 and run LO 3.6
File is loading fine, but now I have more material for bug report since it has more info then excel has. :)

Thanks for bug fix.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.