Skip to content

pthread_mutex_lock invalid memory crash during SkiaUIView dealloc #3032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
ahmedsakr opened this issue Mar 15, 2025 · 1 comment
Open
1 task done

pthread_mutex_lock invalid memory crash during SkiaUIView dealloc #3032

ahmedsakr opened this issue Mar 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ahmedsakr
Copy link

Description

Problem

Using react-native-code-push, i am seeing a dealloc invalid memory access when SkiaUiIiew's dealloc attempts to lock on _mutex_. This is resulting in a EXC_BAD_ACCESS (KERN_INVALID_ADDRESS).

React Native Skia Version

1.11.8

React Native Version

0.77.1

Using New Architecture

  • Enabled

Steps to Reproduce

  1. Setup a sample react-native app that mounts a skia view
  2. trigger a JS bundle reload via a codepush (using react-native-code-push

Snack, Code Example, Screenshot, or Link to Repository

here is a sample stack trace

Image
@ahmedsakr ahmedsakr added the bug Something isn't working label Mar 15, 2025
@ahmedsakr
Copy link
Author

is this unregisterView method thread-safe? it seems like the manager can be freed from willInvalidateModules while other threads may be attempting a unregisterView?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant