-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
🐛 runAsync not executing or app crash #2820
Comments
I need log outputs or error messages or anything. Please post those, otherwise I cannot help you. On Android, use |
Ah nevermind you just posted error messages this second lol |
Just to clarify; this works fine in Debug, but fails in Release? |
Yes, exactly, I had this with older versions of vision-camera and worklets-core too and hoped that the current version would fix it. |
I am looking at the code and I don't really see where the initialization is different, are you 100% sure that it works with the |
And does this crash on iOS as well, or only Android? |
@mrousavy This issue is related to #2589 and also this worklets-core issue. On old worklets-core version (0.4.0), creating context with
I tested it only on android. I'll test on IOS and provide you a feedback. |
I have now tested the Example app again on a Samsung A55 (Android 14), a Samsung A41 (Android 12) and an iPhone 12 mini (iOS 17.4.1). The same result on all devices, everything works in debug mode, even with “Worklets.createContext(‘VisionCamera.async’)”. In release mode, however, the app crashes. If I change to “Worklets.defaultContext” it works on all devices, even in release mode. |
This is so weird. I mean we definitely want a separate Context in case you are using react-native-worklets-core for something else (which is usually the default context), so not sure why this is happening. |
Hey - I spent a little time investigating the parallel memory allocations and actually found & fixed a bug! Try this and see if this fixes your issue: #2829 |
For me, |
I tested it with the current clean repo version and it sometimes works on iOS, but most of the time the app crashes (9 out of 10 cases). The fix is only for iOS? I get the following error message in XCode: Thread 9: EXC_BAD_ACCESS (code=1, address=0x80000000000000d0) Thread 9 Queue : mrousavy/VisionCamera.video (serial)
#0 0x0000000102fcd4c4 in long std::__1::__libcpp_atomic_refcount_increment[abi:ue170006]<long>(long&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:106
#1 0x0000000102fcd4c4 in std::__1::__shared_weak_count::__add_weak[abi:ue170006]() [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:210
#2 0x0000000102fcd4c0 in std::__1::weak_ptr<RNWorklet::JsiWorkletContext>::weak_ptr(std::__1::weak_ptr<RNWorklet::JsiWorkletContext> const&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:1722
#3 0x0000000102fcd4b4 in std::__1::weak_ptr<RNWorklet::JsiWorkletContext>::weak_ptr(std::__1::weak_ptr<RNWorklet::JsiWorkletContext> const&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:1720
#4 0x0000000102fcd4b4 in std::__1::enable_shared_from_this<RNWorklet::JsiWorkletContext>::weak_from_this[abi:ue170006]() [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:1963
#5 0x0000000102fcd4b4 in RNWorklet::JsiWorkletContext::invokeOnWorkletThread(std::__1::function<void (RNWorklet::JsiWorkletContext*, facebook::jsi::Runtime&)>&&) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletContext.cpp:146
#6 0x0000000102fd631c in RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda'(std::__1::function<void (facebook::jsi::Runtime&)>&&)::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const [inlined] at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletContext.cpp:309
#7 0x0000000102fd62cc in RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)::operator()(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>) const [inlined] at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletContext.cpp:344
#8 0x0000000102fd618c in decltype(std::declval<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)&>()(std::declval<facebook::jsi::Runtime&>(), std::declval<std::__1::shared_ptr<RNWorklet::PromiseParameter>>())) std::__1::__invoke[abi:ue170006]<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)&, facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>>(RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)&, facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:340
#9 0x0000000102fd6184 in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)&, facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>>(RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)&, facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:415
#10 0x0000000102fd6184 in std::__1::__function::__alloc_func<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>), std::__1::allocator<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>, void (facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>::operator()[abi:ue170006](facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__functional/function.h:193
#11 0x0000000102fd6184 in std::__1::__function::__func<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>), std::__1::allocator<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const::'lambda0'(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>, void (facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>::operator()(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>&&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__functional/function.h:364
#12 0x0000000102fc3138 in std::__1::__function::__value_func<void (facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>::operator()[abi:ue170006](facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>&&) const [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__functional/function.h:518
#13 0x0000000102fc311c in std::__1::function<void (facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>::operator()(facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>) const [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__functional/function.h:1169
#14 0x0000000102fc311c in RNWorklet::JsiPromiseWrapper::runComputation(facebook::jsi::Runtime&, std::__1::function<void (facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/wrappers/WKTJsiPromiseWrapper.cpp:31
#15 0x0000000102fc3028 in RNWorklet::JsiPromiseWrapper::createPromiseWrapper(facebook::jsi::Runtime&, std::__1::function<void (facebook::jsi::Runtime&, std::__1::shared_ptr<RNWorklet::PromiseParameter>)>) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/wrappers/WKTJsiPromiseWrapper.cpp:18
#16 0x0000000102fd4d4c in RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const [inlined] at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletContext.cpp:338
#17 0x0000000102fd4b74 in decltype(std::declval<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5&>()(std::declval<facebook::jsi::Runtime&>(), std::declval<facebook::jsi::Value const&>(), std::declval<facebook::jsi::Value const*>(), std::declval<unsigned long>())) std::__1::__invoke[abi:ue170006]<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5&, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long>(RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5&, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*&&, unsigned long&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:340
#18 0x0000000102fd4b6c in facebook::jsi::Value std::__1::__invoke_void_return_wrapper<facebook::jsi::Value, false>::__call[abi:ue170006]<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5&, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long>(RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5&, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*&&, unsigned long&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:407
#19 0x0000000102fd4b6c in std::__1::__function::__alloc_func<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5, std::__1::allocator<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5>, facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()[abi:ue170006](facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*&&, unsigned long&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__functional/function.h:193
#20 0x0000000102fd4b6c in std::__1::__function::__func<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5, std::__1::allocator<RNWorklet::JsiWorkletContext::createCallInContext(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWorkletContext*)::$_5>, facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*&&, unsigned long&&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/c++/v1/__functional/function.h:364
#21 0x0000000123b95480 in ___lldb_unnamed_symbol838 ()
#22 0x0000000123ba8d70 in ___lldb_unnamed_symbol1219 ()
#23 0x0000000123bc7da8 in ___lldb_unnamed_symbol1739 ()
#24 0x0000000123bc72b4 in ___lldb_unnamed_symbol1738 ()
#25 0x0000000123ba9018 in ___lldb_unnamed_symbol1225 ()
#26 0x0000000123b8ddd4 in ___lldb_unnamed_symbol680 ()
#27 0x0000000102e92b90 in facebook::jsi::Function::callWithThis(facebook::jsi::Runtime&, facebook::jsi::Object const&, facebook::jsi::Value const*, unsigned long) const [inlined] at ../react-native-vision-camera/package/example/ios/Pods/Headers/Public/hermes-engine/jsi/jsi-inl.h:280
#28 0x0000000102e92b50 in RNWorklet::JsiWorklet::call(std::__1::shared_ptr<facebook::jsi::Function>, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h:219
#29 0x0000000102e92234 in RNWorklet::WorkletInvoker::call(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h:369
#30 0x0000000123b95480 in ___lldb_unnamed_symbol838 ()
#31 0x0000000123ba8d70 in ___lldb_unnamed_symbol1219 ()
#32 0x0000000123bc7da8 in ___lldb_unnamed_symbol1739 ()
#33 0x0000000123bc72b4 in ___lldb_unnamed_symbol1738 ()
#34 0x0000000123ba9018 in ___lldb_unnamed_symbol1225 ()
#35 0x0000000123b8ddd4 in ___lldb_unnamed_symbol680 ()
#36 0x0000000102e92b90 in facebook::jsi::Function::callWithThis(facebook::jsi::Runtime&, facebook::jsi::Object const&, facebook::jsi::Value const*, unsigned long) const [inlined] at ../react-native-vision-camera/package/example/ios/Pods/Headers/Public/hermes-engine/jsi/jsi-inl.h:280
#37 0x0000000102e92b50 in RNWorklet::JsiWorklet::call(std::__1::shared_ptr<facebook::jsi::Function>, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h:219
#38 0x0000000102e92234 in RNWorklet::WorkletInvoker::call(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h:369
#39 0x0000000123b95480 in ___lldb_unnamed_symbol838 ()
#40 0x0000000123ba8d70 in ___lldb_unnamed_symbol1219 ()
#41 0x0000000123bc7da8 in ___lldb_unnamed_symbol1739 ()
#42 0x0000000123bc72b4 in ___lldb_unnamed_symbol1738 ()
#43 0x0000000123ba9018 in ___lldb_unnamed_symbol1225 ()
#44 0x0000000123b8ddd4 in ___lldb_unnamed_symbol680 ()
#45 0x0000000102e92b90 in facebook::jsi::Function::callWithThis(facebook::jsi::Runtime&, facebook::jsi::Object const&, facebook::jsi::Value const*, unsigned long) const [inlined] at ../react-native-vision-camera/package/example/ios/Pods/Headers/Public/hermes-engine/jsi/jsi-inl.h:280
#46 0x0000000102e92b50 in RNWorklet::JsiWorklet::call(std::__1::shared_ptr<facebook::jsi::Function>, facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h:219
#47 0x0000000102e92234 in RNWorklet::WorkletInvoker::call(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) at ../react-native-vision-camera/package/example/node_modules/react-native-worklets-core/cpp/WKTJsiWorklet.h:369
#48 0x0000000102e920ec in -[FrameProcessor callWithFrameHostObject:] at ../react-native-vision-camera/package/ios/FrameProcessors/FrameProcessor.mm:45
#49 0x0000000102e923a0 in -[FrameProcessor call:] at ../react-native-vision-camera/package/ios/FrameProcessors/FrameProcessor.mm:51
#50 0x0000000102eac590 in CameraView.onFrame(sampleBuffer:) [inlined] at ../react-native-vision-camera/package/ios/React/CameraView.swift:356
#51 0x0000000102eac57c in protocol witness for CameraSessionDelegate.onFrame(sampleBuffer:) in conformance CameraView [inlined] at ../react-native-vision-camera/package/example/ios/Pods/<compiler-generated>:349
#52 0x0000000102eac57c in specialized CameraSession.captureOutput(_:didOutput:from:) at ../react-native-vision-camera/package/ios/Core/CameraSession.swift:277
#53 0x0000000102eabbdc in CameraSession.captureOutput(_:didOutput:from:) [inlined] ()
#54 0x0000000102eabbd0 in @objc CameraSession.captureOutput(_:didOutput:from:) at ../react-native-vision-camera/package/example/ios/Pods/<compiler-generated>:274
#55 0x00000001bd81ec30 in -[AVCaptureVideoDataOutput _processSampleBuffer:] ()
#56 0x00000001bd81eafc in __47-[AVCaptureVideoDataOutput _updateRemoteQueue:]_block_invoke ()
#57 0x00000001c0fd42e4 in __FigRemoteOperationReceiverCreateMessageReceiver_block_invoke ()
#58 0x00000001c0fd4220 in __rqReceiverSetSource_block_invoke ()
#59 0x00000001050467bc in _dispatch_client_callout ()
#60 0x00000001050498e0 in _dispatch_continuation_pop ()
#61 0x0000000105060cc8 in _dispatch_source_latch_and_call ()
#62 0x000000010505f718 in _dispatch_source_invoke ()
#63 0x000000010504e4a4 in _dispatch_lane_serial_drain ()
#64 0x000000010504f408 in _dispatch_lane_invoke ()
#65 0x000000010505c404 in _dispatch_root_queue_drain_deferred_wlh ()
#66 0x000000010505ba38 in _dispatch_workloop_worker_thread ()
#67 0x00000001fc8f4f20 in _pthread_wqthread ()
|
This comment was marked as spam.
This comment was marked as spam.
Okay yea well then this might be an actual Worklets bug. I think it's really weird that it works with the |
On worklets-core
Instead of:
I don't know why but it works |
The type for the second parameter is So your example of passing |
But it's so weird that it works with the |
yes yes, I had this TS warning but I rewrite it forcing my string to be from
okay, now that makes sense 🤯
Take your time, I'm in no hury 😀 |
Yea, it's not a warning it's an error. Basically the force cast to any didn't change anything - as I said, |
I can only agree, thank you for all your hard work. |
I am facing the same |
I got a tombstone for this. |
@mrousavy The following is causing issues in The only difference between default context and Potentially related: margelo/react-native-worklets-core#186
Edit: Furthermore, it breaks when _plugin is called and has no empty result for first few times... Funny, JS renders the results for 2-3 frames then the frame Processor stops executing. But the issue is not the rerender of the view. It stops 2-3 frames after the result is not an empty array regardless of rerendering. Tested using
|
Hey, I'm wondering if there is a fix or workaround for the problems with runAsync ? I'm getting randomly RNWorklet::JsiWorklet::getCode while using it with ios. I couldn't find a solution for this yet, did I miss something ? If you need logs or anything to help you debug, let me know what you need. Thanks a lot, |
I have same issue with useSkiaFrameProcessor and runAsync worklet inside. Witht the debug mode everything works, but with a release mode -- 9/10 times have crashes. SkiaFrameProcessor by itslef works fine, I think I have in a runAsync issue. |
We also experienced the same issue, with Below is the crash scene from Android.
If we modify I would suggest the forementioned modification as one viable workaound for anyone dire need. By the look of things this should be a Package versions: |
I only found a workaround to change the context of runAsync execution from .createContext(...) to just .defaultContext; |
I've tested both iOS and Android and with this workaround it works! |
Same issue here with package versions:
|
any way to fix this crash? |
Had this issue as well with up to date packages. Ended up creating a little shell script to patch the context until it's fixed. Here it is if it helps anyone, hopefully we don't need it for long. #!/bin/sh
set -e
# Patch node_modules/react-native-vision-camera/src/frame-processors/runAsync.ts so that it can be used in a release build.
pushd node_modules/react-native-vision-camera/src/frame-processors
sed -i 's/const asyncContext = Worklets.createContext('\''VisionCamera.async'\'')/const asyncContext = Worklets.defaultContext/g' runAsync.ts
popd
echo "Done" |
I created a patch to change the context of runAsync execution from
|
I can confirm that |
What's happening?
Everything works perfectly in debug mode for Android. But when I install the app with “--mode=release”, the code in “runAsync” is not executed or the app crashes. I was able to trace it back so far that it makes a difference in FrameProcessorPlugins.ts if I change the line “const asyncContext = Worklets.createContext(‘VisionCamera.async’)” to “const asyncContext = Worklets.defaultContext”. Everything works with the DefaultContext, even in the release build. Could there be an error here, or am I doing something wrong in the usage? react-native-vision-camera:4.0.1 and react-native-worklets-core:1.2.0
Reproduceable Code
Relevant log output
Camera Device
Device
Samsung A55
VisionCamera Version
4.0.1
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
The text was updated successfully, but these errors were encountered: