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


#1

Hi!

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?

Thanks!


#2

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?


#3

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.


#4

Hi!

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.


#5

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:

https://github.com/WeAreROLI/JUCE/archive/4.3.1.zip

commit: fc9937d

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


#6

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

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

  • 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:
    image

  • 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.


#7

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


#8

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?


#9

Hi!

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


#10

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?


#11

t0m,
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.


#12

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!


#13

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


#14

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!