Juce demo crashes on load, on windows 10 latest update, juce 4.3 through to latest tip [Update: NVIDIA specific]


After the latest windows 10 update, my juce 4.3 - based application started crashing all over the place, for example with simple things such as AlertWindow::showMessageBoxAsync / AlertWindow::showMessageBox.

So I built the juce demo, and it too now crashes straight out of the box, as soon as I run it, with the same exception:

“Exception thrown: read access violation.
this was nullptr”:

JuceDemo.exe!ID2D1RenderTarget::CreateSolidColorBrush(const _D3DCOLORVALUE & color, ID2D1SolidColorBrush * * solidColorBrush) Line 3313.

This is a vs 2013 project, built in vs 2017 with the 2013 platform tools.

Any tips on how I may be able to run the 4.3 demo without it crashing?


If I read the code properly, CreateSolidColorBrush() is only called when JUCE_DIRECT2D is “true”. However, there is no way to set JUCE_DIRECT2D other than setting it manually. Could you try setting JUCE_DIRECT2D to “false” (i.e. 0) or not setting it at all?

In order to reproduce your problem, I would need to know which commit of JUCE you are using and whether you have made some changes to the JUCE code.


Thank you!

I tried the JUCE_DIRECT2D set to 0, or undef’d, and it didn’t work, but I may be doing it in the wrong place.

This is with (unmodified) JUCE 4.3 as downloaded with a zip file from the juce website, not pulled from git. So it should be the one tagged as 4.3 or 4.3.1 here: https://github.com/WeAreROLI/JUCE/releases

I didn’t remember there was a 4.3.1, so now I’m unsure which I had downloaded.

I’ll download the 4.3.1 myself and try to reproduce also with that to make sure, that way I have a commit number.

I can confirm this crash happens with a clean build of the vs 2013 project of the juce demo, from this 4.3.1 download:


commit: fc9937d

That is, I forgot to add, a 32 bit build, running on 64 bit windows 10, the latest update.

To be sure I am reproducing in the same conditions as you:

  • This is what I see in “About your PC”

  • This is what I select when I load “examples\Demo\Builds\VisualStudio2013\JuceDemo.sln” in Visual Studio 2017 (Version 15.5.2) for the first time:

  • Then I build in Debug and Release (Win32). Both “examples\Demo\Builds\VisualStudio2013\Debug\JucerDemo.exe” and “examples\Demo\Builds\VisualStudio2013\Release\JucerDemo.exe” run without any problem.

Hi, thanks for looking into this!

It appears you haven’t ran the latest windows 10 update - with the older windows, it worked for me too.

The steps you take to build and run are the same as mine.

My “About” window says:
Edition: Windows 10 Pro
Version: 1709
OS Build 16299.125

I have 1709 and 16299.125 and can build and run the Demo from the .zip you linked to here without any trouble using VS2017. There must be something else going on.

Can you build it using VS2013?


I just ran the vs 2013 solution with vs community 2013, no 2017 involved, and running the debug build crashes like this again.

I’ll try the vs 2015 solution as well to see if that makes a difference, the 2017 I seem to recall was never supported with 4.3.x

If it’s not working with VS2013 then I don’t think there’s much to be learned with trying VS2015.

Has the Windows update messed up the C++ runtimes you have installed?

Yes, you are right - same thing happens with vs 2015 project, imported without upgrade into vs 2015.

  • Good suggestion, the C++ runtimes one, I’ll try that!

Although the crash (on my own software, not the juce demo), has been observed across many (half a dozen at least) computers after this latest big win 10 update, so I’m not sure it is the runtimes. I’ll try reinstalling them however, to see if that’s it - the upgrade might be messing that up on more than one machine.

Actually, even just the latest tip of the JUCE demo (pulled just now), built with Visual Studio 2017, 64 bit build, gives me the same crash!

I edited the post title to reflect this.

So that means… I don’t know :slight_smile: Something with the runtimes I guess!?

I’ll try to update and see what happens - another clue that it is my computer configuration that is messed up. Weird, I have definitely had this crash on several PC’s, and this is a pretty fresh windows install!

Nope, downloading the VC C++ redist for 2013 and 2017, rebuilding and running for both, I still get the same crash!

I’ve come to the bottom of this!

My laptop has an NVIDIA Quadro 1000M (yes it’s old :)), alongside the integrated Intel. All other PC’s I had tested on had a similar configuration, NVIDIA & Intel both.

When right-clicking the JuceDemo.exe and selecting “Run With Graphics Processor->Integrated Graphics”, it works just fine! When I run it with the NVIDIA, I get the crash.

I’ve updated all NVIDIA software and drivers, the issue persists. In this process I’ve noticed the NVIDIA causes problems also for other software, the Visual Studio Installer’s display is blank if ran with NVIDIA, so is NVIDIA’s own “GeForce Experience”. When ran with integrated graphics they too work fine. The difference is that Juce crashes, while these just show blank instead, but well, I guess they catch an exception but do subsequently not recover well, so same difference.

In short, if anyone else runs into this, run with the integrated graphics - and if you find a fix so that you can use also the NVIDIA let me know, meanwhile I’ll keep trying!

Hey @onar3d, did you get a chance to look into this further? I’m seeing some strange issues on certain Windows 10 PCs running my software too. At first users were able to address it by changing display drivers, but now the problem is also showing up on some PCs with integrated graphics cards. Of course the 2 Windows PC I have show no problems :roll_eyes: I’ll need to find a test machine in order to dig deeper. If you’ve any further insights I’m all ears.

Hi @Rory!
No, no further news than what I wrote.
There’s this huge thread with people having the same problem with the visual studio installer, myself included.

And of course various workarounds. Maybe you’ll learn from that thread, I haven’t been keeping up with it myself.

If you figure something out do post back :slight_smile:

Thanks for the reply. I’m not even sure we’re experiencing the same issue. I just see very strange repainting problem in my apps on certain PCs and not on others. My IT department have said they can load me a PC to test on. I’ll wait till I have that before I venture further. I’ll keep you posted.