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.