stoermelder / vcvrack-packone

Modules for VCV Rack
GNU General Public License v3.0
175 stars 40 forks source link

v2: Reference to custom fonts stored across frames #303

Closed cschol closed 2 years ago

cschol commented 2 years ago

I know this is a work in progress, but we have had issues with plugins crashing the VST and I wanted to point this out early.

Your plugin stores references to custom fonts across frames. This leads to crashes in the VST when reloading a project.

For example (but there might be others):

LabelDrawWidget() {
    font[0] = APP->window->loadFont(asset::system("res/fonts/ShareTechMono-Regular.ttf"));
    font[1] = APP->window->loadFont(asset::plugin(pluginInstance, "res/fonts/RedkostComic.otf"));
}

Please see the following link on how to resolve this issue and re-submit to the Library: https://vcvrack.com/manual/Migrate2#2-1-Don-t-store-Font-and-Image-references-across-multiple-frames

stoermelder commented 2 years ago

Thanks.