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

Bug #586599 reported by jimav
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenOffice
New
Undecided
Unassigned
libreoffice (Ubuntu)
New
Undecided
Unassigned
openoffice.org (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: openoffice.org

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: openoffice.org-calc 1:3.2.0-7ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
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)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: openoffice.org

Revision history for this message
jimav (james-avera) wrote :
Chris Cheney (ccheney)
summary: - Conditional Formats using STYLE func re-eval forever, sucking CPU
+ [upstream] Conditional Formats using STYLE func re-eval forever, sucking
+ CPU
Changed in openoffice.org (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
penalvch (penalvch)
summary: - [upstream] Conditional Formats using STYLE func re-eval forever, sucking
- CPU
+ Conditional Formats using STYLE func re-eval forever, sucking CPU
Revision history for this message
penalvch (penalvch) wrote :

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

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/586599/+attachment/1407325/+files/ooCPUbug.ods && 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
libreoffice-calc:
  Installed: 1:3.3.2-1ubuntu5
  Candidate: 1:3.3.2-1ubuntu5
  Version table:
 *** 1:3.3.2-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.3.2-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Revision history for this message
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.

TO REPRODUCE:

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

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/586599/+attachment/1407325/+files/ooCPUbug.ods && localc -nologo ooCPUbug.ods
Answer "Enable Macros" when prompted

RESULTS:
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)

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.