Conditional Formats using STYLE func re-eval forever, sucking CPU

Bug #586599 reported by jimav on 2010-05-27
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Unassigned (Ubuntu)

Bug Description

Binary package hint:

oocalc repeatedly re-evaluates STYLE in Conditional Formats forever, sucking CPU even when "doing nothing".

This occurs if the formula in the Cond. Format calls the STYLE function and references any cell content,
for example 'STYLE( somefunction(A1) )'

In a large spreadsheet this causes 80-90% CPU utilization when "nothing" is happening. Also, if the formulas are calling (working) Basic functions, it is almost impossible to develop new macro code for other purposes because the existing macros are called constantly while you are trying to edit new code; the compiler "spontaneously" runs from time to time and strange crashes occur, loosing recent edits.

Please open the attached demo spreadsheet.

In the demo, a Conditional Format formula calls a Basic macro, which displays a message every 350th time it is called.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: 1:3.2.0-7ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Thu May 27 15:50:54 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
 PATH=(custom, user)

jimav (james-avera) wrote :
Chris Cheney (ccheney) on 2010-05-29
summary: - Conditional Formats using STYLE func re-eval forever, sucking CPU
+ [upstream] Conditional Formats using STYLE func re-eval forever, sucking
Changed in (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
summary: - [upstream] Conditional Formats using STYLE func re-eval forever, sucking
+ Conditional Formats using STYLE func re-eval forever, sucking CPU

jimav, this issue is unreproducible in LibreOffice Calc via the Terminal:

cd ~/Desktop && wget && localc -nologo ooCPUbug.ods

Tools -> Macros -> Run Macro -> under Library click ooCPUbug.ods -> Standard -> Module1 -> under Macro name click MYFUNC -> RUN button and notice no crash or performance issues. Does this work for you?

lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

apt-cache policy libreoffice-calc
  Installed: 1:3.3.2-1ubuntu5
  Candidate: 1:3.3.2-1ubuntu5
  Version table:
 *** 1:3.3.2-1ubuntu5 0
        500 natty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.3.2-1ubuntu4 0
        500 natty/main i386 Packages

Changed in libreoffice (Ubuntu):
status: New → Incomplete
jimav (james-avera) wrote :

You must enable macro execution when loading the file to see the problem. Running the macro once by hand does not show the problem; the problem is that libre-office runs the macro thousands and thousands of times whether you like it or not when macros are enabled.


localc -nologo
Set "Medium" (Confirmation required)
Click OK, OK, File->Exit.

cd ~/Desktop && wget && localc -nologo ooCPUbug.ods
Answer "Enable Macros" when prompted

A message box "a MYFUNC called X times.." appears. Click OK every time it appears.
Wait at least 30 seconds! You should see at least hundreds of calls...

Run "top" in a terminal window; soffice.bin is consuming lots of CPU while the spreadsheet is "idle"
(it stops only when the macro pops up the "called X times" dialog every so often)

Reproduced using Libre Office 3.3.2 (Ubuntu package 1:3.3.2-1ubuntu5)

Changed in libreoffice (Ubuntu):
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers