32/64 issues in Ableton 11 on Windows

Hi All,

I’m debugging a plugin which connects to a MIDI device on Windows. I found that the plugin fails to connect in Ableton Live 11 Suite. After some digging I found that there was an exception being thrown:

Exception thrown at 0x00007FFCE11A567C in Ableton Live 11 Suite.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000000014F0C0.

It seems like the exception is coming from juce::Win32MidiService::Win32InputWrapper :

 if (err != MMSYSERR_NOERROR)
                throw std::runtime_error ("Failed to create Windows input device wrapper");```

The REALLY weird part is that I’m almost certain I’m running Ableton in 64 bit because 1) It only recognizes the plugins built for x64, and 2)that’s the only version of Live 11 available for download from Ableton’s website:

But, the debug output I get from attaching the Visual Studio Debugger seems to indicate that Ableton is running a Win32 build:

My current hypothesis is that somehow the plugin thinks that Ableton is running as a Win32 application, tries to create the Win32 wrapper, and then fails because the application is actually 64bit.

Any/all help getting this to correctly recognize the x64 applicaiton is greatly greatly appreciated!!!

The Win32 thing is probably a red herring, there isn’t for example a separate Win64MidiService in Juce. Also the memory locations you are getting in the error output are 64 bit.

To me it looks like creating the MIDI input simply fails for some reason and the exception is thrown. (Which is a bit unusual for Juce, though, since it’s generally not expected the user code is going to handle exceptions…) One reason for the failure could be that the input device is already open in Live or some other application and Windows won’t allow another connection to it.

1 Like

This is totally possible. It’s just weird that the debug output from Live also says “(Win 32)” so I thought that could be related. Maybe whoever made the updates in Ableton just didn’t update their debug outputs?

That’s Windows’s/Visual Studio’s own debugging output spam, and it has that (Win32) even if the debugged process is 64 bit. (Win32 in this case likely refers to the Win32 API, not the CPU architecture.)

2 Likes

Ah cool thank you!

I should add, if it’s any help in addressing the issue, that the connection to the MIDI device works fine in Reaper, so far it’s only Ableton that is giving me problems.