https://bugs.documentfoundation.org/show_bug.cgi?id=174267

--- Comment #2 from [email protected] ---
I asked codex to investigate the root cause and suggest a simple fix. I don't
expect it to meet your quality requirements, but I hope it saves you time.
Moreover, it noticed that the bug seems to have the same root cause as
https://bugs.documentfoundation.org/show_bug.cgi?id=174267

-----

This shares the row-range MIN report’s fallback defect.
ScFormulaCell::Interpret() can return C2 uncalculated after group-cycle
detection during an ordinary read. MIN’s type check sees its provisional
numeric value; the following read calculates an empty string and numeric
conversion raises Err:519.

The proposed correction restricts the group-cycle bailout to active dependency
evaluation, allowing ordinary scalar reads to finish. No change to MIN’s
empty-string handling is needed. The faulty branch dates to 24afa5ddbecf
(2018-07-06; 6.2 source), not a binary-bisected introduction. Related: bug
132451.

On locally patched 27.2.0.0.alpha0+ master 7528c0d40601, macOS 27.0.1 ARM64,
all cells pass three load/hard-recalculation cycles per threading setting. All
20 existing parallelism tests pass. Reverting restores Err:519. Patched Linux
was not tested.

--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1869,7 +1869,8 @@
             // Dependency calc inside InterpretFormulaGroup() failed due to
             // detection of a cycle and there are parent FG's in the cycle.
             // Skip InterpretTail() in such cases, only run InterpretTail for
the "cycle-starting" FG
-            if (!bPartOfCycleBefore && bPartOfCycleAfter &&
rRecursionHelper.AnyParentFGInCycle())
+            if (rRecursionHelper.GetDepComputeLevel() > 0 &&
!bPartOfCycleBefore
+                && bPartOfCycleAfter && rRecursionHelper.AnyParentFGInCycle())
             {
                 rDocument.DecInterpretLevel();
                 return bGroupInterpreted;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to