SIGSEGV Error on production/compiled app when using `Worklets.createContext`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, react-native
- Área
- mobile-dev
Línea de trabajo
Start with the Worklets.createContext and createRunAsync entry points, then reproduce the SIGSEGV using the Index example and the release command npx expo run:android -d --variant release. Compare release behavior with dev mode and the older workaround; done means the reproduced app no longer crashes while running the context callback.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This problem is related to this issue.
If I try to use runAsync method (wich uses Worklets.createContext method) my app crash while running compiled apk or running it in expo production mode (npx expo run:android -d --variant release).
In dev mode the app don't crash and everything works really fine.
With any version before 1.0.0-beta.3 (and also after a lot of tests) I came to the conclusion that the app don't crash and everything works fine (this was also my workaround to get my vision-camera's face-detector plugin working) if I create my context this way:
function useWorklet(
func: () => void,
dependencyList: DependencyList
): WorkletType {
const worklet = React.useMemo( () => {
// this was the trick
const context: any = 'MyContext'
return Worklets.createRunInContextFn( func, context )
}, dependencyList )
return worklet
}
const test = useWorklet() {
'worklet'
.... do anything
}
But after 1.0.0-beta.3 I can't do this workaround anymore as now we must call createRunAsync from a created context and this makes the app crash.
I'm currently using worklets core 1.1.1 version with vision camera 4.0.1 and this problem is still happening.
Here's a very simple reproducible code:
function Index() {
const runOnJs = Worklets.createRunOnJS( () => {
console.log( 'hello from js' )
} )
const context = Worklets.createContext( 'MyContext' )
const runOnContext = context.createRunAsync( () => {
'worklet'
console.log( 'hello from context' )
runOnJs()
} )
const frameProcessor = useFrameProcessor( ( frame ) => {
'worklet'
runOnContext()
}, [] )
return <Reanimated.View>
<VisionCamera
frameProcessor={ frameProcessor }
pixelFormat='yuv'
.... other vision camera props
/>
</Reanimated.View>
}
Thanks for any help.
- Lenguaje dominante
- C++
- Estrellas
- 791
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de margelo/react-native-worklets-core
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
margelo/react-native-worklets-core#271 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#269 · 2 reacciones ·
-
Unable to download JS bundle Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#268 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
margelo/react-native-worklets-core#267 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
margelo/react-native-worklets-core#266 · 1 comentario · 2 reacciones ·
Todos los issues de margelo/react-native-worklets-core
Issues similares
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Abiertobug build
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Abiertofuzz
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ClickHouse/ClickHouse#122114 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
module/agent platform/macos type/bug/regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement PyCDE
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100