Closed ebrandin closed 7 months ago
Hi @ebrandin,
Has anyone seen this exception or does anyone have any ideas to what could be going on?
Currently this happens if CreateScriptEngine
is called after a no-op Interrupt
call – that is, an Interrupt
call that occurs when the V8 runtime is not executing script code:
var runtime = new V8Runtime();
var engine = runtime.CreateScriptEngine();
engine.Interrupt();
runtime.CreateScriptEngine(); // <-- EXCEPTION
Because it may be difficult or impossible for the host to ensure that Interrupt
is always called during script execution, we consider this a bug, and we'll fix it in the next ClearScript release.
However, that exception can also be legitimate. For example:
Interrupt
is called on the same V8 runtime.CreateScriptEngine
before returning to script code.That sequence results in the same exception, and ClearScript can do nothing to prevent it. Many V8 API methods fail when a script exception (or script interruption) is pending. That behavior is by design and beyond ClearScript's control.
Thanks!
Fixed in Version 7.4.5.
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:
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?