Skip to content

Cannot create multiple NodeJSEnvironment for one NodeJSPlatform #348

Open
@camnewnham

Description

@camnewnham

The docs suggest that multiple environments can exist concurrently for the sample platform.

I get an assertion failure from this simple console application:

using Microsoft.JavaScript.NodeApi.Runtime;
NodejsPlatform platform = new NodejsPlatform("libnode.dll");
NodejsEnvironment env1 = platform.CreateEnvironment();
NodejsEnvironment env2 = platform.CreateEnvironment();
C:\Users\me\Desktop\libnode\src\inspector_agent.cc:704: Assertion `(start_io_thread_async_initialized.exchange(true)) == (false)' failed.
 1: 00007FF961841CAF v8_inspector::V8StackTrace::V8StackTrace+649598
...

libnode was built with the instructions and is using the suggested napi-libnode-v20.9.0 branch.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

📋 Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions