I've been having this same bug (Windows 7/64 bit) but didn't get to reporting it as I haven't worked so much with Juce lately...At least the bug repro sounds very familiar. Hitting the audio test button in the Demo causes a crash.
there still is another problem left. it happens when debugging any application that uses AudioDeviceSelectorComponent (e.g. JuceDemo Audio:Settings), hitting the test button. the following happens at run time when closing the application:
JUCE v4.1.0
*** Leaked objects detected: 1 instance(s) of class AutoRemovingSourcePlayer
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JUCE v4.1.0, current git master pulled, tested @ Windows 8.1, VS2013, Debug
..although... I guess it could conceivably still leak if you were to quit the app while the test-tone is still playing. I can fix that edge-case, but if you're seeing the leak after the tone has finished playing, then you almost certainly aren't using the new version.
JUCE v4.1.0
*** Leaked objects detected: 1 instance(s) of class AutoRemovingSourcePlayer
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
*** Leaked objects detected: 1 instance(s) of class AudioSourcePlayer
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
*** Leaked objects detected: 1 instance(s) of class AudioSourceOwningTransportSource
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
*** Leaked objects detected: 1 instance(s) of class AudioTransportSource
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
*** Leaked objects detected: 1 instance(s) of class AudioSampleBufferSource
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
*** Leaked objects detected: 2 instance(s) of class AudioBuffer
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
*** Leaked objects detected: 1 instance(s) of class AsyncUpdater
JUCE Assertion failure in juce_leakedobjectdetector.h:95
JuceDemo.exe hat einen Haltepunkt ausgelöst.
Detected memory leaks!
Dumping objects ->
{46243} normal block at 0x014B8090, 112 bytes long.
Data: < K K > A0 80 4B 01 C0 80 4B 01 00 00 00 00 CD CD CD CD
{45277} normal block at 0x064E8328, 1784 bytes long.
Data: <, > 2C D5 CE 00 FF FF FF FF FF FF FF FF 00 00 00 00
{45276} normal block at 0x05DE8898, 16 bytes long.
Data: < B K > C0 42 EC 00 01 00 00 00 00 00 00 00 B8 8A 4B 01
{45275} normal block at 0x014B8AB0, 136 bytes long.
Data: < l> > C8 D4 CE 00 F8 D4 CE 00 6C 3E EC 00 98 88 DE 05
{45274} normal block at 0x014D8420, 20 bytes long.
Data: < ` K R > D0 D7 CE 00 60 9F 4B 01 01 CD CD CD 80 52 00 00
{45273} normal block at 0x0647FBB0, 192040 bytes long.
Data: < G l3 6> B8 FB 47 06 00 00 00 00 00 00 00 00 6C 33 C9 36
{45272} normal block at 0x014B9F60, 152 bytes long.
Data: < ( G > 01 00 00 00 80 BB 00 00 28 EE 02 00 B0 FB 47 06
Object dump complete.
Another weird symptome I discovered when testing this is that the test tone differs in its length and sounds "cut" (clipped / silence in a hard way). Is that a helpful clue?
Current audio device type: Windows Audio
Current audio device: "Lautsprecher (Realtek High Definition Audio)"
Sample rate: 48000 Hz
Block size: 480 samples
Output Latency: 992 samples
Input Latency: 736 samples
Bit depth: 32
Input channel names: Input channel 1, Input channel 2
Active input channels: 0, 1
Output channel names: Output channel 1, Output channel 2
Active output channels: 0, 1
It works with older juce versions, see above. Same setup (Realtek Audio Onboard, Win8.1x64, i7, using default platform toolset when building VS2013 in Debug mode).
I even played around a bit with the settings (Windows Audio, Windows Audio Exclusive, DirectSound, different sample rates, deactivated audio in different buffer sizes), always the same problem.