React Native

React Native: Crash Fixes and Thread Safety Heroes

Today we're diving into two important stability fixes that landed in the React Native codebase. The standout is Fabrizio Cucci's critical fix for Hermes crashes affecting thousands of iOS users when TurboModule methods throw exceptions on the wrong thread. We also see continued maintenance work on Android scroll components.

Duration: PT3M38S

https://podlog.io/listen/react-native-b1306806/episode/react-native-crash-fixes-and-thread-safety-heroes-0bd275e9

Transcript

Hey there, React Native developers! Welcome back to another episode of your daily dose of React Native goodness. I'm your host, and it's March 30th, 2026. Grab your favorite beverage because we've got some really interesting stability fixes to talk about today.

You know, sometimes the most important work in software development isn't the flashy new features that get all the attention on Twitter. Sometimes it's the quiet heroes fixing crashes that are affecting thousands of users. And that's exactly what we're celebrating today.

Let's jump right into our main story, and this one's a doozy. Fabrizio Cucci just landed a critical fix for what was causing over 4,500 Hermes crashes on iOS. Now, this is the kind of bug that makes you appreciate just how complex React Native's architecture really is, but I promise I'll break it down in a way that makes sense.

Here's what was happening: when an async void TurboModule method would throw an NSException, the system was trying to convert that exception to a JavaScript error. Sounds reasonable, right? Well, the problem was it was doing this conversion on the wrong thread. And here's the kicker - Hermes's JSI runtime isn't thread-safe. So when you try to access it from multiple threads, you get heap corruption and those dreaded EXC_BAD_ACCESS crashes.

What I love about Fabrizio's fix is its elegance. Instead of trying to convert the exception to a JavaScript error on the wrong thread, the solution simply re-throws the Objective-C exception. It turns out there was already a similar fix for the sibling function, so this brings consistency across the codebase while preventing memory corruption.

The real-world impact here is huge. This was triggered by a JavaScript change behind a feature gate that was causing NSExceptions for non-employee users. Without this fix, what should have been a contained exception was turning into widespread crashes across the entire app. That's the kind of bug that keeps engineering teams up at night.

What's really cool is how this connects to the broader React Native ecosystem. This fix actually matches an upstream GitHub issue in the Hermes repository, showing how improvements flow between different parts of the React Native infrastructure.

We also had a smaller but still important commit touching the Android scroll components. It's just a one-line change in the MaintainVisibleScrollPositionHelper, but these incremental improvements are what keep React Native running smoothly across both platforms.

I have to say, diving into fixes like these really highlights the incredible engineering challenges the React Native team tackles every day. Thread safety, cross-platform consistency, performance optimization - it's all happening behind the scenes while we're building our amazing apps.

For today's focus, here's what I want you to take away from this episode: if you're working with TurboModules, especially ones that handle exceptions, take a moment to review your error handling patterns. Make sure you're not inadvertently accessing JSI runtime from the wrong threads. And if you've been seeing any mysterious Hermes crashes in your iOS apps, this fix might just be your savior.

Also, this is a great reminder to keep your React Native version updated. Fixes like these don't just improve stability - they prevent the kind of cascading failures that can really impact your users' experience.

That's a wrap on today's episode! Tomorrow we'll be back with more React Native updates, and who knows what exciting changes the team will surprise us with. Keep building amazing things, keep learning, and remember - every bug fixed is a step toward a better development experience for all of us.

Until next time, happy coding!