-
Notifications
You must be signed in to change notification settings - Fork 647
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
[HermesABI][C API] Creating PropName from string triggers assertion failure #1560
Comments
Hey @robik, it's great to see that you're experimenting with the C API. Like with JSI, the C-API requires that all references you create are freed before the runtime is destroyed. You can do this by calling the In your example, both |
Hey @neildhar, thanks for clarifying! I skipped invalidation as it is not relevant in this case. The app crashes at call to the |
Ah, I see, there seems to be another issue. The line
Should actually be
|
In our defense, this C ABI wasn't meant to be used directly, but to build other APIs, JSI in particular, on top of it :-) Do we need to improve the documentation? |
Okay, thank you very much! This makes sense. I did not use documentation, just (poorly) reverse engineered it. Thanks for the clarification! |
@robik You may also find it helpful to refer to the JSI implementation in |
Bug Description
gradle clean
and confirmed this bug does not occur with JSCHermes git revision (if applicable): main (f2970e7)
React Native version: none
OS: MacOs
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): arm64-v8a
Steps To Reproduce
Run below code repro
The Expected Behavior
Expected: PropName is created
Current: Assertion failure
The assertion failure is related to ref counting I guess:
The text was updated successfully, but these errors were encountered: