jatinchowdhury18 / ChowDSP-VCV

ChowDSP modules for VCV Rack
GNU General Public License v3.0
83 stars 8 forks source link

v2: References to custom fonts stored across frames #23

Closed cschol closed 2 years ago

cschol commented 2 years ago

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):

WarpWidget(Warp* module) {
[...]
 modeLabel->font = APP->window->loadFont(asset::plugin(pluginInstance, "res/fonts/RobotoCondensed-Bold.ttf"));
[...]

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

jatinchowdhury18 commented 2 years ago

Thanks for catching this. I could only find one call to loadFont() or loadImage() in the codebase, which is now fixed with this commit. I'm assuming the same issue does not apply to loadSVG()?

cschol commented 2 years ago

This does not affect loadSVG() (it is in memory, not GL context).

jatinchowdhury18 commented 2 years ago

Great, thanks!