microsoft / microsoft/node-api-dotnet
Cannot create multiple NodeJSEnvironment for one NodeJSPlatform
Open
@vmoroz is already working on this.
Since Aug 6, 2024.
libnode
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.