Created attachment 123836 [details] Version of the file that does not make LO crash Hello to all. I have defined a function in Basic that makes a simple calculation : with 3 values P1, P2, P3 it computes ( abs(P1-P2) + abs(P2-P3) + abs(P3-1)) / (abs(P1) + abs (P2) + abs(P3)) I finished coding the function and it works. However, I want to use it to a huge range of cells (1250 rows x 20 columns = 25 000 function calls ) and that makes LO crash. I am providing two sample files, one with only 100 calls of the function, so you can open it and check out that the function works. The second file has the 25 000 function calls and it crashes LO as soon as I open it if I enable the macros. I am running LO 5.1.1.2 under Linux Mint 17.1. However, since I have a dual-boot on this computer, I have also tested opening the same file with LO 5.0.5.2 under Windows 7 and it works (no crashing). So it seems to be a problem, either with the 5.1.1.2 build or with the Linux version. The function is called IndiceEquilibrage and is called in the second sheet of the Calc worksheet.
Created attachment 123837 [details] version of the file that makes LO crash
Created attachment 123862 [details] bt with debug symbols On pc Debian x86-64 with master sources updated today, I could reproduce this. I attached a bt with symbols.
sc/source/core/tool/interpr4.cxx calls ::IsString on a ScVectorRefMatrix which calls ensureFullMatrix. That makes use of rArray.mpStringArray where rArray's mpStringArray is set to that rArray by FormulaGroupContext::ensureStrArray and the storage of mpStringArray belongs to the FormulaGroupContext, but that context was reset and destroyed up the stack in ScDocument::InterpretDirtyCells so the data is now invalid
I can make it not crash with https://gerrit.libreoffice.org/#/c/25815/
I just tried on another computer (32 bits, running Linux Mint 17.3, with LO 5.0.3.2) and it works fine.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=dc78e5c6f5f55b0289012f4c4e6013d2935b1cc6 Resolves: tdf#98880 ensure backing context of DoubleVectorRefToken... 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.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=57f8094fd312114d670ac4cdbdfd18b80b2c67e5&h=libreoffice-5-2 Resolves: tdf#98880 ensure backing context of DoubleVectorRefToken... It will be available in 5.2.0.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.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fb433b7909d049f12e848ad56ae8b406f91e1cc2&h=libreoffice-5-1 Resolves: tdf#98880 ensure backing context of DoubleVectorRefToken... It will be available in 5.1.5. 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.