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

Loading of a specific Surge configuration results in pathological system instability #7641

Open
EmeliaK opened this issue May 6, 2024 · 10 comments
Labels
Bug Report Item submitted using the Bug Report template

Comments

@EmeliaK
Copy link

EmeliaK commented May 6, 2024

Bug Description:
Attempting to load a project module containing a Surge XT (TNMG Andromeda preset) instance is liable to hang the loading process. The plugin server process responsible for this Surge instance climbs to and maintains an unusual threshold of CPU usage. If the plugin server process is not manually terminated, the system is liable to either fully hard-crash or lose video signal (busy idle?), in either case resulting in a necessary power cycle.

Surge XT Version

  • Version: 1.3.1.4b53827
  • Plugin Type: VST3
  • Bitness: 64-bit

Reproduction Steps:
Steps to reproduce the behavior:

  1. Open a module containing a Surge XT (TNMG Andromeda preset) instance as an instrument. (This may immediately reproduce.)
  2. Start playback of this module. (This may immediately reproduce.)
  3. Close this module by opening a different module or quitting.
  4. Reopen this module. (If module seems to eventually open, attempting playback may incur issue. If this does not reproduce, repeat steps 3 and 4 as necessary.)

Expected Behavior:
This module loads, and is playable, as normal.

Screenshots:
Video of the issue occurring.
(Problem module attached below. Load at 0:05 hangs, then issue repeatedly fails to reproduce, then load at 3:30 hangs. Note the process's CPU usage climbing to around 10~11% on either hang. If these processes are not terminated, the system will eventually crash - harder to record that.)

Computer Information (please complete the following!):

  • OS: Windows 10 Home
  • Host: Renoise
  • Version: 3.4.3
  • CPU: AMD Ryzen 5 2600

Additional Information:
Extremely bizarre, but very fatal issue. Can't tell if it's plain semi-random, or if there are actually consistent conditions to reproduce this every load that are just too subtle for me to catch. I only discovered (after getting hit with it again today) that a specific plugin server process seemed to be the precursor.
Unsure if it's even a Surge-side thing or if this is something bad with how Renoise cleans up(?).
This issue was also present on Surge XT 1.0.1 back on January 28th 2023, in the module where I initially encoutered this issue. I believed at first it was a corruption of the Renoise module from attempting to duplicate a Surge XT (TNMG Andromeda) instance, and reported it on the Renoise forums, but I now realise the duplication would have incurred a load of Surge XT (TNMG Andromeda) and thus been the same issue as what I'm currently reporting.
The TNMG Andromeda preset is the only one I've encountered this issue on; I don't know if it occurs on others, and I can't be confident in suggesting the preset bears any blame (I've used other TNMG presets fine), but it's one of the few consistent factors in this issue's reproduction.

Filesize-trimmed version of problem module shown in video. Issue is confirmed to still reproduce identically in this.
Nagisa ni Hisame_20240506.zip

@EmeliaK EmeliaK added the Bug Report Item submitted using the Bug Report template label May 6, 2024
@baconpaul
Copy link
Collaborator

We found a problem in Surge very recently where some windows systems, with some patches, can generate very very high CPU usages. We fixed this and plan to sweep the fix into our 1.3.2 release, this week.

I don't have your system setup available to me, but I am wondering if you would be willing to let us know whether it is reproducible in our nightly installer https://surge-synthesizer.github.io/nightly_XT

the patch in question has many of the characteristics which would tickle this particular bug. I'm curious if we resolved it with the change in question.

Thank you!

@EmeliaK
Copy link
Author

EmeliaK commented May 6, 2024

@baconpaul
Thanks for the prompt response, and your amazing work!

Testing NIGHTLY-2024-05-06-c9c696c - results initially seemed promising, but unfortunately managed to reproduce twice attempting to load the old module from last year (attached below for posterity), as well as attempting to load the current module (Nagisa ni Hisame).
To clarify, it never occurs mid-playback, always when trying to load a "fresh" instance.

In the old module's case (Renoise v3.3.x at the time), the pathological plugin server process is associated with one of either of its two TNMG Andromeda patches; I reproduced first getting the one in slot 05 acting up, then on a later attempt the one in slot 02. Doesn't seem to happen to both at once?
Midenrura, Parched Light Fields.zip

Since this is the only patch I've experienced this with, I've gone through other patches I've used before (i.e. these ones are likely not associated with whatever I'm experiencing), since you mention shared characteristics between certain patches can trip the bug you recently squashed. Maybe this list lines up?

Associated with issue:

  • TNMG: Andromeda

Not associated, seems fine:

  • Bluelight: Bass 6
  • Claes: Photon, Tacky 1
  • Cybersoda: Acid Bassline 1
  • Damon Armani: Transparent
  • Dan Maurer: Detuned Vibes, Purple
  • Inigo Kennedy: Blade 5 (slightly edited), Dirty Pad, Fragile 1
  • Jacky Ligon: Parting Skies
  • Kinsey Dulcet: Inertia Pad Sounds Like Alien Seagulls
  • Noisegeek: Bagpipes Plugged In
  • TNMG: Aero, In Motion, Suppressor

(As you can tell, I've been a big fan of Surge - thank you once again for all the team's amazing work!)

@mkruselj
Copy link
Collaborator

mkruselj commented May 6, 2024

I am curious if you make a version of the Andromeda patch with all FX removed if it reproduces. Or at least all Airwindows effects. Perhaps even go removing them one by one and see. My spidey sense is tingling that it might be Airwindows... I can't explain why, it's just a hunch.

@EmeliaK
Copy link
Author

EmeliaK commented May 6, 2024

@mkruselj
Sadly reproduced with all four of Andromeda's Airwindows effects removed, and then again with its FX chains cleared entirely.

Also reproduced twice (almost terminated too late the second time!) with a completely empty module containing nothing but the Andromeda patch, and then again with its FX chains cleared too.

If you've successfully attempted playback without incurring the issue, that seems to make it more liable to reproduce on following loads? Intuitively feels that way, but unsure. Have also had it reproduce by (as far as I can tell) leaving it alone for a while before the next load attempt.

@mkruselj
Copy link
Collaborator

mkruselj commented May 7, 2024

Let's try some other things. For example, try setting each filter to Off one by one then all of them across both scenes. Try different filter configurations for each scene. Try setting each oscillator type back to Classic. Yes, sound will change, but we're trying to nail which part of Surge is misbehaving here.

Thanks!

@EmeliaK
Copy link
Author

EmeliaK commented May 7, 2024

@mkruselj

Reproduced with the stacking changes:

  • Filters successively turned off
  • SceneA osc3 S&H Noise -> Classic (Sawtooth)
  • SceneB osc2 Audio In -> Classic (Sawtooth) (was really hoping this one might be it!)
  • SceneA osc1/osc2 Sine -> Classic (Sawtooth)
  • SceneA Waveshaper off
  • SceneA MSEG 1/3 and S-MSEG 1/3 -> LFO and S-LFO (sine)
  • Mode: Dual -> Single

But interestingly...

  • SceneA/B Play Mode Mono ST+FP -> Mono: More than a dozen loads, has not reproduced yet. With the characteristic incidence rate of this issue, I'm fairly sure I'd have reproduced at least once if this wasn't it.

Would it make sense that ST+FP could cause snags like this?
Will add a further comment as I test ST and FP modes individually to see if it can be narrowed down to either one (or if I end up disproving this hunch).

Something else I'm observing is that when it does occur, it has a good chance of reproducing again on the very next attempt, though not always. Unsure if it's tied to how soon the repeat attempt was made...
Doesn't seem likely to trigger three times in a row - only had that happen once, where on the third reproduce its CPU usage leapt from the usual "bugged" 10-11% up to 13%.

@EmeliaK
Copy link
Author

EmeliaK commented May 7, 2024

Update:

I've noticed that even if the module loads and playback works, loading the Surge instance's GUI and attempting to interact with it (I've been switching between scenes - don't know if it's exclusive to that or not, haven't been able to isolate) often characteristically hangs the process too - some or any kind of GUI interaction might be another form of "trigger" for the issue? I've managed to get multiple GUI-triggered hangs as well as a load hang.

  • Play Mode: SceneA Mono, SceneB Mono ST: Reproduces on GUI and load.
  • Play Mode: SceneA Mono ST, SceneB Mono: Reproduces on GUI and load.
  • Play Mode: SceneA Mono FP, SceneB Mono FP: Only GUI-triggered hang confirmed.
  • Play Mode: SceneA Mono, SceneB Mono: Only GUI-triggered hang confirmed.

So while plain Mono and Mono FP have constantly managed to load and even playback fine, it turns out GUI interaction can still bite afterwards. Getting more unsure of the nature of this issue now - I'll take a break and maybe try switching scenes in the GUIs of other patches.

Attaching the goat file I've been using for reference - SceneA Mono ST, SceneB Mono.
andromeda_goat.zip

@mkruselj
Copy link
Collaborator

mkruselj commented May 7, 2024

So weird. At this point this might be a weird interaction between Renoise and Surge. I'm assuming you cannot reproduce this in another DAW?

@EmeliaK
Copy link
Author

EmeliaK commented May 7, 2024

I'm getting worried that it is; VST3 support in Renoise is still fairly immature as far as I'm aware, and its plugin hosting in general can tend to just work strangely. The issue doesn't seem to be reproducing in REAPER on load/play/GUI interaction.

In any case, the Renoise module can be reloaded (if the plugin server process hangs and requires manual termination) until it actually succeeds, so I'm not blocked from working per se - just have to get Renoise to behave first (and timebomb my computer if I don't!).

@baconpaul
Copy link
Collaborator

Yeah I just found a bug and a separate maybe bug in renoise vst3 on the airwindows project but at least now I have renoise in my Mac so I suppose I can try this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template
Projects
None yet
Development

No branches or pull requests

3 participants