[Wine] [Bug] [Urgent] CreateProcess Failed internal error (1359)
Syphius
wineforum-user at winehq.org
Mon Aug 23 08:45:16 CDT 2010
Hi,
I working on porting an IDE on MacOSX with the help of Wine, And I discover a random bug on wine.
Please use this sample code to reproduce it (to be compiled on Windows):
Code:
/////////////////////////////////////////////////////////////////////////////
int Quit(int aReturnCode)
{
#ifdef _DEBUG
wcout << L"Press Enter to quit";
getchar();
#endif
return aReturnCode;
}
/////////////////////////////////////////////////////////////////////////////
int wmain(int argc, wchar_t *argv[])
{
int arg = 0;
if(argc > 1)
{
arg = _wtoi(argv[1]);
}
HANDLE hands[255];
wchar_t buff[255];
swprintf(buff,255,L"Test_%s_%s.log",argv[1],argv[2]);
FILE * fil = _wfopen(buff,L"w");
fwprintf(fil,L"Start %d\n",arg);
fflush(fil);
printf( "Start %d\n",arg);
if(arg >= 7)
{
printf( "End chain\n");
return Quit(0);
}
int max = 2;
if(arg > 0)
{
max = 2;
}
for(int i = 0; i < max; i++)
{
wchar_t buffer[255];
swprintf(buffer,255,L"\"%s\" %d %s%d",argv[0],arg + 1,argv[2],i);
STARTUPINFOW si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES/*|STARTF_USESHOWWINDOW*/;
//sui.wShowWindow = SW_HIDE;
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if( !CreateProcessW( NULL, // No module name (use command line)
buffer, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
fwprintf(fil,L"CreateProcess failed (%d).\n", GetLastError());
fflush(fil);
}
hands[i] = pi.hProcess;
}
fclose(fil);
for(int i=0;i<max;i++)
{
// Wait until child process exits.
WaitForSingleObject( hands[i], INFINITE );
// Close process and thread handles.
CloseHandle( hands[i] );
}
printf( "End %d\n", arg);
return Quit(0);
}
When I execute it on windows everything work fine I get this type of messages :
Code:
Start 0
Start 1
Start 1
Start 2
Start 2
Start 2
Start 2
Start 3
Start 3
Start 3
Start 3
Start 3
Start 3
Start 3
Start 3
Start 4
Start 4
And on mac with wine I get :
Code:
Start 0
Start 1
Start 1
Start 2
Start 2
Start 2
Start 2
Start 3
Start 3
Start 3
Start 3
Start 3
Start 3
Start 3
Start 3
Start 4
Start 4
Start 4
Start 4
Start 4
Start 4
Start 4
CreateProcess failed (1359).
Start 4
Start 4
Start 4
Start 4
Start 4
Start 4
Start 4
Start 4
Start 4
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
CreateProcess failed (1359).
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
CreateProcess failed (1359).
Start 5
Start 5
Start 5
Start 5
Start 5
Start 5
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 6
Start 6
CreateProcess failed (1359).
Start 6
CreateProcess failed (1359).
Start 6
Start 6
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
Start 7
I used wine 1.2, 1.3.0 and 1.1.39 on MacOSX 10.6.4 SnowLeopard (Intel hardware) and Windows XP SP3.
Could you help me?
Best Regards,
Syphius.
More information about the wine-users
mailing list