Troubles with 5.1.2 update

Hi, I have just let Projucer download the 5.1.2 update, and now I can’t recompile my project. I get this error:

1>  include_juce_audio_devices.cpp
1>d:\swdev\prj\jucelibrarycode\modules\juce_audio_devices\native\juce_win32_midi.cpp(1167): error C2440: 'initializing' : cannot convert from 'initializer-list' to 'juce::MidiInput'
1>          Constructor for class 'juce::MidiInput' is declared 'explicit'

The line generating the error is this one:

ScopedPointer<MidiInput> in (new MidiInput ({}));

Any suggestion on what is going wrong? Could it be something inside my project?

EDIT: I am using Visual Studio Express 2013. It’s still supported, isn’t it?

Before the update, the line was different:

ScopedPointer<MidiInput> in (new MidiInput (""));

Hmm, there’s nothing wrong with that code, it should work. I guess this must be a VS2013 compiler quirk. I assume it’d compile OK if you change it to

new MidiInput (String())

?

I actually had changed it to new MidiInput(""), as in the previous version, and yes, it compiles. new MidiInput(String()) compiles as well, obviously, and it’s better :slight_smile: Definately a VS2013 compiler quirk…

OK, thanks, I’ll push that as a workaround.

(I’m actually surprised we didn’t spot this, as I’m sure we have a VS2013 build in our Jenkins server…)

1 Like

Just encountered this issue yesterday for the first time. Thanks for pointing it out @splisp, and thanks for addressing it @jules.

1 Like

Greetings. I came up with the same problem as outlined above, and once when changed the ‘new MidiInput’ as recommended I could compile beyond it and got stuck at file 'juce_valuetree.cpp.

Also somehow the code was causing the VS 2013 compiler to crash and emitting this error:
1> include_juce_cryptography.cpp
1> include_juce_data_structures.cpp
1>c:\juce-huckleberry-windows\modules\juce_data_structures\values\juce_valuetree.cpp(192): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file ‘f:\dd\vctools\compiler\utc\src\p2\ehexcept.c’, line 956)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>cl : Command line error D8040: error creating or communicating with child process
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Stumped.

Apparently the causes of the compiler crash appear to be many and disconnected as shown here…

I must add that although I had made a fresh installation of win-7x64 then I installed Visual Studio 2013, then Winsdk 7.1, I found there were problems with the compiler, the kind I had experience a few years back.

I had not installed JUCE 5.1.2 by now. So I over-installed VS 2010 just to check whether the problematic problem that compiled with no problem in XP-64 with VS-2010 would work as good on Win 7. It too wouldn’t work yet when I went back to XP-64 it just worked fine.

Then I put JUCE 5.1.2 in a folder and started it thinking I would compile the samples first before I dive in but…

It appears that VS-2013 can not find from the registry ‘Winsdk’ value. Altho I tried to uninstall VS 2010, then uninstall and repair both VS 2013 and WinSDK 7 the problem still persists.

Maybe, maybe the unstable state of the compiler is the cause the problem as is to expected from MS. (Borland where are you when we need you ?)