-
Notifications
You must be signed in to change notification settings - Fork 171
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
Windows crash on sys.get_output #1142
Comments
The types are somewhat wrong, this should be correct inline qint64 getProcessID(const QProcess* proc)
{
#ifdef Q_OS_WIN
Q_PID procinfo = proc->pid();
return qint64(procinfo->dwProcessId);
#else // Linux
return proc->pid();
#endif // Q_OS_WIN
} If that doesn't fix it it has to be something else. |
I don't think that's the issue. But that's an improvement, also a null check should definitely be done |
It's a timing issue I'm pretty sure, applications don't have time to start up, the pid will be null. One solution is to make a blocking call to wait until the application has started (there is a function for this), another would be to change how the function behaves. |
Another reason why could be because the application could never start up, because it for example doesn't exist. Netcat, for instance, is not a core Windows command. |
More specifically, getProcessId causes a crash
Debug marks the crash point being return procinfo->dwProcessId
The text was updated successfully, but these errors were encountered: