Bug 40990

Summary: array formula leads to crash
Product: LibreOffice Reporter: oscar.0
Component: CalcAssignee: Kohei Yoshida <kohei>
Status: RESOLVED FIXED    
Severity: normal    
Priority: medium    
Version: 3.4.3 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard: target:3.5
Crash report or crash signature: Regression By:

Description oscar.0 2011-09-18 08:42:09 UTC
* Open a new spreadsheet in LibreOffice 3.4.3.
* Enter the array formula {=SUM(IF($A$1:$A$999="",IF($B$1:$B$999="",IF($C$1:$C$999="",$D$1:$D$999,0),0),0))} in cell E1.
* The program tries to allocate a lot of memory and eventually crashes.
* There is no such problem in libreoffice 3.3.
Comment 1 tester8 2011-09-20 11:25:32 UTC
NOT reproduced with

LO 3.4.3 OOO340m1 (Build:302)
Ubuntu 10.04.3 x86
Linux 2.6.32-33-generic Russian UI

Instead of that I got Error:501.
Comment 2 Reto 2011-09-20 13:25:32 UTC
I reproduced it on x86, Linux 3.0.0 and LO 3.4.3. with the same formula. Changing it to

{=SUM(IF($A$1:$A$99="",IF($B$1:$B$99="",IF($C$1:$C$99="",$D$1:$D$99,0),0),0))}

works but still draws a lot of resources. Entering numbers in D1, D2 and so on takes a moment until calculation is done. This seems to show that the processor load rises exponentially with increasing size of the array .
Comment 3 Kohei Yoshida 2011-11-03 21:53:44 UTC
I'll take a look at this for 3.5.
Comment 4 Kohei Yoshida 2011-11-21 21:11:35 UTC
Finally fixed this.

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

The problem was where I least expected.