- changed status to open
Crashes on undo in 64bit version
No description provided.
Comments (22)
-
reporter -
reporter - marked as blocker
-
reporter - changed status to resolved
fixed in v0.8.3
-
v0.9 - It still crashing if I have FX mapping (or any other plugin dialog open) and select any other dialog not related to Reaper.
-
reporter What do you mean with “any other dialog not related to Reaper”? Can you give an example?
-
reporter - changed status to open
-
for example, if I use Alt+Tab to another application (it can be any)
-
As you can see, I just hit Win+R, a few seconds later I get the close dialog
-
After having a hard time trying to compile the code (I only got Juce in 32bit, by the way), I was able to narrow this issue o Juce library.
One thing that I could fix was a crash when you’re in plugin mode, while trying to close the current project (I did a pull request for that).
About my main issue, I narrowed the issue to Juce library (commit hash: 4009680f7956c03659f355a806c3e0e923aab48f, tag:1.52) at juce_ResizableWindow.cpp::322, which I unfortunatelly I couldn’t debug that library (help?).
Trying some guessing, I gave a shot at CCSModesEditor.cpp::56 changing to:
m_pWindow->setContentComponent(*ppComponent, false, true);
(ok it was by mistake, but it was good!)
Doing that, I could Alt+PlugIn at Behringer, getting an empty and collapsed dialog, but it allows me to open/click any other dialog without Reaper crashing.
Just to complement the information above, I couldn’t compile nothing beyond the tag 1.52 for Juce (using VS2019)
-
reporter Thank you for this work and also for the pull request. I hope I will find some time next week to create an update.
-
Thank you! I’m glad to help!
Just to be complement the information. I’m running on a Win10x64 PC. The behavior is the same for both Reaper x32 and x64… -
Ok, this is as far I can go not being a C++ programmer…
As soon I leave Reaper “environment”, I get an exception at this function below.
Since “getLookAndFeel()” was null at this point, I tried to create an overwrite at PlugModeComponent returning a default value, but it didn’t make any difference…
-
Here’s the problem!
Doing that avoids the total crash, but it leaves a blank dialog (at least on my upgrade branch).
Do you have any lead for an “elegant” way to fix that?
You don’t need to detail it too much, let me deal with the implementation, I just need a direction… -
reporter When this == nullptr then we are in undefined behaviour land, I think deleteWindow must have been called from an already deleted instance (or something like this). The only place where the deleteWindow function is called via an instance pointer is from CCSModesEditorWindow::closeButtonPressed, via m_pManager->getEditor(), but the m_pEditor pointer isn’t modified before the whole extension is deconstructed, and as far as I understood you, the problem appears when you switch to another window, and not when you close Reaper (there is a problem in the CSurf_MCU desctructor, as the instances are not deleted in the reverse order to there creation, e.g. the delete m_pCCSManager call must be follow direct after delete m_pTransport).
Can you show me a callstack for the situation when this == nullptr?
I must say, this is really awkward bug, welcome to the C++ land.
-
Here is it:
Due C#, I have no problems reading the callstack, but this one was clueless for me, since at the second line I’m already inside juce library…
But since you’re saying that the destructors are called out of the order, I can investigate that!
Thanks a lot!
-
reporter Okay, so was right that deleteWindow is called from closeButtonPressed (which is inlined into handleUserClosingWindow()). And you run into this breakpoint/callstack when you switch to a different window with Alt-Tab or Win-R?
-
not anymore (after upgrading JUCE library), only when I try to close this blank dialog…
but using Juce 1.52, as soon I press Alt-Tab or Win-R, I get the same crash…
-
reporter And with the Juce 6 MCU Editor window will stay, but is blank, after you press Alt-Tab, correct?
The window is blank, when it does not contains a (main)component. Is it possible that deleteWindow() is called, but the window is still visible after removeFromDesktop was called?
-
And with the Juce 6 MCU Editor window will stay, but is blank, after you press Alt-Tab, correct?
correct!
but the window is still visible after removeFromDesktop was called?
I really don’t know…
I will be tracking that this afternoon.
-
I did it!!!
And this is the better: it can be applied to the current version (before JUCE upgrade)!
My PR already contains this fix, if you like to jump to this update.
For now, I will wait for your official release (no rush) before making any change…
(I cannot compile a debug version and the x64 version didn’t work for me)
-
reporter That’s great.
I reserved the Monday evening to work on the release.
-
reporter - changed status to resolved
fixed in v0.9.0.5
- Log in to comment