[Bug]: An array literal with a large array element throws "Maximum call stack size exceeded"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Start with Interpreter.ts and the ARRAY branch of Interpreter.evaluateAst at the listed lines 266, 269, 278, and 280. Check how large arrays are passed to push() and run the relevant evaluator tests with the supplied 40,000-row formula. Done means the array literal evaluates without a RangeError and the formula cell can be read.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
An array literal with a large array as an element throws a RangeError from buildFromArray and setCellContents:
const data = Array.from({length: 40000}, () => [1])
data[0].push('=SUM({VSTACK(A1:A40000,A1:A40000,A1:A40000,A1:A40000)})')
HyperFormula.buildFromArray(data, {licenseKey: 'gpl-v3'})
// RangeError: Maximum call stack size exceeded
Without the braces, =SUM(VSTACK(A1:A40000,A1:A40000,A1:A40000,A1:A40000)) returns 160000, as the equivalent formula does in Microsoft Excel Online. In Node.js 22 the error starts at about 125,000 rows or columns in one element. After it is thrown by setCellContents, the formula is stored, but reading the cell throws Value of the formula cell is not computed.
Cause: the ARRAY branch of Interpreter.evaluateAst spreads element arrays into push() (Interpreter.ts:266, :269, :278 and :280). Each spread passes one argument per row or value, and large arrays exceed the JavaScript engine's limit on the number of arguments in a call.
Expected: the array literal is built for any size that the other array functions accept.
Video or screenshots
N/A
Demo
Code snippet in the description.
HyperFormula version
3.5.0 (also develop at ec7512d21)
Your framework
None (Node.js)
Your environment
Node.js 22.23.4 on Linux
- Lingua principale
- TypeScript
- Stelle
- 2.8k
- Fork
- 175
- Merge medio
- 2g 5h
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di handsontable/hyperformula
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
handsontable/hyperformula#1803 ·
I maintainer di solito rispondono entro 1 giorno
-
numberToSimpleDate returns day 0 for 31 December of some years when leapYear1900 is trueForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
handsontable/hyperformula#1793 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
handsontable/hyperformula#1745 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Impact: Low
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
handsontable/hyperformula#1641 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
handsontable/hyperformula#1877 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di handsontable/hyperformula
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
pending close triaging
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
anomalyco/opencode#62582 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
callstack/react-native-paper#5189 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
live-codes/livecodes#1079 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Add: ESP 2 ROApertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno