margelo / react-native-worklets-core

🧵 A library to run JS functions ("Worklets") on separate Threads
https://margelo.io
MIT License
567 stars 37 forks source link

Worklets.createRunInJsFn stack overflow and crash when using with hermes disabled (iOS) #137

Closed seavan closed 6 months ago

seavan commented 10 months ago

Reproducible with the example app.

Steps to reproduce:

IMG_2727

https://github.com/margelo/react-native-worklets-core/assets/750359/1109e8d9-a9a4-4296-a006-5777170cfb06

Info on XCode:

Monosnap WorkletsExample — JSCRuntime cpp 2024-01-15 20-13-00 Monosnap WorkletsExample — JSCRuntime cpp 2024-01-15 20-13-23

It works fine with hermes enabled, but unfortunately we need to rely on JSC for a while until they fix their Object property count limits.

seavan commented 10 months ago

@mrousavy please! requesting your assistance here.

we tried replacing back worklets with reanimated worklets in react-native-vision-camera, btw, was there a particilar limitation why you decided to use your own worklets?

mrousavy commented 10 months ago

Hey - you can "request assistance" through my agency - margelo.io. We often fix specific open-source bugs for clients :)

Anyways; I would personally recommend to use Hermes instead of JSC. It works, and it starts faster. It's the direction react-native is moving in anyways.

seavan commented 10 months ago

@mrousavy we are waiting for them to fix this - https://github.com/facebook/hermes/issues/851 we're using watermelondb which relies on Object as a map.

in any case, send you a request through form on your website!

indu-svmx commented 9 months ago

@mrousavy - I am also facing the same issue. Is there any fix for this?

mrousavy commented 9 months ago

@indu-svmx as I just said in my previous comment, use Hermes instead of JSC.