almostEric / FrozenWasteland

Plugins for VCV Rack
Other
91 stars 18 forks source link

v2: References to custom fonts stored across frames #102

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

ProbablyNoteIndianDisplay() {
     font = APP->window->loadFont(asset::plugin(pluginInstance, "res/fonts/DejaVuSansMono.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

almostEric commented 2 years ago

Hi Chris, no they don't. All my plug-ins that have slugs have had this issue fixed. You are looking at plugin that is not released.

cschol commented 2 years ago

Got it. Apologies, we have numerous plugins with font issues and I have been scanning the code for instances like this.

Actually, I posted the wrong code reference:

ManicCompressionMBCompressionCurve() {
    font = APP->window->loadFont(asset::plugin(pluginInstance, "res/fonts/SUBWT___.ttf"))
}

This crashes the VST in Reaper (Linux).

cschol commented 2 years ago

Please reopen and fix.

almostEric commented 2 years ago

ah, one module had two places that loaded fonts and I only fixed one.

Anyway, fixed now and pushed. I updated the other github comment chain