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()
...
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?