http://bugs.winehq.org/show_bug.cgi?id=14052
Summary: CoreAudio driver broken Product: Wine Version: CVS/GIT Platform: PC OS/Version: Mac OS X 10.5 Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: kyle.husmann@gmail.com
Created an attachment (id=14264) --> (http://bugs.winehq.org/attachment.cgi?id=14264) Entire console output while running winecfg
I cannot seem to get the CoreAudio driver to work. Sound is nonexistant, and it crashes winecfg:
When trying to run winecfg, I click on the "audio" tab, and the winecfg window goes blank and the application stops responding. In the console, when I click the tab, I get the error:
err:midi:CoreAudio_MIDIInit can't create wineMIDIClient
Prior to clicking on the audio tab and crashing, I get the "err:midi:CoreAudio..." and a back trace. The entire output is attached.
Here's the sequence of events in summary:
I launch winecfg, and get the "err:midi:CoreAudio...", and a backtrace.
Then, I click the audio tab, and I get another "err:midi:CoreAudio...", and the program without updating the window.
In previous versions of wine (last I tried was 0.9.33), this did not happen, and sound output worked.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #1 from Austin English austinenglish@gmail.com 2008-12-23 07:17:05 --- Is this still an issue in current (1.1.11 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #2 from Kyle Husmann kyle.husmann@gmail.com 2008-12-23 15:12:33 --- I just tried 1.1.11, which I installed through macports, and although winecfg no longer crashes when I click the audio tab, the coreaudio audio driver is non-existent. Am I supposed to do something special in the compile process to make sure I build the coreaudio driver?
Also, I'm thinking now that this is an unrelated to the sound problem, but launching winecfg (or any other program for that matter), still gives me the page fault error that I originally attached with this bug report.
The 0.9.33 version that I spoke of that had working audio I downloaded from darwine (while it was still active). Perhaps they had some patches that made it work properly?
http://bugs.winehq.org/show_bug.cgi?id=14052
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=14052
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
--- Comment #3 from Austin English austinenglish@gmail.com 2009-01-20 02:39:17 --- Removing deprecated CVS/GIT version tag. Please retest in current git. If the bug is still present in today's wine, but was not present in some earlier version of wine, please update version field to earliest known version of wine that had the bug. Thanks!
http://bugs.winehq.org/show_bug.cgi?id=14052
Gaofeng Huang gaofeng.huang@balliol.ox.ac.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gaofeng.huang@balliol.ox.ac. | |uk
--- Comment #4 from Gaofeng Huang gaofeng.huang@balliol.ox.ac.uk 2009-03-28 21:29:47 --- confirm that in version 1.1.17, the "core audio" driver is still missing under the winecfg's "sound drivers" tab.
http://bugs.winehq.org/show_bug.cgi?id=14052
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.0.0
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #5 from Gaofeng Huang gaofeng.huang@balliol.ox.ac.uk 2009-04-04 05:26:57 --- Here, the last working version here is 0.9.57, although the message "err:midi:CoreAudio_MIDIInit can't create wineMIDIClient" is also there, but the audio is working.
Checking the diff shows that: --- wine/dlls/winecoreaudio.drv/coreaudio.c 2008/03/12 11:45:57 1.4 +++ wine/dlls/winecoreaudio.drv/coreaudio.c 2008/03/12 11:45:58 1.5 @@ -42,9 +42,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(coreaudio); static LRESULT CoreAudio_drvLoad(void) { TRACE("()\n"); - CoreAudio_WaveInit(); - CoreAudio_MIDIInit(); - CoreAudio_MixerInit(); + + if (CoreAudio_WaveInit() != DRV_SUCCESS || + CoreAudio_MIDIInit() != DRV_SUCCESS || + CoreAudio_MixerInit() != DRV_SUCCESS) + return DRV_FAILURE; + return DRV_SUCCESS; }
So my suggestion of temp solution is to revert back the coreaudio.c, because the MIDI part is going to fail, but the rest is working.
NOTES: another interesting finding is that using WineHelper.app actually make everything work. But I don't know what is the diff between commandline wine and WineHelper.app that makes the MIDI part working.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #6 from Kyle Husmann kyle.husmann@gmail.com 2009-04-12 01:58:19 --- I just tried Gaofeng's temporary solution, and it works for me (I'm running v1.1.19 now). As expected, I still get the err:midi, but at least I can select the coreaudio driver in winecfg and get sound in my apps. Thanks, Gaofeng!
http://bugs.winehq.org/show_bug.cgi?id=14052
wine-2009@ryandesign.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-2009@ryandesign.com
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #7 from Austin English austinenglish@gmail.com 2009-04-16 00:17:55 --- There's been a few fixes committed recently: http://source.winehq.org/git/wine.git/?a=commitdiff;h=dff10db04435c651473615... http://source.winehq.org/git/wine.git/?a=commitdiff;h=5c4ed3bcce380b8ff83465... http://source.winehq.org/git/wine.git/?a=commitdiff;h=06d705e7dfc3febfbf3592... http://source.winehq.org/git/wine.git/?a=commitdiff;h=1f8d743c764db13e82a162... http://source.winehq.org/git/wine.git/?a=commitdiff;h=ff0ff663c33da632ff6327...
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #8 from Gaofeng Huang gaofeng.huang@balliol.ox.ac.uk 2009-04-27 18:48:14 --- the same issue still remains in 1.1.20
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #9 from justinlk@comcast.net 2009-08-01 15:40:39 --- Created an attachment (id=22763) --> (http://bugs.winehq.org/attachment.cgi?id=22763) log output when I select the "Audio" tab in winecfg 1.1.21
-open winecfg on a clean build. -select the "Audio" tab. -read the popup: "Found driver in registry that is not available!\nRemove "none" from registry?" -select either "Yes" or "No." -winecfg crashes. Attached is the log output.
Reading this thread, it looks like there's a workaround I should be able to use, but I don't understand how. Any tips?
Much thanks! justin
http://bugs.winehq.org/show_bug.cgi?id=14052
justinlk@comcast.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #10 from justinlk@comcast.net 2009-08-01 15:41:43 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #11 from Vitaliy Margolen vitaliy@kievinfo.com 2009-08-01 16:46:22 --- (In reply to comment #9) What is that stuff you attached? It's not plain text. Where are the debug symbols?
http://bugs.winehq.org/show_bug.cgi?id=14052
justinlk@comcast.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22763|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #12 from justinlk@comcast.net 2009-08-01 18:50:39 --- Created an attachment (id=22771) --> (http://bugs.winehq.org/attachment.cgi?id=22771) corrected error log
Corrected attachment -- last time was rtf.
http://bugs.winehq.org/show_bug.cgi?id=14052
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hoehle@users.sourceforge.ne | |t, ken@codeweavers.com
--- Comment #13 from Jörg Höhle hoehle@users.sourceforge.net 2009-09-16 11:04:39 --- Was Ken Thomases, the author of the offending commit, informed of this regression (he's not in the CC list today)?
I see 2 issues here: a) MIDI fails to initialize for some people (?) - The original poster must find out if MIDI is missing entirely on the machine or if the failure is due to Wine.
Alas, I cannot reproduce this. MIDI works fine on my "early 2009" Mac Mini.
b) If a) is not Wine's fault, acknowledge the fact that MIDI may not be available. b1) Partially revert Ken Thomases' patch, e.g. ret = CoreAudio_WaveInit() /* must have */ if (ret=SUCCESS) { MIDI_Init; WaveInit; } return ret; BTW, I don't know why the patch was written that way. ALSA and OSS simply initialize the 2-4 components and return SUCCESS. Why different behaviours among audio drivers?
b2) Rework winecfg so that it does not crash if part of audio is not present. Comment #9 shows that winecfg still behaves badly in wine-1.1.21. On Linux, presence of MIDI in winecfg depends on Timidity or similar being installed, so the view is already dynamic and can accommodate missing MIDI.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #14 from Jörg Höhle hoehle@users.sourceforge.net 2009-09-29 08:24:42 --- I tried to reproduce people's findings by changing CoreAudio_drvLoad() to simulate failure, using wine-1.1.30.
- No crash when going to the audio tab.
- When having CoreAudio_drvLoad return DRV_FAILURE without calling *Init, winecfg proposes to remove the non-existing driver "coreaudio" from the registry (assuming you re-use an existing .wine). But the registry is left unchanged -- unless some other setting is changed, e.g. switching from HW to emulation mode. Then only "Audio"="" The driver was never named "none", unlike comment #9. Starting with a fresh .wine just shows no audio lines in the list, so there's nothing to remove.
- No crash either when having CoreAudio_drvLoad only call WaveInit without MIDIInit nor MixerInit (to simulate MIDI failure). The tree view is incomplete then in the audio tab, but that's all (a dashed line ends below the mixer line).
winecfg never crashed on me. Depending on the initialisation in drvLoad, the "test sound" button either worked or said there's not sound.
So I'm sorry, I cannot reproduce the reported behaviour on my OSX 10.5.7 "early 2009" mac mini.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #15 from Jörg Höhle hoehle@users.sourceforge.net 2009-12-08 11:58:59 --- Created an attachment (id=25128) --> (http://bugs.winehq.org/attachment.cgi?id=25128) MacOS backtrace MIDI crashing upon initialization
Using a peculiar setup, I could reproduce a crash similar to those reported in comment #0 and esp. comment #9. My backtrace has debug information, so one sees the following in it:
*** CFMessagePort: bootstrap_register(): failed 1103 (0x44f) 'Service name already exists', port = 0x540b, name = 'Apple MIDI Client' 12 0x429c8305 MIDIGetNumberOfDestinations+0x27() in coremidi (0x0032ca08) 13 0x427a0f77 _CoreAudio_MIDIInit+0x27() in winecoreaudio (0x0032ca88)
My setup is peculiar and probably differing from that of the previous posters in that I carried a Linux .wine over to the Mac with Wine-1.1.34. Selecting the audio tab produces a requester proposing to remove "alsa" from the registry. Follows the crash.
Don't get confused. The bug is not that I expect a Linux .wine to work (I was testing something else). This pure artefact allowed me to reproduce a crash presumably similar to the OP's, whereas I previously failed to reproduce those crashes with Mac-only means. Now perhaps others can reproduce it as well and this helps identify the exact bug.
http://bugs.winehq.org/show_bug.cgi?id=14052
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #25128|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #16 from Jörg Höhle hoehle@users.sourceforge.net 2010-04-06 13:55:24 --- Uhoh, starting with wine-1.1.42, this has become a major bug on MacOS, as now clicking on winecfg's audio tab using either a fresh $HOME/.wine or one updated from 1.1.41 causes a systematic crash. The backtrace looks exactly like the one I posted previously; the error message is the same.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #17 from Jörg Höhle hoehle@users.sourceforge.net 2010-06-11 14:53:30 --- As of wine-1.2rc3, with a fresh .wine, there's no more crash going to winecfg's audio tab. The +/- tree now shows the CoreAudio driver. The console log still is: 2010-06-11 20:50:35.746 wine[72760:613] *** CFMessagePort: bootstrap_register(): failed 1103 (0x44f) 'Service name already exists', port = 0x7607, name = 'Apple MIDI Client' See /usr/include/servers/bootstrap_defs.h for the error codes. err:midi:CoreAudio_MIDIInit can't create wineMIDIClient
The test sound button reports "Audio test failed!", which a priori is a distinct issue. The button is not needed: my mcishell does not manage to produce any sound anymore either. No more sound!
But why? I don't see any change in dlls/winmm or dlls/winecoreaudio. Using WINEDEBUG=warn+heap changes nothing.
Another new and distinct issue is that the checkbox to the left of the driver name in the treeview displays garbage pixels.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #18 from Jörg Höhle hoehle@users.sourceforge.net 2010-06-11 15:18:23 --- Please forget the part of my previous comment about mising sound. The garbage pixels in place of the checkbox did not let me see that it was unselected.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #19 from Jörg Höhle hoehle@users.sourceforge.net 2010-06-12 11:29:16 --- Created an attachment (id=28773) --> (http://bugs.winehq.org/attachment.cgi?id=28773) +tid,winmm,wave,coreaudio,midi log
The attached log, obtained by clicking the audio tab, shows that CoreAudio_MIDIInit is called twice.
Also, there's something wrong in winecfg: if I edit user.reg to set a non-existing audio driver "foo", then run Wine, winecfg detects this and proposes to remove that driver. Click ok. The tree list in the audio tab is cut down to a single line, but clicking the "test sound" button with WINEDEBUG set as above shows that Wine nevertheless tries to access the non-existing driver "foo". It's only after restarting wine+winecfg anew that the situation normalises.
http://bugs.winehq.org/show_bug.cgi?id=14052
James McKenzie jjmckenzie51@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jjmckenzie51@earthlink.net
--- Comment #20 from James McKenzie jjmckenzie51@earthlink.net 2010-06-14 22:18:16 --- Based upon the comments, started wine winecfg and clicked on the audio tab. winecfg did not crash, but upon exiting the program a crash did occur. All coreaudio devices appeared as well. The crash was NOT in the audio section. This is with Snow Leopard 10.6.3.
http://bugs.winehq.org/show_bug.cgi?id=14052
--- Comment #21 from Jörg Höhle hoehle@users.sourceforge.net 2010-07-09 15:50:01 --- I believe that the recent 1.2-rcX changes to winmm initialisation may have cured the crash.
However, everything is not perfect yet. Change user.reg to point to a non-existing device, then start winecfg, acknowledge the "remove device" requester and click "test sound". With WINEDEBUG=+winmm,+wave,+midi, you'll notice Wine still attempts to access the non-existing device and "test sound" fails. Exit winecfg and restart it to obtain sensible behaviour.
ALSA and OSS don't behave strangely like that. I notice they initialise their sound system much later, whereas coreaudio does it in CoreAudio_drvLoad, i.e. upon receipt of the DRV_LOAD message. This message is ignored by ALSA and OSS. Why is the initialisation different?
BTW, winecfg never causes CoreAudio_*Release to be called. It is called when I exit e.g. the MCI shell. I don't know what causes this difference and why Wine does not always release the drivers.
http://bugs.winehq.org/show_bug.cgi?id=14052
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Mac OS X 10.5 |Mac OS X
http://bugs.winehq.org/show_bug.cgi?id=14052
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #22 from Jörg Höhle hoehle@users.sourceforge.net 2011-12-30 10:16:31 CST --- ALSA, OSS and CoreAudio initialize similarly since the winmm and mmdevapi changes past wine-1.3.24. winecfg changed. The format of user.reg changed. I think it's fair to mark this as fixed and open new bugs for remaining/new issues.
http://bugs.winehq.org/show_bug.cgi?id=14052
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #23 from Alexandre Julliard julliard@winehq.org 2011-12-30 12:57:00 CST --- Closing bugs fixed in 1.3.36.