← Back to team overview

desktop-packages team mailing list archive

[Bug 156381] Re: [Upstream] [hardy] Goal Seek hangs Calc indefinitely

 

Launchpad has imported 14 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=37341.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-05-19T02:16:15+00:00 Christopher M. Penalver wrote:

Created attachment 46880
sample.ods

1) lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

2) 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
        500 http://us.archive.ubuntu.com/ubuntu/ natty-proposed/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

3) What is expected to happen in LibreOffice Calc via the Terminal:

cd ~/Desktop && wget
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/156381/+attachment/167142/+files/sample.ods
&& localc -nologo sample.ods

Tools -> Goal Seek... -> Formula Cell $F$100 -> Target 0 -> Variable
Cell $E$7 -> OK button

and it does so quickly and successfully.

4) What happens instead is it hangs Calc (waited ~10 minutes than killed
process).

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/7

------------------------------------------------------------------------
On 2011-05-19T02:35:55+00:00 Markus-mohrhard wrote:

Not reproducible with LibreOffice 3.4RC1 at Linux x64.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/8

------------------------------------------------------------------------
On 2011-05-19T03:08:03+00:00 Christopher M. Penalver wrote:

Formula Cell $F$100 should actually be $F$110. Reproducible in
LibreOffice 3.4.0 DEV300m103(Build:5).

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/9

------------------------------------------------------------------------
On 2011-05-19T05:30:22+00:00 Libreoffice-z wrote:

[Reproducible] with reporter's sample and "LibreOffice 3.4Beta5  – WIN7
Home Premium  (64bit) German UI [DEV300m103 (Build:5)]". I terminated
with task manager after 10 Minutes.

Steps to reproduce: 
0. Open reporter's sample
1. Menu 'Tools > Options > Calc > Calculate' Precision as shown unchecked <ok>
2. Click 'F110'
3. Menu 'Tools > Boal seek ... > 
4. Use cell picker to insert "$F$110" into Pane "Formula Cell" if not 
   already visible 
5. Insert "0" Into "Target Value"
6. Use cell picker to insert "$E$7" into Pane "Variable Cell" <ok>
   Expected: Mattching value should be found
   Actual: LibO hangs, I killed with task manager after 10, I can't tell if it might have found a result afer longer time.

Pre-condition is

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/10

------------------------------------------------------------------------
On 2011-05-19T05:54:44+00:00 Libreoffice-z wrote:

Sorry, wrong key, so comment posted before my results were complete ...

Pre-condition is NOT setting "Precision as shown" unchecked, the result
seemed to be arbitrary. I was no able to find any influence of those
settings.

My first test did not show the hang, all further tests with any settings
for Calculation showed the hang. I did the modifications in the
calculation settings after my first test without hang.

I can't confirm the hang as a general problem, a simple test with "'B1'
=A1^2" and various goals did not show any problem.

I will try to let LibO calc some longer now.

@Christopher M. Penalver:
Your sample seems to suggest that Pane "Formula Cell" should be $F$111, but in your report I read "$F$100". Any reasons for that or only accident? With "$F$100" I can't reproduce the bug, but I can with "$F$110" or "$F$110".

@Kohei:
Please feel free to reassign if it's not your area!

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/11

------------------------------------------------------------------------
On 2011-05-19T06:27:13+00:00 Libreoffice-z wrote:

Works fine until Formula Cell "$F$106", rest as reported, Hang starts
for "$F$107" or higher row No.

It seems that number of calculations steps that Goal Seek can do is
limited? I created a more simple test document myownsample.ods to check
what happens when I want to reach result "1000" in a cell in Column 'A'
wiht start value in 'A1'.

Goal seek worked fine for result in A400, hanged in A500, critical limit
seems to be between those 2 cells.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/12

------------------------------------------------------------------------
On 2011-05-19T06:28:55+00:00 Libreoffice-z wrote:

Created attachment 46887
Sample Document, see Comment 5

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/13

------------------------------------------------------------------------
On 2011-05-21T06:10:17+00:00 Kohei Yoshida wrote:

I'll make this an EasyHack.

Code pointer: ScInterpreter::ScBackSolver() in
sc/source/core/tool/interpr2.cxx implements the goal seek algorithm.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/14

------------------------------------------------------------------------
On 2011-06-17T17:20:24+00:00 Lemoyne-castle wrote:

Completed EasyHack markers

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/15

------------------------------------------------------------------------
On 2011-06-19T15:27:04+00:00 Takeshi Abe wrote:

Created attachment 48162
an experimental fix against master

Let me attach an experimental fix against master, which makes
the depth of recursion lavish.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/16

------------------------------------------------------------------------
On 2011-06-20T17:58:07+00:00 Lemoyne-castle wrote:

Created attachment 48199
Simpler example of using GoalSeek to find fixed payment for loan

Attached a simpler example of using GoalSeek to find fixed payment for a fixed term loan with compound interest.  
The fact that changing the MAXRECURSION limit delays the onset of the busy hang  --  http://opengrok.libreoffice.org/xref/calc/sc/source/core/data/cell.cxx#69  -- 
this strongly implies that the real bug here is in ScFormulaCell::Interpret() where different interpreter stack management routines kick in when there are more than MAXRECURSION pending cell/formula interpret calls.  
Also GoalSeek in myownsample.ods often creates a zero payment answer which causes the principal goal cell value to move away from the goal of zero instead of closer.  This looks like a problem with an error condition causing a zero return instead of returning 'best value so far'.  This can be seen in conjunction with the stack depth problem (before hang) and separately.
Upshot: removed EasyHack markers.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/17

------------------------------------------------------------------------
On 2011-06-24T19:24:54+00:00 Markus-mohrhard wrote:

Hello Takeshi Abe,

please send all patches to the dev mailing list at
libreoffice@xxxxxxxxxxxxxxxxxxxxx otherwise the patches might get lost.
Please add [PATCH] in the subject line.

Now to your patch. I don't like the way you tried to solve it. I think
it is better to try to eliminate the underlying problem than moving it a
bit further. Your patch will only increase the iterations before the
problem arise but will not remove the underlying problem.

Feel free to ask for help on the dev list or on IRC if you need some
help.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/18

------------------------------------------------------------------------
On 2011-06-25T04:22:15+00:00 Takeshi Abe wrote:

Hi Markus,

Thanks for your suggestion!

(In reply to comment #11)
> please send all patches to the dev mailing list at
> libreoffice@xxxxxxxxxxxxxxxxxxxxx otherwise the patches might get lost. Please
> add [PATCH] in the subject line.
So is the previous mail
http://lists.freedesktop.org/archives/libreoffice/2011-June/013962.html
not sufficient for that purpose?

> 
> Now to your patch. I don't like the way you tried to solve it. I think it is
> better to try to eliminate the underlying problem than moving it a bit further.
The main intension of the patch is to share my observation that the undelying program is not in ScBackSolver but in the iteration process itself, and moreover
we may need so many iterations to reach the sample formula's root.

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/19

------------------------------------------------------------------------
On 2011-12-20T06:02:55+00:00 Libreoffice-z wrote:

*** Bug 43693 has been marked as a duplicate of this bug. ***

Reply at: https://bugs.launchpad.net/df-
libreoffice/+bug/156381/comments/21

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libreoffice in Ubuntu.
https://bugs.launchpad.net/bugs/156381

Title:
  [Upstream] [hardy] Goal Seek hangs Calc indefinitely

Status in LibreOffice Productivity Suite:
  In Progress
Status in The OpenOffice.org Suite:
  Confirmed
Status in “libreoffice” package in Ubuntu:
  Triaged
Status in “openoffice.org” package in Ubuntu:
  Won't Fix

Bug description:
  Binary package hint: openoffice.org-calc

  1) lsb_release -rd
  Description:	Ubuntu 11.04
  Release:	11.04

  2) 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
          500 http://us.archive.ubuntu.com/ubuntu/ natty-proposed/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

  3) What is expected to happen in LibreOffice Calc via the Terminal:

  cd ~/Desktop && wget
  https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/156381/+attachment/167142/+files/sample.ods
  && localc -nologo sample.ods

  Tools -> Goal Seek... -> Formula Cell $F$110 -> Target 0 -> Variable
  Cell $E$7 -> OK button

  and it does so quickly and successfully.

  4) What happens instead is it hangs Calc (waited ~10 minutes than
  killed process).

  WORKAROUND: Use Gnumeric as it performs the calculation instantly.

  apt-cache policy gnumeric
  gnumeric:
    Installed: 1.10.13-1ubuntu1
    Candidate: 1.10.13-1ubuntu1
    Version table:
   *** 1.10.13-1ubuntu1 0
          500 http://us.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
          100 /var/lib/dpkg/status

  Original Reporter Comments: If you use the "Goal Seek" on a
  spreadsheet that exceeds 105 rows OOO calc hangs completely, taking
  over 50% of CPU and you have to force the exit.

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/156381/+subscriptions