Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin version 0.7.12 causes Nembrini Nexus host to crash (exit unexpectedly). And proposed solution inside. #541

Closed
synchu opened this issue Dec 8, 2024 · 5 comments · Fixed by #543
Labels
bug Something isn't working priority:low Low priority issues

Comments

@synchu
Copy link
Contributor

synchu commented Dec 8, 2024

Once the plugin (0.7.12) is added and you try to open it, Nexus crashes and exits unexpectedly.

To reproduce

Steps to reproduce the behavior:

  1. Open Nexus
  2. Add NAM 0.7.12
  3. Double click on the plugin box to open the plugin UI
  4. Nexus crashes and exits (even without error)

Expected behavior

Plugin GUI opens.

Screenshots

N/A

Computer & other info

(please provide the following information):

  • OS Windows 11
  • NVidia RTX 2060 Super
  • Plugin version - 0.7.12
  • VST3
  • Nexus plugin host
  • RME RayDat
  • 48Khz
  • 128
  • N/A
  • N/A

Additional context

The bug is caused potentially by Nexus handling of plugin UI refresh, caused by "endless" loop (initially caused by calling OnTextEntryCompletion, see the Call Stack dump attached - SetParamNormalized <-> performEdit loop):
NeuralAmpModelerControls.h
void SetValueFromDelegate(double normalizedValue, int valIdx) override
{
IControl::SetValueFromDelegate(normalizedValue, valIdx);
const std::string s = ConvertToString(normalizedValue);
-->>> OnTextEntryCompletion(s.c_str(), valIdx); <<<---
};

if this is changed to (which seems to make more sense):

void SetValueFromDelegate(double normalizedValue, int valIdx) override
{
IControl::SetValueFromDelegate(normalizedValue, valIdx);
const std::string s = ConvertToString(normalizedValue);
SetStr(s.c_str());
};

The problem is solved.

image

@synchu synchu added bug Something isn't working priority:low Low priority issues unread This issue is new and hasn't been seen by the maintainers yet labels Dec 8, 2024
@sdatkinson
Copy link
Owner

Thanks @synchu for the very nicely-written bug and proposed solution. I don't have Nexus but based on a very quick skim your suggestions sound reasonable.

I'm crunched for time but will come back to this if no one raises their hand to PR first. It should be able to be in 0.7.13.

@sdatkinson sdatkinson removed the unread This issue is new and hasn't been seen by the maintainers yet label Dec 9, 2024
synchu pushed a commit to synchu/NeuralAmpModelerPlugin that referenced this issue Dec 10, 2024
…n host(s) to crash and/or exit unexpectedly
@sdatkinson
Copy link
Owner

Reproduced this on macOS 15.1 using NA Nexus (not sure which version; just downloaded it now).

Will try #543 now to confirm the fix

@sdatkinson
Copy link
Owner

sdatkinson commented Dec 19, 2024

Well...it loads, but that's not right:
image

Checking v0.7.11 and...it's the same.

Ok, so that's at least the same as it used to be.

Thanks; I'll merge the PR. EDIT: note to self: need to understand what SetDirty() was doing (wrong).

@synchu
Copy link
Contributor Author

synchu commented Dec 19, 2024

@sdatkinson - the fix deals with the crash and I am pretty sure it will do for most of the host platforms (tested also with Mixcraft 10.5 on Windows 11) where this crash is reported to happen, however, redraw in Nexus is generally an issue with a number of plugins under Windows (read - the full UA Native suite for example :) and some more, they are either partially redrawn or not scaled correctly), so I would not focus too much on this particular part with Nexus specifically.

@sdatkinson
Copy link
Owner

Yeah, the implementation of OnTextEntryCompletion is to SetStr then SetDirty(true). I think that we don't want to not SetDirty, but have the argument triggerAction set to false to prevent the chain reaction.

But it should still be redrawn after the new parameter is provided.


So I'll tweak the PR and we'll be good! (Checked locally as well)

sdatkinson added a commit that referenced this issue Dec 20, 2024
* Fixing issue #541 where NeuralAmpModelerPlugin causes plugin host(s) to crash and/or exit unexpectedly

* Update NeuralAmpModelerControls.h

SetDirty(false);

---------

Co-authored-by: Nikola Nyagolov <[email protected]>
Co-authored-by: Steven Atkinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low Low priority issues
Projects
None yet
2 participants