Skip to content

EXC_BAD_ACCESS crash in async methods #370

@owl352

Description

@owl352

Problem

In recent tests, we found a bug that causes the application to crash. When attempting to call any method from node-api in an asynchronous code block, we receive the error com.facebook.react.runtime.JavaScript: EXC_BAD_ACCESS (code=1, address=0x0). This applies to all methods within the library.

Recent tests have shown that the error only occurs when we call the method inside an asynchronous code block and await after receiving a response. The behavior is unstable, and in certain cases everything works as it should, but repeated execution can cause this error.

upd: maybe gc. Waiting node-api implementation PR merge

Reproduce

  • git clone https://github.com/owl352/expo-pshenmic-dpp-test
  • npm i
  • npx prebuild
  • npm run ios

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions