BR: Opening a PopupMenu throws an exception

Hey there,
I recently noticed that opening a PopupMenu throws an exception on Windows.

Exception thrown at 0x00007FF91A26804A in reaper.exe: Microsoft C++ exception: _com_error at memory location 0x000000000014D830.

This shows up multiple times when the PopupMenu window becomes visible. The debugger stops in juce_windowing_Windows.cpp in line 5405.

It doesn’t seem to affect functionality in the DAWs I checked though, except for Studio One where I would get a hang/crash only when a debugger is being connected. Without the debugger, there seem to be no apparent effects either.

I used the ComboBox in the “DSPModulePluginDemo” example for reproduction. I couldn’t reproduce the issue in the DemoRunner, however.

Probably not something that needs immediate attention but maybe something you still would want to take a look at at some point.

Hey,

I wasn’t able to reproduce this. I’m using the DSPModulePluginDemo in Reaper while attached to a debugger (Visual Studio 2022). I get some normal Direct2D related messages in the output window but no exceptions that cause crashes.

What version of JUCE are you running and are you using the develop branch?

Just to follow up, I was able to repro this by explicitly enabling exception breakpoints in the debugger. The exception is being thrown in system code, and seems to be caught before it propagates back out to user code, so I don’t think this is a cause for concern. If it’s causing problems when debugging, perhaps you can try disabling exception breakpoints for exceptions of type _com_error.

1 Like

Thanks for investigating! We are just gonna ignore those then.