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

Different Issues (Android and iOS) with useSkiaFrameProcessor #2964

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

Different Issues (Android and iOS) with useSkiaFrameProcessor #2964

maxximee opened this issue Feb 17, 2025 · 1 comment
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"

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

1 participant