https://bugs.documentfoundation.org/show_bug.cgi?id=174266
--- Comment #3 from [email protected] --- I found another edge case that I believe to be a bug related to this report here and will upload a new excel file: each sheet has 100 data rows; every A2:E101 row should be 5, 5, 6, 7, 5. With the earlier patches, Minimum!E2 is -1 and Maximum!E2 is 4; 994 of 1,000 values are wrong. This repeats in three fresh threaded processes. Disabling threading, reducing to 99 data rows, or hard-recalculating after initial load passes. Again, I hope it's helpful that I asked codex for some context and a patch (if not, ignore it): ----- Trace: an inner dependency guard exits at depth 3 and clears the shared abort flag while depth 2 is still active. An unfinished input is read as zero, and the outer interpreter publishes an incorrect MIN/MAX result. The previous reproduction reached the scalar-fallback boundary at depth zero and did not cover this nested lifetime. The additional fix clears the abort flag only when dependency depth reaches zero. Existing result-publication checks then suppress provisional results until scalar fallback can complete. Keep the earlier depth-zero scalar-fallback correction too. No MIN/MAX arithmetic changes or global threading restriction are needed. After the patch, it passes with this correction, covering MIN/MAX and 99/100 rows. All 21 parallelism tests pass. Full-workbook validation with ordinary MIN/MAX ranges enabled passes all 73 audit tests and a ten-window threaded/single-threaded all-cell comparison. The earlier four attachments and bug 173843's attachment still pass. Tested on macOS 27.0.1 ARM64, 27.2.0.0.alpha0+ master 7528c0d40601 plus the candidate patches. Linux was not tested. “Hard recalculation passes” above means after initial load. diff --git a/sc/source/core/tool/recursionhelper.cxx b/sc/source/core/tool/recursionhelper.cxx index 3055fc78d..06ba48884 100644 --- a/sc/source/core/tool/recursionhelper.cxx +++ b/sc/source/core/tool/recursionhelper.cxx @@ -210,7 +210,10 @@ void ScRecursionHelper::IncDepComputeLevel() void ScRecursionHelper::DecDepComputeLevel() { --nDependencyComputationLevel; - bAbortingDependencyComputation = false; + // An inner guard ending does not finish the outer dependency attempt. + // Keep its abort state until no speculative calculation remains active. + if (nDependencyComputationLevel == 0) + bAbortingDependencyComputation = false; } void ScRecursionHelper::AddTemporaryGroupCell(ScFormulaCell* cell) -- You are receiving this mail because: You are the assignee for the bug.
