RangeError: Maximum call stack size exceeded in SpreadJS evaluateBinaryOperatio

Posted by: kavan on 31 October 2025, 12:35 pm EST

    • Post Options:
    • Link

    Posted 31 October 2025, 12:35 pm EST

    We are encountering a

    RangeError: Maximum call stack size exceeded
    when loading large datasets into a SpreadJS workbook. The issue occurs on the initial sheet load, before any user interaction.

    Once this happens, the sheet becomes unresponsive, and no further actions can be performed.

    Console Error Trace:

    Uncaught RangeError: Maximum call stack size exceeded
        at y.evaluateBinaryOperation (gc.spread.sheets.all.min.js:898:2001915)
        at y.evaluate (gc.spread.sheets.all.min.js:898:1999137)
        at y.evaluateBinaryOperation (gc.spread.sheets.all.min.js:898:2002143)

    Environment Details:

    • SpreadJS version: 17.1.10
    • Browser: Brave v1.84.132
    • Framework: React 18
  • Posted 3 November 2025, 12:58 am EST

    Hi Kavan,

    Thank you for sharing the details. We tested with a dataset of around 1 lakh rows and 200 columns using random primitive values (numbers, strings, booleans), but we aren’t able to reproduce the RangeError: “Maximum call stack size exceeded” error on SpreadJS v17.1.10 - the workbook loaded successfully without freezing.

    This suggests the issue may be related to the structure or content of the dataset being used, or to workbook configuration (such as formulas or bindings).

    To investigate this issue further, could you please share a stripped-down sample application replicating the issue? You can also fork and update the attached sample that we used to replicate the issue on our end (see below).

    In case the dataset being loaded is confidential, you can update it with dummy data or share the stripped-down sample with the dataset on our private support portal.

    Kind regards,

    Chirag

    Sample: https://jscodemine.mescius.io/share/4QlpircRoUibAVGuNBUniQ

    Private Portal: https://developer.mescius.com/my-account/my-support

  • Posted 8 November 2025, 8:31 am EST

    Hi Chirag,

    Sorry for the late reply.

    You were right, the issue is not with the data actually. It’s with formula instead!

    I’m attaching the code in a zip file.

    ImportLargeDataset_2025-11-08.zip. Open the devtools and you’ll find the max call stack error!

    So we were using

    =A1+A2+....A3000
    to calculate sum (which I believe is the root cause of max call stack). Although we now have a workaround to use
    =SUM()
    instead.

    Thanks,

    Kavan

  • Posted 10 November 2025, 1:18 am EST

    Hi Kavan,

    Thanks for sharing the additional details.

    We can replicate the behavior on our end. However, the error is generated due to a large number of call stacks generated for the multiple cell references present in the formula.

    The online Microsoft Excel marks the formula as invalid, and Google Sheets also takes some time to process such large formulas.

    We are discussing this case with the concerned development team for the feasibility of optimizations. We will update you as soon as we get any information from their end.

    Internal Tracking ID: SJS-32226

    Meanwhile, we will recommend that you use the formula as you described in your previous response.

    Kind Regards,

    Chirag

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels