[Bug 30978] SharpEye: wine crashes on attempt to play music

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Sep 5 10:44:52 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=30978

--- Comment #9 from Andrew Eikum <aeikum at codeweavers.com> 2012-09-05 10:44:52 CDT ---
So this is a multi-threading issue.

SharpEye sends an MCI_PLAY command, which Wine's mciseq starts asynchronously
in another thread and returns. That is immediately followed by an MCI_STATUS
command, asking for the current MCI mode. Since the playing thread has not yet
begun to play the MIDI file, the mode returned is MCI_MODE_STOP, which SharpEye
interprets as an error. SharpEye starts sending shut down commands to the MCI
driver. Because Wine's mciseq is buggy, that causes a crash when the playing
thread tries to use resources that were freed during the shutdown in the other
thread.

It appears SharpEye expects the mode to be set to MCI_MODE_PLAY immediately
when its MCI_PLAY command returns, even though it begins asynchronously. We
should add some tests for this, and repair mciseq's asynchronous mode to block
main thread calls until it has actually started playing, and fix its
use-after-free while we're working in there.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list