Hi Everyone,

Had a friend of my come up to me today to have a look at a very strange crash that he was experiencing with a Media player he's creating.

The application was previously running fine, but this time after reopening the project after a few months it crashes when trying to play an Audio file using the Microsoft.Directx.AudioVideoPlayback dll.

What makes this crash so strange is that it only crashes when Debugging in VS2008, i've tried debugging it on VS2010 with no crashes, and the file that is created with VS2008 runs without crashes when it is run outside of the debug environment.

the line of code specifically crashing the application is

Audio player
player = new Audio("track file path");

Any help would be greatly appreciated.

-Matt

Edited 5 Years Ago by midimatt: n/a

Please give all details of the crash. Including any exception messages.

There was no information, it just said that vshost32.exe had stopped working, then the option to debug or close the program appears, tried to debug, but that fails because its already attached to a debugger.

Closing the program just takes us back to VS2008 with no errors or exceptions.

It was only when I ran the program without the debugger; in order to attach a debugger when the crash happened, that I found out that it doesnt crash when the debugger isn't attached to it.

If we run the exe, then attach the debugger to it and then attempt to play a track it works without problems, it is only when the application is run from within VS2008.

I can post the code if that would help at all, but since the code builds on both machines and the built exe runs also, i'm not sure what help that would be.

If anyone has seen this issue before or know what could be causing it, any help would be greatly appreciated.

Thanks

-Matt

The only thing I can think of then is, have you made sure your DirectX libraries are up to date and all Patches/Service packs are installed for VS2008.
I've not seen of this before. I don't use DirectX directly in VS2010, I use XNA. I would sometimes get vshost crashes if I weren't instantiating or deconstructing something properly. But it would also do it outside the debugger occasionally.

Edited 5 Years Ago by Ketsuekiame: n/a

This article has been dead for over six months. Start a new discussion instead.