Skip to content

[Cross-platform] Crash in hermes::vm::CodeBlock::getSourceLocation when connecting DevTools during high-volume TurboModule calls (v0.84.0) #55571

@avigelkopMastercard

Description

@avigelkopMastercard

Description

Since upgrading to React Native 0.84.0, which introduces Hermes V1 as the default engine, we are experiencing a consistent crash on both iOS and Android.
The crash occurs specifically when the standalone React Native DevTools are connected and the application executes a high volume of asynchronous calls to a custom TurboModule (New Architecture). The crash point in the Hermes VM indicates an issue with resolving source locations during these calls.

Steps to reproduce

Steps to Reproduce

  1. Environment Setup: Use React Native 0.84.0 with New Architecture enabled and Hermes V1 (default).
  2. Turbo Module Implementation: Implement a Turbo Module that returns a response to the JS layer.
  3. Debugger Connection: Connect the standalone React Native DevTools to the running app.
  4. Batch Execution: Trigger a high frequency of asynchronous calls to the Turbo Module (e.g., by clicking a button that runs a large suite of automated tests).
  5. Observation: The app crashes immediately upon the volume spike.

Expected Behavior
The application should handle high-frequency traffic while connected to DevTools without crashing the JavaScript runtime.


Actual Behavior
The application crashes with an EXC_BAD_ACCESS (or equivalent signal on Android) at: hermesvm'hermes::vm::CodeBlock::getSourceLocation:
com.facebook.react.runtime.JavaScript (21): EXC_BAD_ACCESS (code=1, address=0x0)


Additional Context & Isolation
• Not Logic-Dependent: The crash persists even when the Turbo Module is "mocked" to return an immediate response directly from the C++ entry point, bypasses any SDK or complex logic [User Info].
• Not Network-Dependent: The crash occurs even when no network requests are made [User Info].
• DevTools Mandatory: The crash only happens when the DevTools are connected. Without the debugger, the batch of calls completes successfully [User Info].
• Hermes V1: This issue appeared after the transition to Hermes V1 in 0.84.
• Node.js: Environment is running on Node.js v22.11+ as required by this version

React Native Version

0.84.0

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.7.3
  CPU: (12) arm64 Apple M3 Pro
  Memory: 214.64 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.7.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 4.12.0
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.5.1
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.05.26.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK:
    API Levels:
      - "35"
      - "36"
    Build Tools:
      - 34.0.0
      - 35.0.0
      - 36.0.0
    System Images:
      - android-36 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.28238.7.2523.14688667
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /opt/homebrew/Cellar/openjdk@17/17.0.16/libexec/openjdk.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.4.5
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.84.0
    wanted: 0.84.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebuggingIssues related to React Native DevTools or legacy JavaScript/Hermes debuggingNeeds: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions