-
Notifications
You must be signed in to change notification settings - Fork 481
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
🐞 Fix Bad Access exception #275
Conversation
@@ -0,0 +1,75 @@ | |||
import { Canvas, useImage, Image } from "@shopify/react-native-skia"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the perfect test case :))
Nice find - I've pushed an update that fixes this - still seeing some crashes on Android that I want to figure out, |
If we have a drawing that takes 50ms, animating will result in all frames being displayed slowly. Maybe we should skip the frame instead? In the context of gestures, not dropping frames seems to be quite a big issue. If we have a looping animation that runs at 32ms and we let it run 5 seconds, starting a gesture will wait for all frames to be drawn before starting the gesture which could take many seconds. |
The drawing time in |
Added a new implementation of the OpenGL renderer for Android that looks very promising. No errors occurs when running the heavy examples, reload and hot refresh works as expected! |
…alidated objects.
This was previously checking for if the define was defined - now it tests for the define to be 1
Moved drawFrame from virtual method (which might crash) to a pointer to a drawFunction. The pointer is nulled out when the impl view is destructed.
…urce was not released.
Now checking on each render.
c52df9b
to
1d2965a
Compare
This is huge, congrats 🎉 |
Great to see this has been fixed! Can't wait for the new release. Thanks! |
This fixes BAD_ACCESS and SIG_ABORTS on iOS/Android in Skia views being accessed by the render thread after they have been deleted.
The PR Fixes adds a few guards to ensure that we're not accessing objects after destruction. A test with 100 Skia Views being constantly created/recreated has been added and can be used to verify that this bug is fixed.
Fixes #243