react-native-vision-camera: 🐛 Reanimated 3.5.4 + RNVC V3 Frame Processor causes app crashes(signal SIGABRT)
What’s happening?
I bumped Reanimated version up to 3.5.4 and my app crashed immediately after launched.
When I unset frameProcessor
props, the crash was gone.
Reproduceable Code
https://github.com/bglgwyng/react-native-vision-camera/tree/reanimated-3.5.4
The only thing I did was install reanimated 3.5.4.
You could observe that commenting frameProcessor
props prevents the crash from occurring.
Relevant log output
libsystem_kernel.dylib`:
0x1e14ed570 <+0>: mov x16, #0x148
0x1e14ed574 <+4>: svc #0x80
-> 0x1e14ed578 <+8>: b.lo 0x1e14ed598 ; <+40>
0x1e14ed57c <+12>: pacibsp
0x1e14ed580 <+16>: stp x29, x30, [sp, #-0x10]!
0x1e14ed584 <+20>: mov x29, sp
0x1e14ed588 <+24>: bl 0x1e14e89a4 ; cerror_nocancel
0x1e14ed58c <+28>: mov sp, x29
0x1e14ed590 <+32>: ldp x29, x30, [sp], #0x10
0x1e14ed594 <+36>: retab
0x1e14ed598 <+40>: ret
Camera Device
{
"hardwareLevel": "full",
"supportsLowLightBoost": false,
"isMultiCam": false,
"hasTorch": true,
"hasFlash": true,
"name": "Back Camera",
"sensorOrientation": "portrait",
"id": "com.apple.avfoundation.avcapturedevice.built-in_video:0",
"maxZoom": 121.875,
"supportsFocus": true,
"supportsRawCapture": false,
"neutralZoom": 1,
"physicalDevices": [
"wide-angle-camera"
],
"position": "back",
"minZoom": 1
}
Device
iPhone 13 (iOS 16.6.1)
VisionCamera Version
3.0.0
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this project’s Code of Conduct
- I searched for similar issues in this repository and found none.
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 4
- Comments: 19 (13 by maintainers)
Gotcha, I think I know a fix @bglgwyng
Hm, idk there are no native changes since REA 3.5.0, and I remember that 3.5.0 worked at some point. Maybe there is something wrong happening in the worklets, I can try to debug this once I’m done with the new devices API/docs!
@chrfalch just fixed this issue in this PR (I think) - we’ll test more then release an update! https://github.com/margelo/react-native-worklets-core/pull/128
@pvducTaureauAI Have you tried the example app in the package? Which platform do you have problems with?
So I think the SWM team renamed this again in their babel plugin:
This is how react-native-worklets-core works:
I encountered an interesting yet positive occurrence. I updated my RNVC version from 3.2.2 to 3.4.0 while keeping Reanimated at 3.3.0. This led to a crash in my app. However, when I examined the crash log, it seemed strangely familiar, and I recalled encountering the same error message before.
In an attempt to resolve the issue, I decided to upgrade Reanimated to 3.5.4, hoping for a stroke of luck. Surprisingly, it resolved the problem. To sum it up:
RNVC 3.2.2 + Reanimated 3.3.0 → Functioning properly RNVC 3.2.2 + Reanimated 3.5.4 → Caused a crash RNVC 3.4.0 + Reanimated 3.3.0 → Caused a crash RNVC 3.4.0 + Reanimated 3.5.4 → Functioning properly
“react-native-reanimated”: “^3.4.2”, “react-native-vision-camera”: “^2.15.4”, “vision-camera-code-scanner”: “^0.2.0” in react native 0.69.0. but i am getting crash yet.
+1 Just ran into this as well.
~Had issues with REA v
3.5.4
when attempting an upgrade.~I tested with REA v
3.4.2
and had no issues.EDIT: Did a bit more testing and looks like this issue begins to appear with REA v
3.5.0
.Okay then it might be a REA compatibility thing? We need to check what has changed since their last release.
Alternatively, you could downgrade REA but that’s also not an ideal solution.
It sucks that we have to have two separate Worklet implementations 😕
Yes, that was the suggestion. The theory was that the two might be interfering with each other.
Could it be that the new version has some updates in the babel plugin architecture (which will be automatically updated by upgrading Reanimated) - or that having two babel plugins for worklets makes for some undefined behaviour?
Could you remove the worklet plugin after installing Reanimated and report back with your findings? (in the babel.config.js file).