http://bugs.winehq.org/show_bug.cgi?id=30138
Bug #: 30138 Summary: Amazon MP3 Downloader fails to install (single instance test through OpenMutex fails due to incorrect lasterror value) Product: Wine Version: 1.4 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: wineserver AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello,
the (NullSoft based) Amazon MP3 Downloader installer quickly fails, stating "There is already running instance of Amazon mp3 downloader".
Trace log:
--- snip --- 0023:Call KERNEL32.GetModuleHandleA(00409f70 "C:\users\focht\Temp\nsn263.tmp\System.dll") ret=00401f82 0023:Ret KERNEL32.GetModuleHandleA() retval=10000000 ret=00401f82 0023:Call KERNEL32.GetProcAddress(10000000,00409b70 "Call") ret=00401fa2 0023:Ret KERNEL32.GetProcAddress() retval=1000198f ret=00401fa2 ... 0023:Call KERNEL32.lstrcpyA(00167520,00166904 "kernel32::OpenMutexA(i 0, i 0, t "{3B3AD73B-A18E-473f-9004-1CBEE79FCFCF}") i .r9 ? e") ret=10001584 ... 0023:Call KERNEL32.OpenMutexA(00000000,00000000,00168dd8 "{3B3AD73B-A18E-473f-9004-1CBEE79FCFCF}") ret=100012cd 0023: open_mutex( access=00000000, attributes=00000000, rootdir=0010, name=L"{3B3AD73B-A18E-473f-9004-1CBEE79FCFCF}" ) 0023: open_mutex() = INVALID_PARAMETER { handle=0000 } 0023:Ret KERNEL32.OpenMutexA() retval=00000000 ret=100012cd 0023:Call KERNEL32.GetLastError() ret=100013d8 0023:Ret KERNEL32.GetLastError() retval=00000057 ret=100013d8 ... 0023:Call KERNEL32.lstrcmpiA(0040a370 "87",0040a770 "2") ret=004019d2 0023:Ret KERNEL32.lstrcmpiA() retval=00000001 ret=004019d2 0023:Call KERNEL32.lstrcpynA(0040a770,00422e40 "Der Amazon MP3-Downloader l\xe4uft noch ? bitte schlie\xdfen Sie die Anwendung und klicken Sie zum Fortfahren auf OK.\n\nUm die Installation zu unterbrechen, klicken Sie auf Abbrechen.",00000400) ret=00405b79 0023:Ret KERNEL32.lstrcpynA() retval=0040a770 ret=00405b79 0023:Call user32.MessageBoxIndirectA(004091f8) ret=00405488 ... --- snip ---
Surprisingly Wine returns 0x57(invalid parameter) instead of ERROR_FILE_NOT_FOUND when the mutex does not exist.
MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684315%28v=vs.85%2...
Wineserver code: http://source.winehq.org/git/wine.git/blob/527a985a3d7154dac549ce5170f5d0a09...
--- snip --- 234 /* open a handle to a mutex */ 235 DECL_HANDLER(open_mutex) 236 { 237 struct unicode_str name; 238 struct directory *root = NULL; 239 struct mutex *mutex; 240 241 if ((req->access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL | 242 MUTEX_ALL_ACCESS | STANDARD_RIGHTS_ALL | MAXIMUM_ALLOWED)) || 243 !req->access) 244 { 245 set_error(STATUS_INVALID_PARAMETER); 246 return; 247 } 248 ... 260 } --- snip ---
This is in fact a regression: http://source.winehq.org/git/wine.git/commitdiff/7b63fa658ac28e715f98876f790...
Reverting the wineserver part of commit (test doesn't cleanly) allows the app to install.
Regards