Skip to main content
Question

'memory access out of bounds' when calling exportAsync


Erwin_Goossen

I’m working on a plugin for exporting parts of pages. These export then is downloadable as a zip file. I’ve got it all working well. But when I check the console i constantly see thge next message appear:
jsvm-cpp.wasm:0x23106 Uncaught (in promise) RuntimeError: memory access out of bounds

Are more people having this error? Is it fixable?

Like I said above, it is working, but I want to get rid off the errors

This topic has been closed for comments

4 replies

Rustam5
  • 1 reply
  • July 25, 2022

I have such error to. When I am editing TextNodes texts in cycle.
Everything works, but I have this error in console and want to get rid of it.


Simon43
  • 2 replies
  • November 6, 2022

I had this error as well.

I made a test with the most simplest plugin that awaits just a timeout:

export default async () => {
  await new Promise((resolve) => setTimeout(resolve, 1000))
  figma.closePlugin()
}

Same Error:
jsvm-cpp.wasm:0x23106 Uncaught (in promise) RuntimeError: memory access out of bounds

Then i restartet Figma (had it running for quite some days without closing) and the error was gone. So maybe this Error is not a Problem with our Plugins, but with Figma running in trouble after a while. I will check if the error comes back if i don`t exit Figma.


duanhaohao

It helped me a lot. I kept thinking it was a code problem, debugging and trying all sorts of await and async methods.


Jeremy_Knudsen

Okay, I was seeing this problem too. I was able to track it down to my bad handling of Promises and promise rejection. So, for me it was a coding problem. Once I started handling promises correctly, wrapping in try-catch, etc. these errors went away!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings