-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Performance Monitor causes crash on iOS 13.4 #28414
Comments
Additionally I noticed that the GC metric in the Performance Monitor also doesn't update in iOS 13.1. So it might be broken in earlier versions as well. |
## Motivation This PR fixes a crash when opening the Performance Monitor on iOS 13.4. More info: facebook#28414 ## How This PR prevents the JavaScriptCore option from being set altogether. This ensures that the performance monitor keeps working, but on iOS 13.4 and higher, it will no longer crash or show the GC usage. ## Test Plan Tested on iOS 13.4 (simulator): Tested on iOS 13.1 (simulator) - Verified that the `setOption` was called, but the Performance Monitor didn't show any GC usage regardless. ## Release Notes `[ IOS ] [ BUGFIX ] [RCTPerfMonitor.m] - Fix crash when enabling Performance Monitor on iOS 13.4`
@IjzerenHein good job, i have tried your solutions and works fine, would you mind submit a pr ? |
@gorhom Done! 👊 |
Summary: This PR fixes a crash when opening the Performance Monitor on iOS 13.4. Detailed info: #28414 ## Changelog `[iOS] [Fixed] - Fix crash when enabling Performance Monitor on iOS 13.4` ## How This PR prevents the JavaScriptCore option from being set altogether. This ensures that the performance monitor keeps working, but on iOS 13.4 and higher, it will no longer crash trying to show the GC usage. Pull Request resolved: #28512 Test Plan: Tested on iOS 13.4 (simulator): ![image](https://user-images.githubusercontent.com/6184593/77903803-c6370c00-7283-11ea-8b71-b6b6546c82f6.png) Tested on iOS 13.1 (simulator) ![image](https://user-images.githubusercontent.com/6184593/77903499-41e48900-7283-11ea-9d14-83f67a3b7b77.png) - Verified that the `setOption` was called, but the Performance Monitor didn't show any GC usage regardless. - Identical PR expo#21 has been shipped and tested in Expo Client 37 Fixes #28414 Reviewed By: PeteTheHeat Differential Revision: D20851131 Pulled By: TheSavior fbshipit-source-id: ff96301036e8487db59f95947bbe6841fe230e1e
Summary: This PR fixes a crash when opening the Performance Monitor on iOS 13.4. Detailed info: facebook#28414 ## Changelog `[iOS] [Fixed] - Fix crash when enabling Performance Monitor on iOS 13.4` ## How This PR prevents the JavaScriptCore option from being set altogether. This ensures that the performance monitor keeps working, but on iOS 13.4 and higher, it will no longer crash trying to show the GC usage. Pull Request resolved: facebook#28512 Test Plan: Tested on iOS 13.4 (simulator): ![image](https://user-images.githubusercontent.com/6184593/77903803-c6370c00-7283-11ea-8b71-b6b6546c82f6.png) Tested on iOS 13.1 (simulator) ![image](https://user-images.githubusercontent.com/6184593/77903499-41e48900-7283-11ea-9d14-83f67a3b7b77.png) - Verified that the `setOption` was called, but the Performance Monitor didn't show any GC usage regardless. - Identical PR expo#21 has been shipped and tested in Expo Client 37 Fixes facebook#28414 Reviewed By: PeteTheHeat Differential Revision: D20851131 Pulled By: TheSavior fbshipit-source-id: ff96301036e8487db59f95947bbe6841fe230e1e
This is crashing at React Native 0.60.4 , is this only fixed at latest version of react native? |
Description
Opening the Performance Monitor causes a crash as of iOS 13.4
React Native version:
Steps To Reproduce
Expected Results
Shows Performance Monitor; and doesn't crash.
Additional info
I've debugged the issue and seem to have found the problem. JavaScriptCore has been updated in iOS 13.4 and it seems it is no longer possible to set the JavaScript Core options after initializing the VM.
The
RCTJSCSetOption
function now causes anEXC_BAD_ACCESS
exception. ThesetOption
function is resolved correctly but when calling it, it throws the exception. I've debugged the assembly and providing invalid values (logGC2=1
andlogGC=3
) do not produce a crash. So it doesn't appear to be a parsing issue, and the crash seems to occur when actually updating the option to1
.After inspection on the JavaScriptCore code it was found that the JavaScriptCore options can no longer be changed after the VM was initialized.
https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/runtime/OptionsList.h#L74
https://raw.githubusercontent.com/WebKit/webkit/master/Source/JavaScriptCore/ChangeLog
The text was updated successfully, but these errors were encountered: