SIGSEGV Error on production/compiled app when using `Worklets.createContext`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react-native
- Ambito
- mobile-dev
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 791
- Fork
- 65
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di margelo/react-native-worklets-core
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
margelo/react-native-worklets-core#271 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
margelo/react-native-worklets-core#269 · 2 reazioni ·
-
Unable to download JS bundle Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
margelo/react-native-worklets-core#268 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
margelo/react-native-worklets-core#267 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
margelo/react-native-worklets-core#266 · 1 commento · 2 reazioni ·
Tutte le issue di margelo/react-native-worklets-core
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
ArthurSonzogni/FTXUI#1363 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
ginkgo-project/ginkgo#2108 ·
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Apertabug build
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Apertafuzz
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/ClickHouse#122114 ·