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.

__reanimatedHostObjectRef > Attempted to dereference null pointer

See original GitHub issue

Description

Receiving this crash report from some of the users:

__reanimatedHostObjectRef >
Attempted to dereference null pointer.

Thread 3 Crashed:
0   RNReanimated                    0x1039118a4         _ZNSt3__112__hash_tableINS_17__hash_value_typeIPN8facebook3jsi7RuntimeEN10reanimated11RuntimeTypeEEENS_22__unordered_map_hasherIS5_S8_NS_4hashIS5_EENS_8equal_toIS5_EELb1EEENS_21__unordered_map_equalIS5_S8_SD_SB_Lb1EEENS_9allocatorIS8_EEE4findIS5_EENS_15...
1   RNReanimated                    0x103910ed4         reanimated::MutableValue::get
2   jsi                             0x1041df074         facebook::jsc::JSCRuntime::createObject::HostObjectProxy::getProperty
3   JavaScriptCore                  0x3175d8190         <redacted>
4   JavaScriptCore                  0x3175010b8         <redacted>
5   JavaScriptCore                  0x3175eb144         JSObjectGetProperty
6   jsi                             0x1041dd1b0         facebook::jsc::JSCRuntime::getProperty
7   RNReanimated                    0x10393a8e0         reanimated::ShareableValue::adapt
8   RNReanimated                    0x10393ca34         reanimated::ShareableValue::adapt
9   RNReanimated                    0x1039099b4         reanimated::FrozenObject::FrozenObject
10  RNReanimated                    0x10393c890         std::__1::make_shared<T>
11  RNReanimated                    0x10393bc04         reanimated::ShareableValue::adapt
12  RNReanimated                    0x10393ca34         reanimated::ShareableValue::adapt
13  RNReanimated                    0x1039099b4         reanimated::FrozenObject::FrozenObject
14  RNReanimated                    0x10393c890         std::__1::make_shared<T>
15  RNReanimated                    0x10393b118         reanimated::ShareableValue::adapt
16  RNReanimated                    0x10393ca34         reanimated::ShareableValue::adapt
17  RNReanimated                    0x103919900         reanimated::NativeReanimatedModule::registerEventHandler
18  jsi                             0x1041e07e0         std::__1::function<T>::operator()
19  jsi                             0x1041e0528         facebook::jsc::JSCRuntime::createFunctionFromHostFunction::HostFunctionMetadata::call
20  JavaScriptCore                  0x3175df43c         <redacted>
21  JavaScriptCore                  0x317dad2d4         <redacted>
22  JavaScriptCore                  0x3175376c0         <redacted>
23  JavaScriptCore                  0x31753761c         <redacted>
24  JavaScriptCore                  0x3175376f0         <redacted>
25  JavaScriptCore                  0x31753761c         [inlined] <redacted>
26  JavaScriptCore                  0x31753761c         <redacted>
27  JavaScriptCore                  0x3175376f0         [inlined] <redacted>
28  JavaScriptCore                  0x3175376f0         <redacted>
29  JavaScriptCore                  0x31753761c         [inlined] <redacted>
30  JavaScriptCore                  0x31753761c         [inlined] <redacted>
31  JavaScriptCore                  0x31753761c         <redacted>
32  JavaScriptCore                  0x31750df38         <redacted>
33  JavaScriptCore                  0x317c49fc4         <redacted>
34  JavaScriptCore                  0x317f995dc         <redacted>
35  JavaScriptCore                  0x31753a818         <redacted>
36  JavaScriptCore                  0x3175376f0         <redacted>
37  JavaScriptCore                  0x31753761c         [inlined] <redacted>
38  JavaScriptCore                  0x31753761c         <redacted>
39  JavaScriptCore                  0x31750df38         <redacted>
40  JavaScriptCore                  0x317c49fc4         <redacted>
41  JavaScriptCore                  0x317f995dc         <redacted>
42  JavaScriptCore                  0x31753a818         <redacted>
43  JavaScriptCore                  0x31753761c         <redacted>
44  JavaScriptCore                  0x3175390fc         <redacted>
45  JavaScriptCore                  0x3175376f0         <redacted>
46  JavaScriptCore                  0x31753761c         <redacted>
47  JavaScriptCore                  0x3175390fc         <redacted>
48  JavaScriptCore                  0x31753761c         <redacted>
49  JavaScriptCore                  0x3175376f0         <redacted>
50  JavaScriptCore                  0x31753761c         <redacted>
51  JavaScriptCore                  0x31750df38         <redacted>
52  JavaScriptCore                  0x317c49fc4         <redacted>
53  JavaScriptCore                  0x317f995dc         <redacted>
54  JavaScriptCore                  0x31750e0e8         <redacted>
55  JavaScriptCore                  0x317c49fec         <redacted>
56  JavaScriptCore                  0x317ee9544         JSC::profiledCall
57  JavaScriptCore                  0x3175ed4f8         JSObjectCallAsFunction
58  jsi                             0x1041ddf30         facebook::jsc::JSCRuntime::call
59  jsireact                        0x104239adc         facebook::jsi::Function::call<T>
60  jsireact                        0x104239940         std::__1::__function::__func<T>::operator()
61  React                           0x103add880         std::__1::__invoke_void_return_wrapper<T>::__call<T>
62  jsireact                        0x10423665c         facebook::react::JSIExecutor::callFunction
63  cxxreact                        0x104007d0c         std::__1::__function::__func<T>::operator()
64  React                           0x103afd97c         facebook::react::tryAndReturnError
65  React                           0x103b0b4c4         facebook::react::RCTMessageThread::tryFunc
66  React                           0x103b0b278         facebook::react::RCTMessageThread::runAsync
67  CoreFoundation                  0x30084e9d4         <redacted>
68  CoreFoundation                  0x30084f8d0         <redacted>
69  CoreFoundation                  0x3007e78b8         <redacted>
70  CoreFoundation                  0x3007fb468         CFRunLoopRunSpecific
71  React                           0x103af266c         +[RCTCxxBridge runRunLoop]
72  Foundation                      0x30388e40c         <redacted>
73  libsystem_pthread.dylib         0x3e290f9a4         _pthread_start

Expected behavior

No crash

Actual behavior & steps to reproduce

Crash

Snack or minimal code example

https://github.com/tapz/reanimatederror-example/tree/master/android

Package versions

name version
react-native 0.66.4
react-native-reanimated 2.3.1
NodeJS 14.18.1
Xcode 13.2.1 (13C100)
Java openjdk 14.0.2+12-46
Gradle 7.3.3
expo

Affected platforms

  • Android
  • iOS
  • Web

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jordohcommented, Apr 8, 2022

In case it helps, I’m seeing exception reports in Sentry for this, immediately after what appears to be multiple backgrounding events: image

react-native@0.67.4 react-native-reanimated@2.5.0 iOS 15.3.1

2reactions
andreialecucommented, Jun 2, 2022

Seeing this logged in Sentry with reanimated 2.8.0.

I can also confirm that it seems to happen after backgrounding.

Screenshot 2022-06-02 at 17 02 12
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: EXC_BAD_ACCESS·Attempted to dereference ...
We've been getting these errors randomly in our application over the past several months and they show up in Bugsnag.
Read more >
Crash after block release, but thr… | Apple Developer Forums
As I'm sure you're aware, blocks capture state from their surrounding scope. This will increment the reference count on any captured objects. When...
Read more >
Null Dereference - OWASP Foundation
A null-pointer dereference takes place when a pointer with a value of NULL is used as though it pointed to a valid memory...
Read more >
Crash: Attempted to dereference garbage pointer 0x16d183180.
We have a crash report, which says Message: Exception EXC_BAD_ACCESS, Code 1830302080, Subcode 8 Attempted to dereference garbage pointer ...
Read more >
CWE-476: NULL Pointer Dereference (4.9) - MITRE
If an attacker can control the program's environment so that "cmd" is not defined, the program throws a NULL pointer exception when it...
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