You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to update image prop passed to ReactNativeSkia.Image component, it crashes with the error:
Cannot pass deleted object as a pointer of type sk_sp
Version
1.2.3
Steps to reproduce
On React Native Skia building for web, implement a simple image picker.
import{useState}from"react";import{Button,View,StyleSheet}from"react-native";import*asImagePickerfrom"expo-image-picker";import{CanvasComponent}from"./CanvasComponent";exportdefaultfunctionPickerComponent(){const[image,setImage]=useState<string|null>(null);constpickImage=async()=>{letresult=awaitImagePicker.launchImageLibraryAsync({mediaTypes: ImagePicker.MediaTypeOptions.All,allowsEditing: false,aspect: [2,4],quality: 1,});if(!result.canceled){setImage(result.assets[0].uri);}};return(<Viewstyle={styles.container}><Buttontitle="Pick an image from camera roll"onPress={pickImage}/>{image&&<CanvasComponentimageSource={image}/>}</View>);}conststyles=StyleSheet.create({container: {flexDirection: "column",alignItems: "center",justifyContent: "center",},});
When selecting a new image, updates it on a Skia Image inside an Skia Canvas.
Description
When trying to update image prop passed to
ReactNativeSkia.Image
component, it crashes with the error:Version
1.2.3
Steps to reproduce
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@xluizv/skia-update-image-bug
(At Snack I couldn't make the setup for running react-native-skia on the web, thought the code is there and working with iOS at least)
The text was updated successfully, but these errors were encountered: