Bug 58004 - PIVOTTABLE does not keep date format and crash while grouping
Summary: PIVOTTABLE does not keep date format and crash while grouping
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.0.beta1
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.0.0.1 target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-08 01:12 UTC by m_a_riosv
Modified: 2013-01-04 23:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample data for pivot table (1.44 MB, application/vnd.oasis.opendocument.spreadsheet)
2012-12-08 01:12 UTC, m_a_riosv
Details
bt + console on master sources (5.22 KB, text/plain)
2012-12-08 22:17 UTC, Julien Nabet
Details
Local setting (51.80 KB, image/png)
2012-12-11 01:53 UTC, m_a_riosv
Details
Local setting US_English (47.13 KB, image/png)
2012-12-11 01:56 UTC, m_a_riosv
Details
bt + console on master sources (9.14 KB, text/plain)
2012-12-13 20:25 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m_a_riosv 2012-12-08 01:12:30 UTC
Created attachment 71169 [details]
Sample data for pivot table

Win7x64 Ultimate
LiboDev Version 4.0.0.0.beta1+ (Build ID: 465d3512cca457c79e6ef85ad1cbf6bcc88e888)
LibreOffice Version 3.6.4.3 (Build ID: 2ef5aff)

Steps:
1. Open attachment.
2. Goto to A1
3. Create a Pivotable with first field (fecha) in Rows Fields, second fiel in Data Fields.
4. Ok
** The row field is not formatted as date.

5. Format all values of first field in pivotable as date.
6. Group with the first field as default by Month.
7. Group with the first field by month and year.
** Crash.

The crash does not occur if the pivotable is created from a few rows.

The crash is a regression from 3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
Comment 1 Julien Nabet 2012-12-08 22:17:48 UTC
Created attachment 71220 [details]
bt + console on master sources

On pc Debian x86-64 with master sources updated today (commit 649c6b38911e9b77d21efba5fa1d6affa9fc4b0e), I had a crash but before having done the whole process!

Here what I did:
1. Opened the attachment.
2. Goto to A1
3. Created a Pivotable with first field (fecha) in Rows Fields, second field (zvl1e) in Data Fields.
4. Ok
I had this too : The row field is not formatted as date.

5. Selected all cells of first field (about 2100) in pivotable and formatted as date (DD/MM/YYYY)
6. Select Group

=> Crash!
Comment 2 Julien Nabet 2012-12-08 22:19:33 UTC
Following my last comment, I didn't reproduce the problem in the same way but I  confirm there's something wrong here.

Kohei: one for you?
Comment 3 Kohei Yoshida 2012-12-10 15:04:55 UTC
Bug 57497 should've fixed the crasher.
Comment 4 m_a_riosv 2012-12-11 00:40:29 UTC
With the sample file in this bug, both issues remains (format and crash).

Win7x64 Ultimate
LOdev Version 4.0.0.0.beta1+ (Build ID: f4cae670e314f5e869d7d9ac15ea51c3c9cf66f)
libreoffice-4-0~2012-12-10_09.43.47_LibO-Dev_4.0.0.0.beta1_Win_x86_install_en-US
Comment 5 Kohei Yoshida 2012-12-11 01:04:37 UTC
(In reply to comment #4)
> With the sample file in this bug, both issues remains (format and crash).
> 
> Win7x64 Ultimate
> LOdev Version 4.0.0.0.beta1+ (Build ID:
> f4cae670e314f5e869d7d9ac15ea51c3c9cf66f)
> libreoffice-4-0~2012-12-10_09.43.47_LibO-Dev_4.0.0.0.
> beta1_Win_x86_install_en-US

I can't reproduce the crash though.  And it should really have been fixed by that other bug.
Comment 6 m_a_riosv 2012-12-11 01:53:53 UTC
Created attachment 71301 [details]
Local setting

Hi Kohei,

thinking about what could be different in our instalations, I have tried changing the local setting from my Spanish-Spain to English-US and the crash does not happen.
Returning to Spanish-Spain do not crash if I not reopen the file.


Attached a screenshoot with my local setting.
Comment 7 m_a_riosv 2012-12-11 01:56:14 UTC
Created attachment 71302 [details]
Local setting US_English

Screeshoot of configuration that works.
Comment 8 m_a_riosv 2012-12-11 02:10:27 UTC
A couple of test.

With local setting:
- German (Germany) -> No crash.
- French (France) -> Crash.

I hope this can help.
Comment 9 Julien Nabet 2012-12-12 21:59:58 UTC
Comment on attachment 71301 [details]
Local setting

fix mimetype
Comment 10 Julien Nabet 2012-12-12 22:00:17 UTC
Comment on attachment 71302 [details]
Local setting US_English

Fix mimetype
Comment 11 Julien Nabet 2012-12-13 20:25:42 UTC
Created attachment 71463 [details]
bt + console on master sources

With master sources updated today (commit 634ee953f1d090871834f6bc53faafaa7b96b874) + "make clean" and a brand new LO profile), I reproduced the crash again (with English localization), just by trying to group.
Comment 12 Kohei Yoshida 2012-12-13 20:41:55 UTC
Crash is likely caused by the number format issue, so no need to attach backtrace.  You aren't supposed to be able to change the number format inside pivot table manually anyway, so that's another bug we need to look at.  Whatever happens after force-setting number format is completely undefined.
Comment 13 Not Assigned 2013-01-03 20:00:29 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

fdo#58004: Apply source number format over one specified by the style.


It will be available in LibreOffice 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 14 Not Assigned 2013-01-03 20:00:49 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#58004: Apply source number format over one specified by the style.



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 15 Not Assigned 2013-01-03 20:47:15 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#58004: Fix out-of-bound access to std::vector.



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 16 Not Assigned 2013-01-03 20:53:04 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

fdo#58004: Fix out-of-bound access to std::vector.


It will be available in LibreOffice 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 17 Kohei Yoshida 2013-01-03 21:12:43 UTC
Boy. This document exposes a lot of bugs in the pivot table code...
Comment 18 Not Assigned 2013-01-04 01:31:13 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

fdo#58004: Let's remove these upper bound truncation.


It will be available in LibreOffice 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 19 Not Assigned 2013-01-04 01:31:31 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#58004: Let's remove these upper bound truncation.



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 20 Kohei Yoshida 2013-01-04 01:37:18 UTC
Ok. I've fixed all the issues I've found. Marking this fixed.
Comment 21 m_a_riosv 2013-01-04 23:17:17 UTC
Thanks so much Kohei.

Verified in:
Version 4.1.0.0.alpha0+ (Build ID: 6a393297ce6d99bbc4edefbf01ab9c5c6f0eff8)
TinderBox: Win-x86@6, Branch:master, Time: 2013-01-04_01:06:01