ClearScript: "RangeError: Maximum call stack size exceeded" with default V8ScriptEngine constructor
We are using ClearScript to run some JavaScript on the back end of our web service, however for a small portion of the calls (<1%) it is throwing “RangeError: Maximum call stack size exceeded” when we are creating the V8ScriptEngine with its default constructor. Does anyone know what might be going wrong or how it could be resolved?
Unhandled Exception: Microsoft.ClearScript.ScriptEngineException: RangeError: Maximum call stack size exceeded
at V8Exception.ThrowScriptEngineException(V8Exception* )
at Microsoft.ClearScript.V8.V8ContextProxyImpl.Execute(DocumentInfo documentInfo, String gcCode, Boolean evaluate)
at Microsoft.ClearScript.V8.V8ScriptEngine.<>c__DisplayClass71_0.<Execute>b__0()
at Microsoft.ClearScript.ScriptEngine.ScriptInvokeInternal[T](Func`1 func)
at Microsoft.ClearScript.V8.V8ScriptEngine.<>c__DisplayClass76_1`1.<ScriptInvoke>b__0()
at Microsoft.ClearScript.V8.?A0xb8863588.LockCallback(Void* pvArg)
at Microsoft.ClearScript.V8.V8ContextProxyImpl.InvokeWithLock(Action gcAction)
at Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke[T](Func`1 func)
at Microsoft.ClearScript.V8.V8ScriptEngine.Execute(DocumentInfo documentInfo, String code, Boolean evaluate)
at Microsoft.ClearScript.ScriptEngine.Evaluate(DocumentInfo documentInfo, String code, Boolean marshalResult)
at Microsoft.ClearScript.ScriptEngine.Evaluate(DocumentInfo documentInfo, String code)
at Microsoft.ClearScript.ScriptEngine.Evaluate(String documentName, Boolean discard, String code)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(V8Runtime runtime, String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(String name, V8RuntimeConstraints constraints)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor()
...
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20
Commits related to this issue
- Patched integer overflow in V8's stack limit calculation, possibly fixing GitHub Issue #111. — committed to microsoft/ClearScript by ClearScriptLib 5 years ago
- ClearScript 5.6: Added initial support for JavaScript modules (V8 only, GitHub Issue #114); added initial support for CommonJS modules (V8 and JScript); added ScriptEngine.ExecuteDocument and ScriptEn... — committed to microsoft/ClearScript by ClearScriptLib 5 years ago
Awesome, thanks again.
Been a bit busy but I was finally able to get everything built and consumed in our service. We haven’t seen the issue yet so it looks good so far. We want to give it a few more days of testing to truly confirm that it is fixed though. I’ll reply back back with our results sometime next week.