Bug 107072 - PIVOT CHARTS: Crash when there are no column fields in source table
Summary: PIVOT CHARTS: Crash when there are no column fields in source table
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks: Pivot-Chart
  Show dependency treegraph
 
Reported: 2017-04-10 14:34 UTC by bureautiquelibre
Modified: 2017-04-24 20:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with pivot table having everything in row field (16.52 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-04-10 14:34 UTC, bureautiquelibre
Details
bt with debug symbols (25.56 KB, text/plain)
2017-04-16 18:38 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bureautiquelibre 2017-04-10 14:34:23 UTC
Created attachment 132452 [details]
File with pivot table having everything in row field

Attempt to create pivot chart on provided file results in a crash.
Comment 1 bureautiquelibre 2017-04-10 14:35:46 UTC
Works also when data and all fields are in column ...
Comment 2 bureautiquelibre 2017-04-10 15:09:01 UTC
With everything in Column, deactivating totals fixes the bug, but that doesn't work when everything is in Rows.
Comment 3 Eike Rathke 2017-04-10 15:36:50 UTC
Confirmed.

@Tomaž: one for you..
In sc/source/ui/unoobj/PivotTableDataProvider.cxx sc::PivotTableDataProvider::collectPivotTableData() aDataFieldNamesVectors[i] with i=28 is tried to be accessed, where aDataFieldNamesVectors has only 28 elements.
Comment 4 Eike Rathke 2017-04-10 15:38:58 UTC Comment hidden (obsolete)
Comment 5 Julien Nabet 2017-04-16 18:38:01 UTC
Created attachment 132615 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached bt + debug symbols and other traces before the crash.

I noticed that m_aLabels is filled only in case sheet::DataPilotFieldOrientation_COLUMN case
Comment 6 Commit Notification 2017-04-19 19:35:00 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#107072 fix crash when only a row and data fields are present

It will be available in 5.4.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 7 Julien Nabet 2017-04-24 20:22:32 UTC
I confirmed it's fixed with master sources updated yesterday.

Thank you Tomaž!