[Openmcl-devel] Crash when calling win32 function mciSendStringA on some Windows 8 Machines

Michael Minerva minerva at agentsheets.com
Thu Aug 1 13:28:57 PDT 2013


We have been trying to track down an issue where we experience crashes on some versions of Windows 8 when calling the Cocotron method play of NSSound. After digging around in the Cocotron source we discovered that the play function ends up calling the win32 function mciSendString. 

Next we tried to remove Cocotron from the equation to see if we would still experience the same crash so we created the following two tests:

First, we try to open and play an MP3 file by making an external-call to mcsSendStringA:

(ccl::with-cstr (cstr  "open C:\\boing.mp3 type MPEGVideo alias 0")
  (ccl::with-cstr (cstr2  "play 0 from 0")
    (external-call "mciSendStringA" :address cstr :address +null-ptr+ :int 0 :int 0 :<INT>)
    (external-call "mciSendStringA" :address cstr2 :address +null-ptr+ :int 0 :int 0 :<INT>)))

This causes a crash during the call to open the MP3 (the first external call) with no errors reported to any of our consoles or the Windows event viewer.

Next we run the same experiment with a wav file and all works well and we hear the correct sound:

(ccl::with-cstr (cstr  "open C:\\ding.wav type waveaudio alias 0")
  (ccl::with-cstr (cstr2  "play 0 from 0")
  (external-call "mciSendStringA" :address cstr :address +null-ptr+ :int 0 :int 0 :<INT>)
  (external-call "mciSendStringA" :address cstr2 :address +null-ptr+ :int 0 :int 0 :<INT>)))

Finally we wrote a little C++ program:

#include <Windows.h>
#include <iostream>

int main()
{
	mciSendString(TEXT("open C:\\boing.mp3 type MPEGVideo alias 0"), NULL, 0, 0);
	mciSendString(TEXT("play 0 from 0"), NULL, 0, 0);
	Sleep(5000);
}

This program runs fine (even with the mp3) so it seems that the issue does not lie directly with the win32 function. 

If any Windows 8 users could try out our test code with CCL and let us know if they experience the same issue that would be of great help (I have included the sound files which you need to just put at c:\).

So far we have only been able to reproduce this problem on OEM version of Windows 8 (it never seems to happen with Windows 8 Pro).

More generally does anyone have any clues about what might going on that would cause this to crash with ccl but not from C++?

Thanks a lot,

--Mike



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130801/5508a2e7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boing.mp3
Type: audio/mpeg
Size: 8358 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130801/5508a2e7/attachment.mp3>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130801/5508a2e7/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ding.wav
Type: audio/wav
Size: 1002696 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130801/5508a2e7/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130801/5508a2e7/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2559 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130801/5508a2e7/attachment-0001.bin>


More information about the Openmcl-devel mailing list