Skip to content

EXC_BAD_ACCESS #763

@valerii-starlight

Description

@valerii-starlight

Environment

System:
  OS: macOS 15.5
  CPU: (8) arm64 Apple M3
  Memory: 115.08 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.14.0
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.2
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.7
    wanted: 0.76.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Platforms

iOS

Versions

  • iOS: 18.5
  • react-native-netinfo: 11.4.1
  • react-native: 0.76.7
  • react: 18.3.1
  • expo: 52.0.37

Description

Sentry breadcrumbs:

Exception - This event
error
08:27:37.000 PM
EXC_BAD_ACCESS: Exception 1, Code 1, Subcode 0 >
Attempted to dereference null pointer.
App Lifecycle
info
08:27:37.658 PM

{
state: background
}
Fetch
info
08:26:44.456 PM
HEAD: https://clients3.google.com/generate_204 [204]
XHR
info
08:26:44.455 PM
HEAD: https://clients3.google.com/generate_204?_=1748896004425 [204]

{
end_timestamp: 1748900000000,
response_body_size: 0,
start_timestamp: 1748900000000
}
HTTP
info
08:26:44.454 PM
HEAD: https://clients3.google.com/generate_204 [204]

{
http.query: _=1748896004425,
reason: no content,
request_body_size: 0,
request_start: 2025-06-02T20:26:44.431Z,
response_body_size: 0
}

Stacktrace:

MyAppName
+0x20b5bc
facebook::jsi::Object::~Object (jsi.h:662)
In App
MyAppName
+0x20b5bc
facebook::jsi::Function::~Function (jsi.h:992)
In App
MyAppName
+0x20b5bc
facebook::react::CallbackWrapper::~CallbackWrapper (CallbackWrapper.h:21)
In App
Called from
MyAppName
+0x1ff0ec
std::__1::__shared_count::__release_shared[abi:ne180100] (shared_ptr.h:157)

Hide 36 more frames
MyAppName
+0x1ff0ec
std::__1::__shared_weak_count::__release_shared[abi:ne180100] (shared_ptr.h:186)
MyAppName
+0x1ff0ec
std::__1::shared_ptr<T>::~shared_ptr[abi:ne180100] (shared_ptr.h:648)
MyAppName
+0x5be4d0
std::__1::shared_ptr<T>::~shared_ptr[abi:ne180100] (shared_ptr.h:646)
MyAppName
+0x5be4d0
std::__1::__destroy_at[abi:ne180100]<T> (construct_at.h:67)
MyAppName
+0x5be4d0
std::__1::allocator_traits<T>::destroy[abi:ne180100]<T> (allocator_traits.h:316)
MyAppName
+0x5be4d0
std::__1::__hash_table<T>::__deallocate_node (__hash_table:1111)
MyAppName
+0x5be490
std::__1::__hash_table<T>::~__hash_table (__hash_table:1079)
MyAppName
+0x1ff0ec
std::__1::__shared_count::__release_shared[abi:ne180100] (shared_ptr.h:157)
MyAppName
+0x1ff0ec
std::__1::__shared_weak_count::__release_shared[abi:ne180100] (shared_ptr.h:186)
MyAppName
+0x1ff0ec
std::__1::shared_ptr<T>::~shared_ptr[abi:ne180100] (shared_ptr.h:648)
MyAppName
+0x3bef90
std::__1::shared_ptr<T>::~shared_ptr[abi:ne180100] (shared_ptr.h:646)
MyAppName
+0x3bef90
std::__1::pair<T>::~pair (pair.h:80)
MyAppName
+0x3bef90
std::__1::__destroy_at[abi:ne180100]<T> (construct_at.h:67)
MyAppName
+0x3bef90
std::__1::allocator_traits<T>::destroy[abi:ne180100]<T> (allocator_traits.h:316)
MyAppName
+0x3bef90
std::__1::__hash_table<T>::__deallocate_node (__hash_table:1111)
MyAppName
+0x3bef50
std::__1::__hash_table<T>::~__hash_table (__hash_table:1079)
libsystem_c
+0x027940
__cxa_finalize_ranges
libsystem_c
+0x027700
exit
AppKit
+0x2413a4
-[NSApplication terminate:]
AppKit
+0x366678
-[NSApplication _terminateFromSender:askIfShouldTerminate:saveWindows:]
AppKit
+0x366560
__52-[NSApplication _handleAEQuit]_block_invoke
AppKit
+0x5ed43c
___NSMainRunLoopPerformBlockInModes_block_invoke
CoreFoundation
+0x07c870
__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
CoreFoundation
+0x07c780
__CFRunLoopDoBlocks
CoreFoundation
+0x07b614
__CFRunLoopRun
CoreFoundation
+0x07ac54
CFRunLoopRunSpecific
HIToolbox
+0x0c3278
RunCurrentEventLoopInMode
HIToolbox
+0x0c6318
ReceiveNextEventCommon
HIToolbox
+0x251480
_BlockUntilNextEventMatchingListInModeWithFilter
AppKit
+0x03aab0
_DPSNextEvent
AppKit
+0x9d95ac
-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
AppKit
+0x02dc60
-[NSApplication run]
AppKit
+0x004358
NSApplicationMain
AppKit
+0x250cf0
_NSApplicationMainWithInfoDictionary
UIKitMacHelper
+0x004160
UINSApplicationMain
UIKitCore
+0x003c98
UIApplicationMain
MyAppName
+0x008420
main (main.m:7)

Reproducible Demo

We catch it with Sentry, it happens occasionally.
Suggested steps to reproduce: fetch internet status in the background (or when switching between background and foreground)

Suspected code:

import { fetch } from '@react-native-community/netinfo';
const { isInternetReachable } = await fetch();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions