Description: after trying to add another column after IV (that is IW) in Pivot, it crashes Calc Steps to Reproduce: 1. create a pivot that has columns till IV (even with a single line) 2. Try to add another item from Available Fields to Data Fields, to the bottom, so that supposed appear in column IW 3. Press OK 4. Crash Actual Results: crash Expected Results: no crash, added IW column Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Created attachment 131015 [details] screenshot
Hello Szilard, Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
if you start from A column, IV column corresponds to 256th column and so IW corresponds to 257th column. So it could be due to a variable limited to value 256.
bt: rtl_uString_release (pThis=0x0) at /home/julien/lo/libreoffice/sal/rtl/strtmpl.cxx:1218 1218 if (SAL_UNLIKELY(SAL_STRING_IS_STATIC (pThis))) (gdb) bt #0 rtl_uString_release (pThis=0x0) at /home/julien/lo/libreoffice/sal/rtl/strtmpl.cxx:1218 #1 0x00002aaad310ded8 in rtl::OUString::operator=(rtl::OUString&&) (this=this@entry=0x7fffffff3210, str=str@entry=<unknown type in /home/julien/lo/libreoffice/instdir/program/../program/libsclo.so, CU 0x9693c, DIE 0xb7154>) at /home/julien/lo/libreoffice/include/rtl/ustring.hxx:451 #2 0x00002aaad33709d9 in (anonymous namespace)::lcl_FillNumberFormats (rFormats=@0x55555c3a3ef8: 0x0, rCount=@0x55555c3a3f08: 0, xLevRes= uno::Reference to (ScDPLevel *) 0x5555584416d8, xDims=uno::Reference to (ScNameToIndexAccess *) 0x555558439508) at /home/julien/lo/libreoffice/sc/source/core/data/dpoutput.cxx:363 #3 0x00002aaad3372e0b in ScDPOutput::ScDPOutput (this=0x55555c3a3ea0, pD=<optimized out>, xSrc=..., rPos=..., bFilter=<optimized out>) at /home/julien/lo/libreoffice/sc/source/core/data/dpoutput.cxx:679 (gdb) p nDataCount $2 = 256 So the root cause is there: http://opengrok.libreoffice.org/xref/core/sc/source/core/data/dpoutput.cxx#345 SC_DPOUT_MAXLEVELS = 256 see http://opengrok.libreoffice.org/xref/core/sc/source/core/data/dpoutput.cxx#SC_DPOUT_MAXLEVELS Eike: should we increase SC_DPOUT_MAXLEVELS or should we use it as a limit in the loop and put a popup message?
@Eike,
First let's prevent the crash.. Any kind of popup in that path would be quite disturbing and should be handled at some other place.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bdf971b0202c6d55d88e61861b251459de9586b Resolves: tdf#105858 check nDataCount<SC_DPOUT_MAXLEVELS to prevent crash 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.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7fbdd8b7d3741d55b229977f9e6d6213af5fa542 more counts<SC_DPOUT_MAXLEVELS to check, tdf#105858 related 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.
Pending review https://gerrit.libreoffice.org/34369 for 5-3 https://gerrit.libreoffice.org/34370 for 5-2 https://gerrit.libreoffice.org/34372 for 5-2-6
For further development, rather than using fixed fields of a larger size SC_DPOUT_MAXLEVELS for page, row, column and data, growing std::vector should be used. Such could support more entries without having unnecessarily large amounts preallocated that mostly aren't used anyway.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbba64225a2abfdd8b2437e8a06925b15fb15d26&h=libreoffice-5-2 Resolves: tdf#105858 check SC_DPOUT_MAXLEVELS to prevent crash It will be available in 5.2.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e38914af31b0150a383cc556e634da48eceb1dbc&h=libreoffice-5-3 Resolves: tdf#105858 check SC_DPOUT_MAXLEVELS to prevent crash It will be available in 5.3.1. 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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-2-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=092026853d073f7e24988e0cebe24e4312b45b9b&h=libreoffice-5-2-6 Resolves: tdf#105858 check SC_DPOUT_MAXLEVELS to prevent crash It will be available in 5.2.6. 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.
Simplify targets a bit
Just for information, SC_DPOUT_MAXLEVELS limit has been removed on master branch: author Julien Nabet <serval2412@yahoo.fr> 2017-02-18 19:35:17 (GMT) committer Eike Rathke <erack@redhat.com> 2017-02-24 15:23:32 (GMT) commit 41f95c4a35a6335e9edb2f51c11d136d88bd0749 (patch) tree caf167ab6f6777da38612b453703b08930fec5fd parent 237685fdfad448ddb8493c6c8162f7db085ec45c (diff) Remove SC_DPOUT_MAXLEVELS limit in Pivot by using vectors instead of fixed arrays