Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call exe by node reutrn 3221225477 #56515

Open
joy-0909 opened this issue Jan 8, 2025 · 4 comments
Open

call exe by node reutrn 3221225477 #56515

joy-0909 opened this issue Jan 8, 2025 · 4 comments
Labels
windows Issues and PRs related to the Windows platform.

Comments

@joy-0909
Copy link

joy-0909 commented Jan 8, 2025

Version

18.20.1

Platform

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?

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

@marco-ippolito
Copy link
Member

the error looks like a null pointer but its hard to tell

@marco-ippolito marco-ippolito added the windows Issues and PRs related to the Windows platform. label Jan 8, 2025
@joy-0909
Copy link
Author

joy-0909 commented Jan 8, 2025

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?

@joy-0909
Copy link
Author

joy-0909 commented Jan 8, 2025

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.

@joy-0909
Copy link
Author

joy-0909 commented Jan 8, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

2 participants