NYSTHI v2.4.23

thank you

When I load the patch from autosave using the standalone it works fine and this what the log then says:

[0.259 info adapters/standalone.cpp:194 main] Initializing context
[0.260 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/Rail.svg
[0.313 info src/window/Window.cpp:307 Window] Window content scale: 1.250000
[0.523 info src/window/Window.cpp:361 Window] Renderer: Intel Intel(R) UHD Graphics
[0.523 info src/window/Window.cpp:362 Window] OpenGL: 4.6.0 - Build 27.20.100.8280
[0.563 info src/window/Window.cpp:43 loadFile] Loaded font C:/Program Files/VCV/Rack2Pro/res/fonts/DejaVuSans.ttf
[0.620 info src/network.cpp:147 requestJson] Requesting JSON GET https://api.vcvrack.com/user
[0.998 info src/network.cpp:147 requestJson] Requesting JSON GET https://api.vcvrack.com/library/manifests?version=2
[1.721 info src/network.cpp:147 requestJson] Requesting JSON GET https://api.vcvrack.com/modules
[9.033 info src/patch.cpp:350 hasAutosave] Loading autosave C:/Users/renev/OneDrive/Documenten/Rack2/autosave/patch.json
[9.034 info src/patch.cpp:361 loadAutosave] Loading autosave C:/Users/renev/OneDrive/Documenten/Rack2/autosave/patch.json
[9.056 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/Fundamental/res/Scope.svg
[9.056 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/ScrewSilver.svg
[9.056 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/VCVButton_0.svg
[9.056 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/VCVButton_1.svg
[9.057 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/RoundBlackKnob.svg
[9.057 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/RoundBlackKnob_bg.svg
[9.057 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/PJ301M.svg
[9.057 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/Core/Audio2.svg
[9.057 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/RoundLargeBlackKnob.svg
[9.058 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/RoundLargeBlackKnob_bg.svg
[9.058 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/Kick.svg
[9.059 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/DrumButton.svg
[9.059 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/DrumButton_1.svg
[9.059 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/Trimpot.svg
[9.059 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/Trimpot_bg.svg
[9.061 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/Snare.svg
[9.062 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/ClosedHat.svg
[9.063 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/OpenHat.svg
[9.064 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/VCV-Drums/res/Rim.svg
[9.065 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/mix8.svg
[9.065 info src/window/Window.cpp:43 loadFile] Loaded font C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/fonts/LEDCalculator.ttf
[9.065 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/pyer/colored_pj301m_styled/PJ301M_18_IN.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/pyer/colored_pj301m_styled/PJ301M_15_OU.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/pyer/colored_pj301m_styled/PJ301M_18_INCV.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/jojo/jojoWhiteKnob15fg.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/jojo/jojoWhiteKnob15bg.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/nyTapperUp16.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/nyTapperDown16.svg
[9.066 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/leds/led10.svg
[9.067 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/pyer/colored_pj301m_styled/PJ301M_15_INPULSE.svg
[9.068 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/pyer/colored_pj301m_styled/PJ301M_18_OU.svg
[9.069 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/nyTapperUp12.svg
[9.069 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/nyTapperDown12.svg
[9.069 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/ctrls/leds/led6.svg
[9.069 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/Core/MIDI_Gate.svg
[9.070 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/Plug.svg
[9.070 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/PlugPort.svg
[9.070 info adapters/standalone.cpp:237 main] Running window
[9.092 info src/window/Window.cpp:43 loadFile] Loaded font C:/Program Files/VCV/Rack2Pro/res/fonts/ShareTechMono-Regular.ttf
[9.092 info src/window/Window.cpp:43 loadFile] Loaded font C:/Program Files/VCV/Rack2Pro/res/fonts/Nunito-Bold.ttf
[15.002 info src/patch.cpp:221 saveAutosave] Saving autosave C:/Users/renev/OneDrive/Documenten/Rack2/autosave/patch.json
[15.005 info src/settings.cpp:437 save] Saving settings C:/Users/renev/OneDrive/Documenten/Rack2/settings.json
[30.002 info src/patch.cpp:221 saveAutosave] Saving autosave C:/Users/renev/OneDrive/Documenten/Rack2/autosave/patch.json
[30.005 info src/settings.cpp:437 save] Saving settings C:/Users/renev/OneDrive/Documenten/Rack2/settings.json
[36.487 info adapters/standalone.cpp:239 main] Stopped window
[36.487 info adapters/standalone.cpp:250 main] Destroying context
[36.505 info src/patch.cpp:221 saveAutosave] Saving autosave C:/Users/renev/OneDrive/Documenten/Rack2/autosave/patch.json
[36.536 info src/settings.cpp:437 save] Saving settings C:/Users/renev/OneDrive/Documenten/Rack2/settings.json
[36.537 info adapters/standalone.cpp:258 main] Destroying environment
[36.547 info adapters/standalone.cpp:270 main] Destroying logger

The c00000005 exception hints at a buffer overrun. I am a software developer but not on my home systems :wink:

Might help contacting @Richie for this one

@Richie is there a different behaviour between plugin open in VST and open in a full RACK app ?

I have a report (statistical report) that my modules not using CUSTOM displays are working
and modules with custom displays are crashing

generally modules with custom displays they have a reference to the original “module” and of course they use it only if the “module” exists

is this different in a VST ?

@Vortico can you help Antonio get this done by any chance?

One difference between loading Rack plugins in the VST and standalone is that the DAW might load and immediately unload the VST, which will in turn load and immediately unload the Rack plugins. Anything that relies on having time to do stuff, or relies on starting a thread that has chance to do some work, or relies on the painting code being run, might find it’s expectations aren’t met in the VST environment.

About debugging a plugin under the VST - you should be able to do that, no problem. Either configure your debugger to start the DAW, or attach to the DAW after startup (which won’t work if the crash is on startup, but worst case you could always put a sleep() in). You might find that the DAW uses a separate program to scan VSTs, so it’s that that you’ll need to debug.

I find Reaper to be the most sensibly-behaved DAW for this sort of thing.

don’t understand how a load and discharge can create a problem

the only way to create a problem is by calling 2 times the Widget creation passing a wrong “module” (the dead one from first load) in the second call

just guessing

I can reproduce your crash, and it’s failing in Window::loadFont() during the call to createModuleWidget(). The stack trace looks like this:

> 	libRack.dll!rack::window::Window::loadFont(this, filename)
 	plugin.dll!00007ffac5ba4ab6()
 	plugin.dll!00007ffac5e0b51d()
	libRack.dll!rack::app::RackWidget::fromJson(this, rootJ)

where RackWidget::fromJson is calling your plugin’s createModuleWidget().

I can’t be sure what the cause of the crash is, but the migration guide does advise against “load and store a Font or Image in a widget’s constructor”. I don’t think you should expect a crash, but it does seem like you’re going against the grain…

2 Likes

You need to load fonts inside the draw call. This was mentioned in the V2 migration guide and I experienced the exact same issue with my modules

it’s everywhere a load font never utilized, relic

example:

   std::shared_ptr<Font> font;
    bignumber_full_display() {
        font = APP->window->loadFont(ny_initer::resource_full_path("fonts/LEDCalculator.ttf"));
    };

and I don’t understand how can crash

but when I use the font, for example in the draw I have a:

        font = APP->window->loadFont(ny_initer::resource_full_path("fonts/LEDCalculator.ttf"));
        if(font)
        {
            nvgFontFaceId(vg, font->handle);
bla bla bla

as specified in the porting to v2 doc

1 Like

I’m not sure about this but when I made these changes to my module, I put the

std::shared_ptr<Font> font;

inside the draw() function also rather than at the widget level.

Can people having crashes with NYSTHI check if an update to VCV Rack 2.0.1 solves some of these issues?

It made no difference when testing NYSTHI 2.0.9, I tried Rack 2.0.0 and 2.0.1

Cool, thanks.

It did not make a difference. Same behavior, same point of crash (from the log.txt)

No worries, was just checking it wasn’t sorted.

If I do a LOAD and I don’t use it, if there is a crash is all HOST fault

I have everywhere the loads BEFORE the use of the FONT in the various DRAW

anyway just for my mental sanity I removed the (useless) load in constructors

please check version

@GretchenV @scook Release v2.0.10 2nd massage to fonts · nysthi/nysthi · GitHub

11 Likes

Looks like that solved it, can load the cakewalk project now with the mix8 and it just works :slight_smile:

[0.242 info src/engine/Module.cpp:173 fromJson] Patch created with NYSTHI v2.0.6, currently using v2.0.10.
[0.250 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/mix8.svg

and the font is loaded much later after the window is created and the opengl renderer.

[1.608 info src/window/Window.cpp:43 loadFile] Loaded font C:/Users/renev/OneDrive/Documenten/Rack2/plugins/NYSTHI/res/fonts/LEDCalculator.ttf


Thanks a milltion! What would I do without NYSTHI modules.

4 Likes

grazie mille for your support! <3

2 Likes

Yay!!! NYSTHI for the win!

1 Like