Question
RuntimeError: null function or function signature mismatch in plugin
Just updated my desktop app to and am getting runtime errors pretty consistently on plugins I’ve built that were previously running fine.
Here’s the console error:
jsvm-cpp.wasm.br:0x23113 Uncaught (in promise) RuntimeError: memory access out of bounds
at jsvm-cpp.wasm.br:0x23113
at jsvm-cpp.wasm.br:0x3a412
at jsvm-cpp.wasm.br:0x26724
at jsvm-cpp.wasm.br:0x33106
at jsvm-cpp.wasm.br:0x2c352
at jsvm-cpp.wasm.br:0x2bab3
at jsvm-cpp.wasm.br:0x11f6
at jsvm-cpp.wasm.br:0x6188
at 2430-23a15bad9b36a906.min.js.br:797:87469Once I start seeing this error, the plugin refuses to open until I restart the app. After it restarts, I can open the app a few times before the error starts back up again.
The issue seems to be with loading fonts. If I remove all the font code, the plugin opens without complaint. Something has changed in the latest update that seems to be causing this issue.
const setup = async () => {
console.log('Loading the necessary fonts... ');
await figma.loadFontAsync({ family: 'Sun Life Sans', style: 'Regular' });
await figma.loadFontAsync({ family: 'Sun Life Sans', style: 'Medium' });
await figma.loadFontAsync({ family: 'Sun Life Sans', style: 'Bold' });
await figma.loadFontAsync({ family: 'Sun Life New Text', style: 'Regular' });
await figma.loadFontAsync({ family: 'Sun Life New Text', style: 'Bold' });
await figma.loadFontAsync({ family: 'Sun Life New Text', style: 'Italic' });
await figma.loadFontAsync({ family: 'Sun Life New Display', style: 'Bold' });
await figma.loadFontAsync({ family: 'Sun Life New Display', style: 'Regular' });
await figma.loadFontAsync({ family: 'Inter', style: 'Regular' });
await figma.loadFontAsync({ family: 'Agenda', style: 'Bold' });
await figma.loadFontAsync({ family: 'Agenda', style: 'Medium' });
await figma.loadFontAsync({ family: 'Agenda Light', style: 'Regular' });
};
setup().then(async () => {
// Show the UI
figma.showUI(__html__, { width: 450, height: 600 });
});
figma.ui.onmessage = async (msg) => {
if (blah blah) {
// app logic
} else {
figma.closePlugin();
}
};
