Access violation initialising Audio Device


Ive been off the Juce for a couple of months and decided to get back on it. Since my return im getting Access Violations thrown on application startup when AudioDeviceManager::initialise scans for devices.

I can continue past the Exceptions and the Application runs correctly, plays audio etc, so this is just a minor irritation, but I should probably try and get it fixed.

It first occurred on an older Juce version on my project, but ive updated and created a blank Audio Application and the issue still occurs.

Error occurs at:

Test.exe!juce::DSoundDeviceList::scan() Line 1030 C++

And throws a “Access violation reading location …” exception.

Im sure its a system rather than a Juce issue but I cant think of anything that would have changed my Audio device during my hiatus, does anyone have any ideas?


That line of code doesn’t really match the current codebase - maybe use the latest version and give a stack trace?


Yep im running 4.2.1 on Windows 8.1 / VS 2015. The audio is WASAPI through a Delta 1010LT as the primary device.

The below is from an unmodified Audio Application projucer template.

Exception thrown at 0x75ED687A (KernelBase.dll) in Test3.exe: 0xC0000005: Access violation reading location 0x376AE8FC.

     KernelBase.dll!75ed687a()    Unknown
     [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]    
     user32.dll!74d147f2()    Unknown
     HydraDMH.dll!1000d766()    Unknown
     HydraDMH.dll!1000471c()    Unknown
     user32.dll!74cfeec1()    Unknown
     ntdll.dll!7748c28c()    Unknown
     user32.dll!74cfeeea()    Unknown
     ntdll.dll!77490596()    Unknown
     user32.dll!74cf8e71()    Unknown
     user32.dll!74cf90d1()    Unknown
     user32.dll!74cf9115()    Unknown
     user32.dll!74d15326()    Unknown
     user32.dll!74d6f497()    Unknown
     user32.dll!74cf9529()    Unknown
     ntdll.dll!77490596()    Unknown
     user32.dll!74d029d8()    Unknown
     user32.dll!74d02b39()    Unknown
     winmmbase.dll!7033785b()    Unknown
     winmmbase.dll!70338dd6()    Unknown
     winmmbase.dll!70334b1f()    Unknown
     ntdll.dll!7748c73c()    Unknown
     ntdll.dll!774d89dd()    Unknown
     ntdll.dll!774a62ae()    Unknown
     ntdll.dll!7748c81c()    Unknown
     ntdll.dll!774667ae()    Unknown
     dsound.dll!5cfaf212()    Unknown
     71ae000c()    Unknown
     guard32.dll!748ab6f3()    Unknown
     KernelBase.dll!75ecef8a()    Unknown
     dsound.dll!5cfa6437()    Unknown
     dsound.dll!5cfa3ba6()    Unknown
     dsound.dll!5cfa750b()    Unknown
     dsound.dll!5cfa607a()    Unknown
     dsound.dll!5cfa5fe2()    Unknown
     dsound.dll!5cfa776a()    Unknown
     dsound.dll!5cfadd10()    Unknown
     dsound.dll!5cfa5d4e()    Unknown
     dsound.dll!5cfaf575()    Unknown
     dsound.dll!5cfaf904()    Unknown
>    Test3.exe!juce::DSoundDeviceList::scan() Line 1030    C++
     Test3.exe!juce::DSoundAudioIODeviceType::scanForDevices() Line 1207    C++
     Test3.exe!juce::AudioDeviceManager::scanDevicesIfNeeded() Line 415    C++
     Test3.exe!juce::AudioDeviceManager::initialise(int numInputChannelsNeeded=0x00000002, int numOutputChannelsNeeded=0x00000002, const juce::XmlElement * xml=0x00000000, bool selectDefaultDeviceOnFailure=true, const juce::String & preferredDefaultDeviceName={...}, const juce::AudioDeviceManager::AudioDeviceSetup * preferredSetupOptions=0x00000000) Line 262    C++
     Test3.exe!juce::AudioAppComponent::setAudioChannels(int numInputChannels=0x00000002, int numOutputChannels=0x00000002) Line 38    C++
     Test3.exe!MainContentComponent::MainContentComponent() Line 29    C++
     Test3.exe!createMainContentComponent() Line 96    C++
     Test3.exe!Test3Application::MainWindow::MainWindow(juce::String name={...}) Line 69    C++
     Test3.exe!Test3Application::initialise(const juce::String & commandLine={...}) Line 31    C++
     Test3.exe!juce::JUCEApplicationBase::initialiseApp() Line 261    C++
     Test3.exe!juce::JUCEApplication::initialiseApp() Line 88    C++
     Test3.exe!juce::JUCEApplicationBase::main() Line 234    C++
     Test3.exe!WinMain(HINSTANCE__ * __formal=0x00df0000, HINSTANCE__ * __formal=0x00000000, char * __formal=0x009d3ba3, int __formal=0x0000000a) Line 101    C++
     Test3.exe!invoke_main() Line 109    C++
     Test3.exe!__scrt_common_main_seh() Line 264    C++
     Test3.exe!__scrt_common_main() Line 309    C++
     Test3.exe!WinMainCRTStartup() Line 17    C++
     kernel32.dll!750c7c04()    Unknown
     ntdll.dll!774aab8f()    Unknown
     ntdll.dll!774aab5a()    Unknown


No idea where you got that from, but it’s not a stack trace for anything in your code or juce.


Problem solved; id installed KORG USB-MIDI Driver Tools for Windows for a padKontrol.

Uninstalling that and removing C:\Windows\SysWOW64\KORGUM64.DRV i no longer get the exceptions, im surprised no one else has had any issues with this driver.

As for the output in the previous post its from the VS Call Stack window when the exception is thrown, not sure what other information I can extract?


(Actually sorry, I looked again at your stack trace and realised I didn’t scroll down… doh!) Yes, definitely a driver issue, there’s not much we could do to workaround a bug like that.