You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a c++ program can run corrcetly by cmd.But when we call this in node spawn with code 3221225477.run program by node child_process.spwan corrcetly,but it broked return 3221225477.
I used windebug to display access violation. Is there any difference between using node to pull up the memory allocation and using cmd to pull it up? Aren't they both independent memory spaces? Why can cmd execute it?
the error looks like a null pointer but its hard to tell
Yes, it looks like that, but we have confirmed that there is no problem with our program, manual execution is successful, and this problem only occurs on some machines. Restarting may solve the problem, but it is still easy to occur. Although most of the time it is good, we want to know the reason so that we can solve it in a targeted manner. Is there any way to determine whether this error return is defined by the C++ program or node? Finally, it is returned in the close event, so the child process did not crash?
the error looks like a null pointer but its hard to tell
what 's more,The location where the program fails is different. We have log records, but no errors are recorded. It stops suddenly.
the error looks like a null pointer but its hard to tell
what 's more,The location where the program fails is different. We have log records, but no errors are recorded. It stops suddenly.
@marco-ippolito@mojodna plz,Have you encountered this situation in the community? Is it possible that the node environment is incompatible with executing C++ under Windows?
Version
18.20.1
Platform
Subsystem
win10
What steps will reproduce the bug?
const { spawn } = require('child_process');
const cppProcess = spawn('./myProgram.exe');
cppProcess.stdout.on('data', (data) => {
console.log(stdout: ${data});
});
cppProcess.stderr.on('data', (data) => {
console.error(stderr: ${data});
});
cppProcess.on('close', (code) => {
if (code !== 0) {
console.error(C++ 程序发生错误,退出码 ${code});
} else {
console.log('C++ 程序正常退出');
}
});
cppProcess.on('error', (err) => {
console.error(启动 C++ 程序时出错: ${err.message});
});
How often does it reproduce? Is there a required condition?
must,but differentcomputer return different condition,it may run correctly
What is the expected behavior? Why is that the expected behavior?
run correctly like cmd way
What do you see instead?
return 3221225477,
mov qword ptr [rdi],rdx ds:00000000`00000000=?????????????????
Additional information
No response
The text was updated successfully, but these errors were encountered: