Bug 40568

Summary: CRASH FILEOPEN or EDITING complex documents (during recalculation?)
Product: LibreOffice Reporter: andis.lazdins
Component: SpreadsheetAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: andis.lazdins, LibreOffice
Version: 3.4.3 releaseKeywords: regression
Hardware: Other   
OS: All   
Whiteboard: target:3.5
i915 platform: i915 features:

Description andis.lazdins 2011-09-01 13:35:55 UTC
Libreoffice 3.4.0-3.4.3 crashes on complex documents containing a lot of pivot
tables created in previous versions of Libreoffice or Openoffice.org. It makes impossible use of libreoffice 3.4 branch for complex calculations and data
analysis using pivot tables. During opening files consumption of CPU reaches 100% until Libreoffice crashes. Some files are opened by Librefoffice, but chashes during refresh operation. In Libroffice 3.3 and 2.4  the same files doesn't cause any visible fluctuations of CPU consumption during opening or refreshing pivot tables.
This bug makes recent versions of Lidreoffice Calc completely useless.

I can provide sample file to developers willing to work on this regression, however I don't want to make it public.

The bug is relevant to https://bugs.freedesktop.org/show_bug.cgi?id=38224
Comment 1 Rainer Bielefeld Retired 2011-09-02 04:37:08 UTC
@andis.lazdins@gmail.com
Please contribute information concerning the OS you used  for your tests!

Does LibO really crash (disappear) or does in only stop responding?

You can send the confidential document to me by mail, I will tell you my results and forward it with my results to Kohei Yoshida
Comment 2 andis.lazdins 2011-09-04 22:15:00 UTC
(In reply to comment #1)
> @andis.lazdins@gmail.com
> Please contribute information concerning the OS you used  for your tests!
Ubuntu 10.10
> 
> Does LibO really crash (disappear) or does in only stop responding?
It crashes after few minutes
> 
> You can send the confidential document to me by mail, I will tell you my
> results and forward it with my results to Kohei Yoshida
I will send the file to your e-mail
Comment 3 Rainer Bielefeld Retired 2011-09-05 03:01:12 UTC
[Reproducible] with "LibreOffice 3.4.3 RC2 - WIN7 Home Premium (64bit) German UI [OOO340m1 (Build:302)]" and also with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) English UI [(Build ID:  3b32204-7f92fce-2ba0a9f)]". Crash after "Adapt Row Hight" 20%
No problem with "LibreOffice Portable 3.3.3  - WIN7  Home Premium (64bit) German UI [OOO330m19 (Build:301  Tag 3.3.3.1)]".

@reporter:
I deleted sheet 3 with LibO 3.3.3, but New document still crashes. Are there Pivot Tables I did not find?
Comment 4 andis.lazdins 2011-09-06 07:14:04 UTC
> @reporter:
> I deleted sheet 3 with LibO 3.3.3, but New document still crashes. Are there
> Pivot Tables I did not find?

There is hidden sheet "1", where in cell G1308 is another pivot table.
Comment 5 Rainer Bielefeld Retired 2011-09-06 08:52:10 UTC
@andis.lazdins@gmail.com
Can you try to reduce the sample a little? what if the hidden PT is the reason?
Comment 6 andis.lazdins 2011-09-06 22:37:09 UTC
(In reply to comment #5)
> @andis.lazdins@gmail.com
> Can you try to reduce the sample a little? what if the hidden PT is the reason?

Fantastic!!!
As soon as I unhide the hidden sheet in sample document, libreoffice 3.4.3 could open the document; however it stopped responding in a few seconds and crashed with 100% utilization of CPU.

After removing all pivot tables file opened much faster, but it stopped responding on adapt row height in a few seconds and crashed afterwards with the same 100% CPU utilization.

After I removed spreadsheet containing complex array formulas in the file with previously removed pivot tables opened normally.

It seems that the problem is not in pivot table problem (I'm sorry to developers), but formula recalculation problem. Unfortunately I don't have any file with lot of pivot tables based directly on raw data. However, rather big spreadsheet (10 MB) with single pivot table opened very well with libreoffice 3.4.3.

You can use the same sample file to identify reason of crashes, however, there is no need to concentrate on pivot tables, at least for this reason, anymore.
Comment 7 Rainer Bielefeld Retired 2011-09-06 22:46:56 UTC
@andis.lazdins@gmail.com:
Thank you for quick feedback!

@Final assignee:
Please ask me or reporter for confidential sample document.

@Kohei:
Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.
Comment 8 andis.lazdins 2011-11-09 09:53:28 UTC
Calc in LibreOffice 3.4.4 still crashes during opening or during recalculation of complex spreadsheets with many array formulas. Those files can be easily opened by by LibreOffice 3.3.X and 2.4.X.

Am I the only one doing complex calculations in LibreOffice?
Comment 9 andis.lazdins 2011-11-09 09:55:48 UTC
When running from terminal the error message after the program crash is
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
Comment 10 Kohei Yoshida (inactive) 2011-12-09 13:53:20 UTC
Rainer, I need access to the file to be able to work on this bug.
Comment 11 Rainer Bielefeld Retired 2011-12-09 23:35:13 UTC
I sent document to developer Kohei Yoshida.

Current results with the document: 3.3.3 opens it without problems, "LibreOffice 3.4.4  - WIN7 Home Premium (64bit) German UI [Build ID: OOO340m1 (Build:402)]" needs some time with maximum CPU load for calculation of row heights, then it ends with "read error".

No longer a problem with Server Installation of  "LibreOffice 3.5.0 - WIN7 Home Premium (64bit) English UI [Build ID: 35c8573-95bcc5e-4c1bcb] Win-x86@6-fast  pull time 2011-12-09 12:44:50", at least for WIN the problem vanished.
Comment 12 andis.lazdins 2011-12-10 05:21:56 UTC
I can confirm that problematic files can be opened in LibreOffice 3.5 beta on Ubuntu 11.10. It seems that this very serious (for me at least) problem will be solved in next version :)
Comment 13 Kohei Yoshida (inactive) 2011-12-12 10:05:56 UTC
Glad to hear that.  I will mark this fixed for 3.5.
Comment 14 andis.lazdins 2012-03-14 23:40:12 UTC
The problem persist also in LibreOffice 3.4.6 RC2. It seems that there are no idea to solve it in 3.4 branch at all.

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.