Module preview snapshots in library - how to test?

I’ve just released a new module in my plugin and was surprised that the preview image in the library has some “garbage” text where labels generated by nvgText() should be. While I can’t go back in time to be sure, I believe there’s a similar problem with an older module in the library (some widgets that displayed numbers via nvgText() are no longer displaying numbers corresponding to module params, but some text suggesting uninitialized variables). I’m guessing that my widget isn’t fully initialized when the preview is made.

Has something changed in the way VCV generates these previews? Is there a way I can “pre test” that my module paints the preview text properly before I try to submit a fix to the library?

What does it look like in the module view inside VCV Rack? Does that have the same issues?

1 Like

Newly instantiated module in rack:

Screen Shot 2023-02-19 at 9.47.20 AM

preview image in the library (and module browser):

You can start Rack from the command line with the proper flags and Rack will produce a screenshot capture of all of your modules and put them in the /screenshots folder. I have noticed on my Meander module that the button light states are not glowing in the screen-capture, making me think as you said that the image is captured before the module is fully initialized (but I do not know exactly how). All of my text is produced proceedurally via NVG but all seems correctly placed in the screen capture.

See VCV Manual - Installing & Running for command line options.

1 Like

In my experience with Meander’s procedural panels, I had to do quite a bit of module code customization to get the preview to work in the Rack browser, all having to do with the fact there is no module instance in the browser.

1 Like

In the module browser, ModuleWidget->module is NULL, so you can check for that and make your widgets to display the desired preview or placeholder state.


Yep - that’s probably the root of the problem. (and given what I’m doing in the code, I’m a bit surprised I just have garbage in the image - would have predicted a crash!). Time to get that fixed…!

1 Like

Was an easy fix, but I’m having a hard time confirming the test before I resubmit to the library. The manual says:

  • -t / --screenshot <zoom percentage>: Captures screenshots of all installed modules and saves each to <Rack user folder>/screenshots/<plugin slug>/<module slug>.png.

But when I invoke Rack with -t, it seems to just launch “normally” and there’s no side effect of any png’s (in fact, no screenshots subdirectory at all).


I remember playing around with this before I got it to work, but I cannot remember exactly what I did.

1 Like

I think I had to include the “/” and zoom percentage .

1 Like

Yep - that worked. ./Rack --screenshot 1.0" for the win.