Possible MacDriver issue in 1.5.28

Questions about Wine on macOS.
Locked
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Possible MacDriver issue in 1.5.28

Post by doh123 »

I'll try to write this all in a way that makes sense... I first noticed this issue in Wineskin, so I checked normal Wine built by hand and found the same issue. I need to know if others can reproduce this too, or if I'm just doing something wrong.

Part of this is an old bug I've always ignored because its not that big of a problem... the other part is a major problem and changed with the MacDriver being default in 1.5.28.

Old Bug that contributes to the current issue
Wine creates some folder for a lockfile in /tmp/.wine-502 that appears to have randomly generated parts in the name... and will use that folder to make a "lock" file. (I have no idea what wine-502 is for or how its naming is selected)
If that folder does not exist when trying to run wine, an error message comes up saying something like this for example..
wine: chdir to /tmp/.wine-502/server-1000002-d0a483 : No such file or directory
At that point wineserver keeps running but spawns no wine processes.
checking for that folder it does exist, it appears wine created it...
running anything else with wine at this point works correctly, or you can close the wineserver with wineserver -k... i'm assuming since the folder already exists and I do not get the error message any more.
I'm assuming this is some type of race condition where Wine creates the folder but its not created fast enough before it tries to use it and fails.
I've always ignored this problem as its a minor annoyance.

Current Issue
The current issue I'm having happens related to the before mentioned problem.
This only appears to happen during wineprefix creation, where I cannot turn off the MacDriver since its default now.
After getting the error message about chdir not working because "No such file or directory" ... if I try to run anything after that and the "lock" file is still in the /tmp/.wine-502 folder that was made... I get crash info written out to the Terminal that looks like the MacDriver. If I manually delete the "lock" file then the error does not happen, but that file always exists since things didn't exit cleanly after the chdir error.
Terminal Output is listed here...

Code: Select all

2013-04-20 11:53:55.999 wine[8835:707] -[__NSCFType symbolicTraits]: unrecognized selector sent to instance 0x404300d0
2013-04-20 11:53:56.000 wine[8835:707] -[__NSCFType symbolicTraits]: unrecognized selector sent to instance 0x404300d0
2013-04-20 11:53:56.001 wine[8835:707] (
	0   CoreFoundation                      0x97f4512b __raiseError + 219
	1   libobjc.A.dylib                     0x9242552e objc_exception_throw + 230
	2   CoreFoundation                      0x97f48d9d -[NSObject(NSObject) doesNotRecognizeSelector:] + 253
	3   CoreFoundation                      0x97e91437 ___forwarding___ + 487
	4   CoreFoundation                      0x97e911e2 _CF_forwarding_prep_0 + 50
	5   AppKit                              0x911dd939 -[__NSFontTypefaceInfo _postscriptName] + 416
	6   AppKit                              0x911dd2b2 +[__NSFontTypefaceInfo typefaceInfoForPostscriptName:] + 867
	7   AppKit                              0x911dc8aa __NSGetMetaFontInstance + 619
	8   AppKit                              0x9120ad85 -[NSCell _convertToText:] + 141
	9   AppKit                              0x9120ab37 -[NSCell setStringValue:] + 120
	10  AppKit                              0x9120aa12 -[NSCell initTextCell:] + 185
	11  AppKit                              0x9120a837 -[NSTextFieldCell initTextCell:] + 58
	12  AppKit                              0x9120a7c5 -[NSFrameView titleCell] + 109
	13  AppKit                              0x9120a73d -[NSTitledFrame _customTitleCell] + 60
	14  AppKit                              0x91208a6d -[NSTitledFrame setTitle:] + 475
	15  AppKit                              0x912087da -[NSThemeFrame setTitle:] + 58
	16  AppKit                              0x9120859e -[NSWindow _dosetTitle:andDefeatWrap:] + 313
	17  AppKit                              0x9120845b -[NSWindow setTitle:] + 182
	18  winemac.drv.so                      0x47a44864 __macdrv_set_cocoa_window_title_block_invoke_1 + 52
	19  winemac.drv.so                      0x47a3ba16 PerformRequest + 86
	20  CoreFoundation                      0x97e1b66f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
	21  CoreFoundation                      0x97e1b099 __CFRunLoopDoSources0 + 233
	22  CoreFoundation                      0x97e40e46 __CFRunLoopRun + 934
	23  CoreFoundation                      0x97e4063a CFRunLoopRunSpecific + 378
	24  CoreFoundation                      0x97e404ab CFRunLoopRunInMode + 123
	25  HIToolbox                           0x9006415a RunCurrentEventLoopInMode + 242
	26  HIToolbox                           0x90063ec9 ReceiveNextEventCommon + 374
	27  HIToolbox                           0x90063d44 BlockUntilNextEventMatchingListInMode + 88
	28  AppKit                              0x9122ea3a _DPSNextEvent + 724
	29  AppKit                              0x9122e26c -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
	30  AppKit                              0x912246cc -[NSApplication run] + 855
	31  winemac.drv.so                      0x47a42cc9 run_cocoa_app + 297
	32  CoreFoundation                      0x97e1b66f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
	33  CoreFoundation                      0x97e1b099 __CFRunLoopDoSources0 + 233
	34  CoreFoundation                      0x97e40e46 __CFRunLoopRun + 934
	35  CoreFoundation                      0x97e4063a CFRunLoopRunSpecific + 378
	36  CoreFoundation                      0x97e50061 CFRunLoopRun + 129
	37  libwine.1.0.dylib                   0x400055b3 wine_init + 803
	38  wine      0x7bf00a4d main + 285
	39  wine      0x7bf00925 start + 53
	40  ???                                 0x00000003 0x0 + 3
)
This crash does NOT stop wine or the MacDriver from actually working... maybe its recovering itself... but what it DOES do is make 1 "wine" process get stuck at 100% usage, which keeps wineserver and all the other processes going forever. Manually killing that 1 stuck "wine" process then bypasses the issue.

Once that wine-502 folder exists with "lock" in the correct state, the issue stops happening and Wine works fine.

Can anyone tell me what the wine-502 is even for, or any other input on why this issue might be happening? I haven't been able to find in Wine source where this folder is being created or used.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: Possible MacDriver issue in 1.5.28

Post by doh123 »

as some added info with more testing...
I figured out how the /tmp/.wine-uid folder works and is named, so i can work around that issue easy.

Contrary to my earlier testing, this folder and the "lock" in it doesn't seem to really have an impact on MacDriver crashing.

The Wine thread that is getting stuck at 100% after the above output is running "C:\windows\system32\wineboot.exe --init" which I guess is the reason it only happens when I'm trying to create a wineprefix.
qparis
Level 2
Level 2
Posts: 44
Joined: Fri Dec 03, 2010 6:55 am

Re: Possible MacDriver issue in 1.5.28

Post by qparis »

I have exactly the same problem. Any workaroud?
Locked