0
0

I get the following error in the debugger:[code:o8imtwh5]
First-chance exception at 0x100500e5 in App.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x100500e5 in App.exe: 0xC0000005: Access violation reading location 0x00000000.[/code:o8imtwh5]

I use FMOD to load raw PCM data into memory and play that data using a format I explicitly tell it to use. The same sound is played over and over again, and 90% of the time it plays just fine. The other 10%, however, causes problems. There’s two things that happen at any given time, completely random. There is no reproducable case:

1) System::playSound() fails and returns error code 33, which means Invalid Handle.
2) System::playSound() crashes the application with an access violation to a NULL pointer, as shown above.

I call System::update() in a different thread that continuously loops. Do I have to use safe multithreading with System::playSound() and System::update()? I currently do not do this. Just wondering if this is the source of the problem.

Thanks.

  • You must to post comments
0
0

Adding critical sections fixed the problem.

  • You must to post comments
0
0

If you’re adding critical sections, you’re basically blocking the main thread, so there’s not really a point to putting update in a thread by itself. It is not recommended. There is a section about threads in the docs.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.