Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have reopened one older project that uses DirectShow for audio playback. Before, I would compile and run it on Windows 7 using MVStudio 2010 without trouble, now I have Windows 8 and MVStudio 2012 and I have an error when running it (building works).

It seems that the problem is when trying to render any mp3 file, I have created a small test code that reproduces the error:

INT WINAPI WinMain(HINSTANCE inst, HINSTANCE prev_inst, LPSTR cmd, INT show) { 
    createWindow(); // Just basic Win API window.

    IGraphBuilder *audio_graph;
    IMediaControl *audio_media_control;
    CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&audio_graph);
    audio_graph->QueryInterface(IID_IMediaControl, (void **)&audio_media_control);
    audio_graph->RenderFile(L"test.mp3", NULL);


when trying run inside MVS (even without any debug information collected), I get following error:

Unhandled exception at 0x57FC2170 (msaud32_divx.acm) in StoryTeller.exe: 0xC0000005: Access violation executing location 0x57FC2170.

and the execution brakes at the RenderFile method. The exception is apparently from some other thread since even catch with ellipsis does not affect it.

However when I run the executable, it works normally. The exception is not raised for ".wav" audio files.

Any idea what might be wrong? Google seems silent about it, so thanks for any answer :).

share|improve this question

closed as off-topic by Trevor Powell, concept3d, Josh Petrie Jan 2 '14 at 22:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Trevor Powell, concept3d, Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

Access violations are SEH exceptions, not C++ ones, so catch won't catch them unless you explicitly rerouted them in a __catch or something. In any case, this appears to be off-topic because it's really game-development specific and it's about debugging your code for you. – Josh Petrie Jan 2 '14 at 22:49