Bug 37251 - Save as XLS corrupts formulas, causes 100% CPU load when reopen
Summary: Save as XLS corrupts formulas, causes 100% CPU load when reopen
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Dave Uhrenholdt
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2011-05-16 04:16 UTC by Dave Uhrenholdt
Modified: 2015-09-14 15:05 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Just and X-Y plot with time as X, current value as Y. (701.00 KB, application/vnd.ms-excel)
2011-05-16 04:16 UTC, Dave Uhrenholdt
Details
File pasted into Cell A1. (272.95 KB, text/plain)
2011-05-16 07:08 UTC, Dave Uhrenholdt
Details
apt history (20.16 KB, application/x-compressed-tar)
2011-05-16 07:49 UTC, Dave Uhrenholdt
Details
Same data/file in ODS format (352.10 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-16 12:07 UTC, Dave Uhrenholdt
Details
Listing of hw (lshw) (19.74 KB, text/plain)
2011-05-16 12:50 UTC, Dave Uhrenholdt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Uhrenholdt 2011-05-16 04:16:04 UTC
Created attachment 46761 [details]
Just and X-Y plot with time as X, current value as Y.

I've created the attached file with LibreOffice.  When I reopen there are two problems.  1) The formula is corrupted in the C column.  2) and/or the CPU just goes off the chart.  100% for minutes.  Opens quickly with OpenOffice.
Comment 1 Rainer Bielefeld Retired 2011-05-16 04:44:34 UTC
[Reproducible] with "LibreOffice 3.4Beta5  – WIN7  Home Premium  (64bit) German UI [DEV300m103 (Build:5)]". Reporter's sample and sample saved again as .xls with new name look fine, MS EXCEL Viewer opens it quickly.

I don't understand any of the problems:
"reopen" with what software ?
"corrupted"? I don't have second sight, what formula did you expect, and what did YOU see? I see "=HEXINDEZ(B1)/20-1600" and similar (German function names)

Currently I see no chart problem in report (although CPU load problem might be a chart problem, of course), So I change Component

Linux related?

@Dave Uhrenholdt:
May I ask you to read  hints on <http://wiki.documentfoundation.org/BugReport> carefully?
Then please:
- Attach a test kit with source and export result 
- Attach screenshots with comments (you can add information using LibO DRAW
  and then attach your screenshot with comments as PDF) showing all
  unexpected results
- Contribute a step by step instruction containing every key press and every 
  mouse click how to reproduce your problem
- add information 
  -- what exactly is unexpected
  -- and why do you believe it's unexpected
  -- concerning your PC 
  -- concerning your OS All Details concerning Deistribution / Version
  -- concerning your LibO version and localization (UI language)
  –- LibO settings that might be related to your problems 
  -- how you launch LibO
  -- everything else crossing your mind after you read a.m. URL

Can you please file Bug reports with status UNCONFIRMED if your are not absolutely sure that you contributed all required background information and that the problem will be reproducible with information you can provide? 

Thank you!
Comment 2 Rainer Bielefeld Retired 2011-05-16 04:58:44 UTC
Sorry, my mistake, I wanted to write "the problems are NOT reproducible with "LibreOffice 3.4Beta5 ..."
Comment 3 Dave Uhrenholdt 2011-05-16 07:08:53 UTC
Created attachment 46766 [details]
File pasted into Cell A1.
Comment 4 Dave Uhrenholdt 2011-05-16 07:48:47 UTC
At this point I really need to get my job done.  I am running Ubuntu 11.04 more or less out of the box.  I will be removing LibreOffice in that it is unusable by me.  I will replace it with OpenOffice.

The formula is HEX2DEC. 

Steps I get the high CPU usage on Ubuntu Linux are:
Open LibreOffice.
paste attached file (use space as seperator). (80f3.txt is file name).
Use chart tool to chart column A and C.
Save File.
Close chart.
Open File.  File open never completes.  100% for minutes on end.
Same saved file opens in seconds using OpenOffice (3.3??) on Windows 7.

uname -a
Linux bco-laptop7 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 10:18:49 UTC 2010 i686 i686 i386 GNU/Linux
Comment 5 Dave Uhrenholdt 2011-05-16 07:49:38 UTC
Created attachment 46769 [details]
apt history
Comment 6 Dave Uhrenholdt 2011-05-16 09:41:03 UTC
Installed LibO_3.4.0beta5_Linux_x86_install-deb_en-US
and
OOo_3.3.0_Linux_x86_install-deb_en-GB
and both exhibited same problem with excessive CPU usage on attached XLS file.
Comment 7 Rainer Bielefeld Retired 2011-05-16 11:10:33 UTC
I can confirm "Same saved file opens in seconds using OpenOffice (3.3??) on Windows 7." for LibO 3.4 so LINUX related?!

@Dave:
Still waiting for iformation concerning
- corrupted formula
- What's your result with an .ods?
Comment 8 Dave Uhrenholdt 2011-05-16 12:07:55 UTC
Created attachment 46781 [details]
Same data/file in ODS format

Not surpisingly, the problem does not occur when file saved in ODS format.
Comment 9 Dave Uhrenholdt 2011-05-16 12:10:02 UTC
When the corrupted formula showed up it looked like
=(HEX2DEC,B1)/20-1600.  

The .XLS file opens in seconds on Windows 7 with OpenOffice 3.3.
Comment 10 Dave Uhrenholdt 2011-05-16 12:11:15 UTC
I would agree that it Linux/Ubuntu related.  I don't have additional distributions to test this with at the moment.
Comment 11 Dave Uhrenholdt 2011-05-16 12:50:35 UTC
Created attachment 46782 [details]
Listing of hw (lshw)
Comment 12 LeMoyne Castle 2011-05-31 12:49:35 UTC
LibreOffice == LO 3.3.2 downloaded and installed 5/28/2011 using debs and dpkg as in readme
Reporter's data in browser window ready to copy+paste -- https://bugs.freedesktop.org/attachment.cgi?id=46766 

1. Open Libre Office from Applications menu in Ubuntu 10.04
2. Paste data into A1. Choose separate with space and OK to import data and setup sheet.
3. Click on column A header and ctrl-click column C header to setup x,y data sets. 
4. Click chart button.  Select X-Y Scatter and accept defaults with finish to setup chart.
5. Choose Save As... select **format** and press OK. 
6. Close Libre Office 
7. Open LibreOffice from system file browser choosing file saved in 5.

v--- **format** ---v
Open of ODS: OK, graph and formulas as setup  
Open of XLS (97/2k) [first saved as ODS]: opens OK, graph and formulas as setup
Open of XLS (97/2k): opens OK, graph and formulas as setup
Open of XLS (95) [first saved w/o graph]: opens OK but graph missing and formula has #NAME? error for HEX2DEC
Open of XLS (95): opens OK but graph missing and formula has #NAME? error for HEX2DEC in formula. 
Open of XLS (5.0): opens OK but graph missing and formula has #NAME? error for HEX2DEC in formula.

Open BMS-Current.xls file and acts exactly as described: open seems to hang in a busy loop - UI never comes up fully.  
Can't verify anything about the chart or formula - I killed LibreOffice after cooling fan came on. 

Further attempts to create snafued file that involve doing step 5 with alacrity and then 
--- repeatedly clicking the window close button until window starts to close 
Open of XLS (97/2k): opens OK, graph and formulas as setup
Open of XLS (95) [first saved w/o graph]: opens OK but graph missing and formula has #NAME? error for HEX2DEC
Open of XLS (95): opens OK but graph missing and formula has #NAME? error for HEX2DEC in formula. 
--- repeatedly pressing Alt-F4 -- as above but sometimes no file is saved.

I can only think to re-test with auto-save set to 1 minute nad try to create collision between Save, Auto-save and Close...

I the file was crrupted by glitch or bad install and recommend re-installation of LibO if problem is persistent. 
Left open in case there is a repeatable path to corrupt file production 
AND basic file handling functions like Open should terminate - yukky file has some value as test?
Comment 13 Dave Uhrenholdt 2011-05-31 16:51:38 UTC
I fixed the problem for myself, but installing Ubuntu 10.10 over 11.4. 10.10 comes with OpenOffice 3.2.  Works much better.  It will be a long time before I go to 3.3 or 3.4.
Comment 14 Björn Michaelsen 2011-12-23 14:58:53 UTC
NEW, unassigned bug: replace "infoprovider" with move to state "NEEDINFO".
Comment 15 Björn Michaelsen 2011-12-23 17:01:06 UTC
needinfo keyword redundant by needinfo status.
Comment 16 Florian Reisinger 2012-08-14 13:59:44 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 17 Florian Reisinger 2012-08-14 14:00:54 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 18 Florian Reisinger 2012-08-14 14:05:37 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 19 Florian Reisinger 2012-08-14 14:07:39 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 20 sasha.libreoffice 2012-09-05 07:24:57 UTC
reproduced very slow working on Fedora 64 bit in 3.6.1
Comment 21 QA Administrators 2015-01-05 17:52:11 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice (4.3.5 or later): https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

Thank you for your help!

-- The LibreOffice QA Team
Comment 22 Buovjaga 2015-01-28 18:58:15 UTC
Confirmed freeze on open. Debug output below.

Ubuntu 14.10 64-bit Version: 4.5.0.0.alpha0+
Build ID: 784d069cc1d9f1d6e6a4e543a278376ab483d1eb
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-01-25_23:58:40


warn:vcl:3413:1:vcl/generic/fontmanager/fontmanager.cxx:1072: Unimplmented mac encoding 20 to unicode conversion
warn:legacy.osl:3424:1:sc/source/filter/excel/exctools.cxx:132: XclImpOutlineBuffer::MakeScOutline: unexpected level!
warn:legacy.osl:3424:1:vcl/source/gdi/image.cxx:395: ImageAryData::Load: failed to load image 'cmd/lc_iconsetformatdialog.png'
warn:legacy.tools:3424:1:vcl/inc/svdata.hxx:388: object deleted while in use !
warn:vcl.control:3424:1:vcl/source/control/button.cxx:2236: No new-style group set on radiobutton <> using old-style digging around
warn:vcl.layout:3424:1:vcl/source/window/builder.cxx:1430: making metric box for type: GtkComboBox unit: degrees name: orientationdegrees use a VclComboBoxNumeric instead
warn:chart2:3424:1:chart2/source/view/main/PropertyMapper.cxx:117: Exception caught. Type: N3com3sun4star3uno9ExceptionE, Message:
Comment 23 Chris Halls 2015-09-04 20:28:37 UTC
Confirmed freeze on document open, on Debian packaged 4.3.3-2+deb8u1 and 5.0.1-1.

I was able to get a full backtrace without any debug symbols as follows:

#0  0x00007fb6da4f5b65 in basegfx::tools::trapezoidSubdivide(std::vector<basegfx::B2DTrapezoid, std::allocator<basegfx::B2DTrapezoid> >&, basegfx::B2DPolyPolygon const&) ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#1  0x00007fb6c32bedfe in ?? () from /usr/lib/libreoffice/program/libvclplug_genlo.so
#2  0x00007fb6dbfbb559 in SalGraphics::DrawPolyPolygon(basegfx::B2DPolyPolygon const&, double, OutputDevice const*) () from /usr/lib/libreoffice/program/libmergedlo.so
#3  0x00007fb6dbeaf310 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#4  0x00007fb6dbeb08a5 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#5  0x00007fb6dbeb02d1 in OutputDevice::DrawPolyLine(basegfx::B2DPolygon const&, double, basegfx::B2DLineJoin, com::sun::star::drawing::LineCap) ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#6  0x00007fb6da7d4c0e in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#7  0x00007fb6da7d0165 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#8  0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#9  0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#10 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#11 0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#12 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#13 0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#14 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#15 0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#16 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#17 0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#18 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#19 0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#20 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#21 0x00007fb6da7d1f97 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#22 0x00007fb6da7cfe33 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#23 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#24 0x00007fb6da7d062b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#25 0x00007fb6da7c04a0 in drawinglayer::processor2d::BaseProcessor2D::process(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::graphic::XPrimitive2D> > const&) () from /usr/lib/libreoffice/program/libmergedlo.so
#26 0x00007fb6db643caa in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#27 0x00007fb6db644ae0 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#28 0x00007fb6db676779 in SdrPageWindow::RedrawLayer(unsigned char const*, sdr::contact::ViewObjectContactRedirector*) () from /usr/lib/libreoffice/program/libmergedlo.so
#29 0x00007fb6db7610f2 in SdrPageView::DrawLayer(unsigned char, OutputDevice*, sdr::contact::ViewObjectContactRedirector*, Rectangle const&) ()
   from /usr/lib/libreoffice/program/libmergedlo.so
---Type <return> to continue, or q <return> to quit---
#30 0x00007fb6b1c44701 in ?? () from /usr/lib/libreoffice/program/../program/libsclo.so
#31 0x00007fb6b1c1ff0d in ?? () from /usr/lib/libreoffice/program/../program/libsclo.so
#32 0x00007fb6b1c21efe in ?? () from /usr/lib/libreoffice/program/../program/libsclo.so
#33 0x00007fb6b1c225cc in ?? () from /usr/lib/libreoffice/program/../program/libsclo.so
#34 0x00007fb6dbd414c5 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#35 0x00007fb6dbd4186b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#36 0x00007fb6dbd41603 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#37 0x00007fb6dbd41810 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#38 0x00007fb6dbd41603 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#39 0x00007fb6dbd41810 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#40 0x00007fb6dbd41603 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#41 0x00007fb6dbd41810 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#42 0x00007fb6dbd41603 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#43 0x00007fb6dbd41810 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#44 0x00007fb6dbd41603 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#45 0x00007fb6dbd41810 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#46 0x00007fb6dbd4193b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#47 0x00007fb6dbfe266b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#48 0x00007fb6dbfe2902 in Scheduler::ProcessTaskScheduling(bool) () from /usr/lib/libreoffice/program/libmergedlo.so
#49 0x00007fb6dbfef370 in Application::Yield() () from /usr/lib/libreoffice/program/libmergedlo.so
#50 0x00007fb6dbfef425 in Application::Execute() () from /usr/lib/libreoffice/program/libmergedlo.so
#51 0x00007fb6db10104b in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#52 0x00007fb6dbff47b1 in ?? () from /usr/lib/libreoffice/program/libmergedlo.so
#53 0x00007fb6dbff4802 in SVMain() () from /usr/lib/libreoffice/program/libmergedlo.so
#54 0x00007fb6db11eb72 in soffice_main () from /usr/lib/libreoffice/program/libmergedlo.so
#55 0x00000000004006fb in ?? ()
#56 0x00007fb6d8d11b45 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#57 0x000000000040072f in ?? ()

I was able to establish that LO had hung in the bottom frame and was not returning. If I forced a return back to the next level up, the screen would draw and I would get control briefly, at a guess until the next time that part of screen refreshed.

After installing Debian's debug symbols, I got some more detail:

#0  basegfx::trapezoidhelper::TrapezoidSubdivider::solveHorizontalEdges (rTrDeSimpleEdges=std::vector of length 19803, capacity 32768 = {...}, this=0x7fffffffb200)
    at /build/libreoffice-qBdtu7/libreoffice-5.0.1/basegfx/source/polygon/b2dtrapezoid.cxx:475
#1  basegfx::trapezoidhelper::TrapezoidSubdivider::TrapezoidSubdivider (rSourcePolyPolygon=

However, gdb crashed at that point so I wasn't able to debug further at this stage.
Comment 24 Chris Halls 2015-09-10 13:18:03 UTC
Dave, good news, I can't reproduce this problem on Libreoffice master (will become version 5.1).

Would you be able to test this on a nightly snapshot to see if the problem is fixed for you?

You can find builds here:

 http://dev-builds.libreoffice.org/daily/master/

If not, you could wait for the 5.1 release and then test that when it is available for your distro.
Comment 25 Dave Uhrenholdt 2015-09-14 14:39:54 UTC
This problem sees to have been fixed.  It was reported 4 years ago.
Comment 26 Buovjaga 2015-09-14 15:05:51 UTC
Ok, I'll just go wild and mark this as WFM.