question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent freezing on iOS

See original GitHub issue

Description

Apologies in advance for vagueness, pretty hard to debug this one.

For the past few weeks I’ve been experiencing random freezing of our app, where the app seemingly stops in its tracks with no crashing/stacktrace/error. Initially I thought this was due to excessive re-rendering or a memory leak, but after reworking our logic to background actions the random freezes continue. Could well still be an error on our side, but struggling to see where/how.

I’ve tried to debug this myself with little joy (can’t remotely debug with reanimated) - the only nuggets of information I’ve managed to link are EXC_BAD_ACCESS exceptions which all seem to come from reanimated.

For reference, we’re using both react-native’s Animated and reanimated (in different parts of the app), and also frequently use Modalize which itself uses reanimated.

I found a previous issue that looks pretty similar to this but was fixed last year: https://github.com/software-mansion/react-native-reanimated/issues/1284

Expected behavior

No freezes

Actual behavior & steps to reproduce

Unknown

Snack or minimal code example

Can’t provide a replication unfortunately, but can provide some Sentry error traces from these exceptions.

EXC_BAD_ACCESS
XTUM > Stack overflow in _ZNKSt3__116__hash_node_baseIPNS_11__hash_nodeINS_17__hash_value_typeIiNS_6vectorINS_10shared_ptrIN8facebook3jsi5ValueEEENS_9allocatorIS8_EEEEEEPvEEE6__hashEv
Called from reanimated::StoreUser::~StoreUser::lambda::operator()
EXC_BAD_ACCESS
targetTimestamp > Attempted to dereference garbage pointer 0xce990e2ba698.
Called from reanimated::createReanimatedModule::lambda::operator()
EXC_BAD_ACCESS
Exception 1, Code 2752, Subcode 8 > Attempted to dereference garbage pointer 0xac0.
Called from reanimated::createReanimatedModule::lambda::operator()

Package versions

  • React Native: 0.64.1
  • React Native Reanimated: ^2.2.0
  • NodeJS: v14.15.5
  • Xcode: 12.5.1 (12E507)
  • Java & Gradle: Not relevant, we’re iOS only

For reference

  • react-native-modalize: ^2.0.8
  • react-native-portalize: ^1.0.7
  • react-native-screens: 2.17.1
  • @react-navigation/native: ^5.9.2
  • @react-navigation/stack: ^5.14.2

Affected platforms

  • Android
  • iOS
  • Web

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:25 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
dotansimhacommented, Oct 12, 2021

As stated here before by @effektsvk - this seems to be related to https://github.com/facebook/react-native/issues/32329

This causes issues with all libraries that are using Reanimated 2 for animations, starting from RN 0.65.1 (react-native-modal, react-native-screens, react-navigation and a few more).

Seems like it’s something with the transition that keeps the native screen in memory, and on top of the main view, leading to an overlay that prevents touch events.

@piaskowyk @Szymon20000 , I saw you were working on RN~66 support in https://github.com/software-mansion/react-native-reanimated/pull/2462 - any idea what could be done to workaround this issue? Any plan for a fix?

3reactions
effektsvkcommented, Oct 14, 2021

Hey, just a small note, there’s new 2.2.3 version that should help for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 5 Ways to Fix iOS 14 Apps Freezing and Crashing
How to Fix iPhone, iPad Apps Freezing and Crashing on iOS 14 · 1. Restart iPhone or iPad. To restart iPhone, take the...
Read more >
FIX: iPhone 13 Keeps Freezing Randomly After iOS 16.1 Update
Incompatible Apps :​​ The iPhone 13 is not freezing randomly. it's the active application that is causing the device to freeze. The third-party ......
Read more >
What Does It Mean When an iPhone Screen Keeps Freezing?
If the iPhone has begun freezing after an app or iOS update has been installed, it's possible something went wrong with the update...
Read more >
How to Fix a Frozen iPhone - MakeUseOf
An iPhone that suddenly freezes is a brick in your hand. Whether iOS is outdated, some apps are incompatible with it, the battery...
Read more >
Fixed iPhone Apps Keep Crashing After iOS 16.2 Update in ...
Incompatible app version with installed iOS. Especially for Apple (iOS and Mac), users constantly check new updates on apps and iOS because ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found