Replies: 3 comments 11 replies
-
Hey, I hope I have provided enough information to this problem. Perhaps someone on the react-native-skia team could take a look for me? It could be a really obvious mistake in with my code, but may be an bug with RNSkia for all I know... thanks again in advance! |
Beta Was this translation helpful? Give feedback.
-
Thanks for providing a repository for this. Unfortunately I was not able to reproduce it on Android. I assume that you use Android right? |
Beta Was this translation helpful? Give feedback.
-
Is the issue the number of times we call makeImageSnapshot or is the issue
the number of images present in the snapshot you take?
…On Thu, Nov 9, 2023 at 3:02 PM cmkf01 ***@***.***> wrote:
The user draws a number of Paths around the area of an image to make a
snapshot, then presses a button to call makeImageSnapshot() of the
canvasRef passing the bounds of the Path as the Rect argument, this adds
the SkImage snapshot to state.
My experience is that on Android 8.0 is breaks after ~50 snapshots in this
simple example, on Android 9.0 is breaks after ~200 snapshots with the same
segmentation fault (logcat output in previous reply). It happens 100% of
the time in my attempts and happens much earlier, e.g. after the second
snapshot when I start to add features back into the app.
Thanks for your patience.
—
Reply to this email directly, view it on GitHub
<#1858 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKXVVOF7CBFZNKCDYMRLTYDTPAVAVCNFSM6AAAAAA5AE2OGOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TKMRSHA3TG>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
Hoping to resolve a breaking problem. My thoughts up front are that the canvasRef becomes stale but unclear how to resolve this.
Situation:
The app renders an SkImage, zooms and pans with a gesture handler, then takes a snapshot based on user input bounding box coordinates. It then renders the snapshots on a new screen.
This works perfectly once only. However, when the state is cleared and new bounds are created, the app crashes on trying to take a new snapshot of the canvas.
Screenshot here:
https://github.com/Shopify/react-native-skia/assets/127895219/2ef1d7da-a15f-42b3-8046-045ef54889d6
Repo here:
https://github.com/cmkf01/skia_issue_example
Looking forward to resolving this, thank-you in advance.
Beta Was this translation helpful? Give feedback.
All reactions