Skip to content

Unable to initalize script engine due to pending script exception #560

@ebrandin

Description

@ebrandin

Hi

On a few occasions ClearScript has entered what seeems to be a strange erronous state after a failing script.
At this point, when trying to create a new script engine, we get this exception whenever we try to execute another script:

Microsoft.ClearScript.ScriptEngineException : The V8 runtime cannot initialize the script engine because a script exception is pending
at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyNative.Invoke[T](Func`2 func)
   at Microsoft.ClearScript.V8.SplitProxy.V8ContextProxyImpl.<>c__DisplayClass3_0.<.ctor>b__0()
   at Microsoft.ClearScript.V8.SplitProxy.V8EntityHolder..ctor(String name, Func`1 acquireHandle)
   at Microsoft.ClearScript.V8.SplitProxy.V8ContextProxyImpl..ctor(V8IsolateProxy isolateProxy, String name, V8ScriptEngineFlags flags, Int32 debugPort)
   at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(V8Runtime runtime, String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
   at Microsoft.ClearScript.V8.V8Runtime.CreateScriptEngine(String engineName, V8ScriptEngineFlags flags, Int32 debugPort)

So far we have only seen this issue while debugging or while running unit tests, but we would like to understand the root cause of this so it can be prevented.

Has anyone seen this exception or does anyone have any ideas to what could be going on?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions