Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@rive-app/webgl - Uncaught TypeError: _a.delete is not a function #333

Closed
Andy1210 opened this issue Sep 1, 2023 · 2 comments
Closed

@rive-app/webgl - Uncaught TypeError: _a.delete is not a function #333

Andy1210 opened this issue Sep 1, 2023 · 2 comments

Comments

@Andy1210
Copy link
Contributor

Andy1210 commented Sep 1, 2023

Description

the clear() function is not working on the rive instance as it seems it doesn't have the delete function when using the @rive-app/react-webgl package.

Provide a Repro

https://codesandbox.io/s/rive-react-sandbox-m8yz2i
just click on the Cleanup button and you will see the error straight away

Expected behavior

cleanup shouldn't throw error and work normally

@zplata
Copy link
Contributor

zplata commented Sep 22, 2023

Thanks for the repro and report; definitely looks off! We'll take a look here and update when this is fixed

rive-engineering pushed a commit that referenced this issue Nov 20, 2023
…s WebGL Renderer does not need to be deleted

Original issue: #333

Only the canvas renderer can have its emscripten object deleted on cleanup, but not the WebGL one. So just adding a quick check to only delete if it detects the runtime has a canvas renderer.

Diffs=
c579540d1 patch: Only clean up the Renderer object if it is a CanvasRenderer, as WebGL Renderer does not need to be deleted (#6037)

Co-authored-by: Zachary Plata <[email protected]>
@zplata
Copy link
Contributor

zplata commented Dec 4, 2023

Closing as this is resolved in 2.7.4. Feel free to re-open this if you still have issues. Thanks again for reporting!

@zplata zplata closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants