Happy new year all. I’m receiving a confusing error when I shut down my application. I am experimenting by using the AudioDeviceManager as a singleton using the following source . . .
class AudioDeviceManagerSingleton : public AudioDeviceManager
juce_DeclareSingleton (AudioDeviceManagerSingleton, true)
#endif // ADUDIODEVICEMANAGERSINGLETON_H_254D233A[/code]
// this ensures that no dangling pointers are left when the
// singleton is deleted.
In my application shutdown code I include the following
…but when I close the application, there is a long delay and then I receive the following messages in the output window in VS2008.
The thread 'Juce DSound' (0x1470) has exited with code 0 (0x0).
closing dsound in: Primary Sound Capture Driver
The thread 'Win32 Thread' (0x390) has exited with code 0 (0x0).
closing dsound out: Primary Sound Driver
The thread 'Win32 Thread' (0x167c) has exited with code 0 (0x0).
The thread 'Juce IPC server' (0xf7c) has exited with code 0 (0x0).
First-chance exception at 0x7c919af2 in blah.exe: 0xC0000005: Access violation writing location 0xfeeefefe.
Unhandled exception at 0x7c919af2 in blah.exe: 0xC0000005: Access violation writing location 0xfeeefefe.
The debugger brings up the following code in the editor in the file juce_win32_Threads.cpp. . .
void CriticalSection::enter() const noexcept
EnterCriticalSection ((CRITICAL_SECTION*) internal);
I use one other unrelated singleton in my app and that cleans up after itself nicely. Can anyone shed any light on why I am receiving this error?