Bug 98690 - Saving or re-openning sheet with a chart (chart lost, crash)
Summary: Saving or re-openning sheet with a chart (chart lost, crash)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: x86-64 (AMD64) All
: medium critical
Assignee: Markus Mohrhard
URL:
Whiteboard: target:5.3.0 target:5.2.4 target:7.2....
Keywords: dataLoss
Depends on:
Blocks:
 
Reported: 2016-03-15 18:33 UTC by Piotr
Modified: 2022-12-12 21:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ods file (32.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-15 18:33 UTC, Piotr
Details
good xlsx saved by libreoffice, shows how the chart was (18.32 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-03-15 18:35 UTC, Piotr
Details
console output opening .xlsx attachment 123610 (2.46 KB, text/plain)
2016-05-22 12:30 UTC, JoNi
Details
Test case (33.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-09-16 00:35 UTC, kaptaink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr 2016-03-15 18:33:51 UTC
Created attachment 123609 [details]
ods file

I have a chart, with error bars. 
When I try to reopen the file, chart is empty white square. Clicking inside lead to crash.
It well repeatable in version 4.4.7.2 (Fedora) and latest release on (CentOS). I saved xlsx, and it opens nicely. ods is corrupted. I attach both files.
Comment 1 Piotr 2016-03-15 18:35:30 UTC
Created attachment 123610 [details]
good xlsx saved by libreoffice, shows how the chart was
Comment 2 Piotr 2016-03-15 20:50:06 UTC
The way to reproduce the issue is to 
1. open xlsx
2. save as ods
3. close the program
4. open the ods again: the chart will be corrupted
Comment 3 Buovjaga 2016-03-22 19:01:15 UTC
Chart displays fine for me in ODS and does not crash.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha0+
Build ID: 011e65c93053c88eb752e50ef47c69872608cbcd
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on March 22nd 2016
Comment 4 raal 2016-05-12 13:22:27 UTC
repro, Version: 5.2.0.0.alpha1+; win7
error message:
unsatisfied query for interface of type com.sun.star.chart2.XCoordinateSystemContainer

with 4.5 is chart lost, but doesn't crash
Comment 5 JoNi 2016-05-22 12:30:11 UTC
Created attachment 125227 [details]
console output opening .xlsx attachment 123610 [details]

the first chart looks correct but most parts of second chart are missing.

looking in the file: "Object 2/content.xml" is not complete, but suddenly cut off. last elements:
 <style:style style:name="ch4" style:family="chart">
            <style:graphic-properties draw:stroke="none" svg:stroke-color="#b3b3b3" draw:fill="none" draw:fill-color="#e6e6e6"/><style:text-properties fo:font-size="10pt" style:font-size-as

think the import already goes wrong, see attachment
Comment 6 kaptaink 2016-09-16 00:34:51 UTC
I have this issue when I try to add Y error bars using a cell range. 

To reproduce: Begin with the file I have attached, and add Y error bars to the "Density Mean" data series using cell range.

1. Select "Positive and Negative"
2. Check "Same value for both"
3. Set the positive parameter as 
"$Sheet1.$J$3,$Sheet1.$J$8,$Sheet1.$J$12,$Sheet1.$J$19,$Sheet1.$J$23,$Sheet1.$J$27,$Sheet1.$J$33,$Sheet1.$J$36".
4. Save and close Calc

Upon opening it, the chart has only its area element left, and clicking on it results in the error "unsatisfied query for interface of type com.sun.star.chart2.XCoordinateSystemContainer!".

It seems to happen when using a discontinuous range for Y error bars. 

I don't really know how to report bugs or use Bugzilla, so I apologise if this is in the wrong place.
Comment 7 kaptaink 2016-09-16 00:35:36 UTC
Created attachment 127349 [details]
Test case
Comment 8 Markus Mohrhard 2016-10-07 22:29:42 UTC
I can reproduce it.
Comment 9 Commit Notification 2016-10-11 02:18:55 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

avoid crashes on broken charts, related tdf#98690

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2016-10-11 02:19:01 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0ab45be62bc1ffcbdd13aca7375fdcd1bbccb79a

catch the exception to prevent broken charts, tdf#98690

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Markus Mohrhard 2016-10-11 04:27:33 UTC
Review request for 5-2 in gerrit.
Comment 12 Commit Notification 2016-10-13 16:12:43 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cf5d6ccea23549aea708c6e399a982598b2b58aa&h=libreoffice-5-2

catch the exception to prevent broken charts, tdf#98690

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2016-10-13 16:12:48 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0e8045fd2365c5adf986cd845d4d1a185ffe0aeb&h=libreoffice-5-2

avoid crashes on broken charts, related tdf#98690

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2021-02-25 13:23:36 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3421440bfbfff7c59caea881be64b684e601e04f

tdf#98690: sc: Add UItest

It will be available in 7.2.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.
Comment 15 Eike Rathke 2022-11-30 17:44:55 UTC
That attachment 123610 [details] is *NOT* a "good xlsx", it was already saved broken (LibreOffice/5.1.1.3) with the static literal names not being quoted strings.
Comment 16 Commit Notification 2022-12-12 21:54:59 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0e5d89a149e86975e103270a0ff4e65776ff8f85

tdf#98690: move UItest to CppUnittest

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