Skip to content

Different Issues (Android and iOS) with useSkiaFrameProcessor #2964

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

Open
1 task
maxximee opened this issue Feb 17, 2025 · 8 comments
Open
1 task

Different Issues (Android and iOS) with useSkiaFrameProcessor #2964

maxximee opened this issue Feb 17, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@maxximee
Copy link

Description

Android
Samsung S8 with android 9:
Exception:
ERROR Frame Processor Error: Exception in HostFunction: Failed to convert NativeBuffer to SkImage!, js engine: VisionCamera

Some other devices, for example Pixel 9 with android 15:
Black Screen:
Image

iOS
Memory Leak, memory increase until app crashes:
https://youtube.com/shorts/kShery3nVW0

React Native Skia Version

1.11.7

React Native Version

0.76.7

Using New Architecture

  • Enabled

Steps to Reproduce

Start sample app linked below, just add useSkiaFrameProcessor to vision-camera.
Relevant dependencies:
"react-native-vision-camera": "4.6.3"
"react-native-worklets-core": "1.5.0"

Snack, Code Example, Screenshot, or Link to Repository

https://github.com/maxximee/skiaIssues

    const frameProcessor = useSkiaFrameProcessor((frame) => {
        'worklet';
        frame.render();
    }, []);
    return (
        <Camera
            style={StyleSheet.absoluteFill}
            device={device}
            isActive={true}
            frameProcessor={frameProcessor}
        />
    );
@maxximee maxximee added the bug Something isn't working label Feb 17, 2025
@maxximee maxximee changed the title DIfferent Issues (Android and iOS) with useSkiaFrameProcessor Different Issues (Android and iOS) with useSkiaFrameProcessor Feb 17, 2025
@maxximee
Copy link
Author

maxximee commented Feb 17, 2025

Note 1 : the sample repo only shows the crash and black screen on Android, it doesn't include the iOS yet.
I'll add the ios build later, but I can reproduce the memory leak with my productive app.
The iOS bug appeared in skia "1.11.x", it's working fine with "1.10.2",

Note 2 : Same result on android and ios with "newArchEnabled"

@AilsonFreire
Copy link

Having the same issue, memory leak on ios

@AilsonFreire
Copy link

I downgraded to "1.2.1" version, no crashes

@AilsonFreire
Copy link

Tested on Android, getting black screen

@cgray9
Copy link

cgray9 commented Apr 2, 2025

I'm experiencing the same iOS memory leak leading to a crash when using useSkiaFrameProcessor
react-native: 0.76.7
@shopify/react-native-skia: 1.12.3

@maxximee
Copy link
Author

@wcandillon Hi William, sorry to @ you directly. I was wondering if those issues are on the radar, to me it sounds like pretty major issues with the skiaFrameProcessor (the ios memory leak causing a crash and some android devices not working at all crash | black screen).

@wcandillon
Copy link
Contributor

@maxximee we do plan do to maybe add an skia-frame-processor example and investigate this further but this will take a bit of time.

@rafaelrcamargo
Copy link

Just tried updating to the new SDK version; still the same thing: there's a leak somewhere... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants