Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native App Crash (Thread 1: EXC_BAD_ACCESS (code=1, address=0x54))

Recently came onto this issue when trying to run my app on the simulator through xCode or the React Native CLI. The bundle loads from localhost then the app immediately crashes with "Thread 1: EXC_BAD_ACCESS (code=1, address=0x54)" in "main.m" in Xcode. I am unable to get the app running even though it builds fine. (even tried running on release instead of debug)

error in main.m

This issue just started recently occurring and I cannot find anything in our Git logs that would cause any kind of issue - all pretty minor changes on the RN side and nothing native. Has anyone seen this issue/knows how to properly trace it? Seems like a super generic error and it is unclear on how to figure out what is actually going on.

Xcode version 11.5, React Native 0.62.0, and targetting iOS 10.

EDIT: After running the app a few times I was able to get this error in the Xcode Output

Xcode output

like image 866
Perniferous Avatar asked Jul 22 '20 18:07

Perniferous


2 Answers

For me, running this watchman watch-del-all && yarn cache clean was what worked. I found it on an issue on github. Strange but it worked like magic

like image 160
Jeremiah Avatar answered Nov 11 '22 07:11

Jeremiah


After tons of debugging, confusion, and many hours of frustration it came down to removing and readding one dependency. There was no specific error message I could trace or change I could find in our git history that would've caused this. I literally ended up tediously removing code from the App until I found the library that was the problem.

like image 2
Perniferous Avatar answered Nov 11 '22 08:11

Perniferous