fdo 37341 MAXRECURSION reached in ScFormulaCell::Interpret

Kohei Yoshida kohei.yoshida at suse.de
Fri Aug 2 17:20:55 PDT 2013


On 08/02/2013 02:28 AM, Winfried Donkers wrote:
> Hi Kohei,
>
>> If the culprit seems to be within ScFormulaCell::Interpret() then, well, ... I can't say much else would help than stepping through these calls and keeping track of what called >which in what state. The old code had some debugging/tracing facilities that generated a .dot file from within
>> ScFormulaCell::Interpret() but unfortunately got completely removed with
>> 5ff49e8ce958deb8217880b2aaf2bd41a567e8a1 (these are the cases where I don't understand blind removal of #ifdef'ed code) so for testing purposes you might want to >revive the part of sc/source/core/data/cell.cxx of that change into sc/source/core/data/formulacell.cxx
> As you seem to be the expert on formulacell.cxx and the (Back)Solver() code, I hope you can shed some light on this problem.

I'm afraid I cannot.

To be brutally honest, I wouldn't debug this without first moving this 
code out of ScInterpreter and into a place like ScDocument::Solver() 
without those pesky temporary formula cell and temporary formula 
expression creation steps.  That's basically the strategy I first 
advised.  The current code is mixing recursion and iteration together, 
which is a recipe for trouble.  There is no way you can debug this and 
stay sane.  I would go nuts if I were forced to debug this code in its 
current form.

So, I would still stick with my original advice, and recommend we move 
this code out of the interpreter.

Kohei

-- 
Kohei Yoshida, LibreOffice Calc hacker, SUSE.



More information about the LibreOffice mailing list