Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Unassigned: SEHException or AccessViolation under xUnit [60]

Whenever I try to run a test under xUnit using the built in Visual Studio Test Runner (with xUnit plugin) containing the V8Runtime, I get either an AccessViolation or an SEHException. The strange thing is the exception does not occur if I debug the test (with/without break points).

Environment: Visual 2013 Update 4 Test Runner, xUnit, code to recreate:

public void TestAccessException() {
var runtime = new V8Runtime("Test Context");

Stack trace:

System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
---- System.Runtime.InteropServices.SEHException : External component has thrown an exception.
Result StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.ClearScript.V8.V8Proxy.CreateImpl[T](Object[] args) in c:\dev\ClearScript\ClearScript\V8\V8Proxy.cs:line 93
at Microsoft.ClearScript.V8.V8IsolateProxy.Create(String name, V8RuntimeConstraints constraints, Boolean enableDebugging, Int32 debugPort) in c:\dev\ClearScript\ClearScript\V8\V8IsolateProxy.cs:line 70
at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort) in c:\dev\ClearScript\ClearScript\V8\V8Runtime.cs:line 204
at Microsoft.ClearScript.V8.V8Runtime..ctor(String name) in c:\dev\ClearScript\ClearScript\V8\V8Runtime.cs:line 98
at FlowAPI.Scripting.JavascriptRunner..ctor() in c:\dev\FlowAPI\FlowAPI.Scripting\JavascriptRunner.cs:line 20
at FlowAPI.Server.Tests.Scripting.TestScripting.TestV8ScriptingMultiCall() in c:\dev\FlowAPI\FlowAPI.Server.Tests\Scripting\TestScripting.cs:line 20
----- Inner Stack Trace -----
at V8Isolate.Create(StdString* , V8IsolateConstraints* , Boolean , Int32 )
at Microsoft.ClearScript.V8.V8IsolateProxyImpl..ctor(String gcName, V8RuntimeConstraints gcConstraints, Boolean enableDebugging, Int32 debugPort) in c:\dev\clearscript\clearscript\v8\clearscriptv8\v8isolateproxyimpl.cpp:line 86

Comments: Yeah, reboot didn't change failing tests. Again, debugging the tests works fine, but running them fails. It doesn't always do it, but when it fails one test, it will fail them all as all will cause access violations at that time.

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles

Latest Images