Download it now!
Bug 60300 - PIVOTTABLE: Calc crashing when using GETPIVOTDATA on pivottable that has automatic subtotals
Summary: PIVOTTABLE: Calc crashing when using GETPIVOTDATA on pivottable that has auto...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.4.3 release
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.1.0 target:3.6.7 target:4.0.3
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-05 02:07 UTC by Bart
Modified: 2013-04-19 04:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
small test table and pivottable, and function GETPIVOTDATA used. (13.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-05 02:07 UTC, Bart
Details
bt + console logs on master (10.23 KB, text/plain)
2013-02-07 22:07 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bart 2013-02-05 02:07:18 UTC
Created attachment 74211 [details]
small test table and pivottable, and function GETPIVOTDATA used.

Check the attachment. If I set the subtotals for a data field to 'automatic', Calc crashes. When I remove the GETPIVOTDATA function, I can make the change without problems.
Comment 1 Julien Nabet 2013-02-07 21:54:07 UTC
Comment on attachment 74211 [details]
small test table and pivottable, and function GETPIVOTDATA used.

mimetype fixed
Comment 2 Julien Nabet 2013-02-07 22:07:35 UTC
Created attachment 74382 [details]
bt + console logs on master

On pc Debian x86-64 with master sources updated today, I reproduced the crash.

I attached console logs + bt
Comment 3 Julien Nabet 2013-02-07 22:08:44 UTC
Kohei/Markus/Eike: bt with symbols attached, one for you?
Comment 4 Kohei Yoshida 2013-02-13 15:52:25 UTC
Interesting. Crash happens *only when* the subtotal is set to autmatic?  Hmm...
Comment 5 Kohei Yoshida 2013-02-13 15:52:42 UTC
I'll take a look.
Comment 6 Kohei Yoshida 2013-02-13 17:16:42 UTC
It's the "empty line after each item" option set for the "type" field that's causing grief.  Uncheck that, and the crash will go away.
Comment 7 Kohei Yoshida 2013-02-13 18:25:22 UTC
Well, I really don't like the way GETPIVOTDATA is calculated currently.  We actually parse the actual table output to come up with the final value, which is susceptible to layout changes (like this bug report suggests).

IMO It would be much better to use the calculation result already computed and stored by the pivot engine somehow, which is independent of how the result is presented on the sheet.
Comment 8 Commit Notification 2013-04-11 14:59:51 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

prevent vector and sequence out of bounds access, fdo#60300



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 9 Commit Notification 2013-04-11 18:16:39 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=0ac18f7d54f22c0c0d40cc4b1cfe6059ef0b56c5&h=libreoffice-3-6

prevent vector and sequence out of bounds access, fdo#60300


It will be available in LibreOffice 3.6.7.

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 2013-04-11 18:16:58 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e58a8b6d7dc1b01af9f54bec8fdce718b1d8bccd&h=libreoffice-4-0

prevent vector and sequence out of bounds access, fdo#60300


It will be available in LibreOffice 4.0.3.

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 Kohei Yoshida 2013-04-19 04:31:04 UTC
Just merged the feature branch to master.  The new code calculates GETPIVOTDATA from the pivot result tree instead of from the pivot table output.
Comment 12 Commit Notification 2013-04-19 04:35:17 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#60300: Work-in-progress change to rework pivot table core.



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.