JavaScriptCore Crashed in iOS17 and above system

After the release of iOS17, our app has collected JavaScriptCore crashes, and the crash has recently appeared in iOS17 and above. The number of crashes collected recently is increasing.

The following are several complete crash log information. Currently, crashes are only collected on iOS17 and above systems.

Do you have any JSON crash reports (.ips) for this? If so, please post an example here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

These .crash crash logs are crash logs of online users exported from XCode. These are logs collected by Apple. We do not have .ips crash logs

So you’re getting the crash reports from the Xcode organiser?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Sorry I didn’t respond earlier. I missed your reply because it’s in the comments. I recommend that you reply as a reply. See Quinn’s Top Ten DevForums Tips for this and other titbits.

Thanks for that download link. Unfortunately I’m not sure how to use it. When I follow the link it requests a user name and password, and you only provided the password.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Can we send you relevant information via email?

Can we send you relevant information via email?

I tried to avoid doing official business via my individual email address.

A better option is to create a DTS code-level support request and supply the info that way. Once I have that, we can continue the discussion here in the forums. When you create the request, indicate that you were referred by someone at Apple and make sure to include a link to this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Or you can download from this link: https://storage.jd.com/animation/CLQ6w-o7pljWK5eiTPbbZY.xccrashpoint.zip

Thanks. Unfortunately there aren’t any .ips files lurking in there, which limits my ability to look at this further )-: [1]

Based on the crash reports it’s clear that JavaScriptCore is triggering a memory access exception. Are you calling it directly? Or using it via some sort of web view?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] To be clear, that’s an Apple internal issue, nothing to do with you.

The web pages in the app is loaded using WKWebView. There are also scenarios where JavaScriptCore is used to call this method:

  • (JSValue *)callWithArguments:(NSArray *)arguments;

Can you clarify that second bit. The -callWithArguments: method is on JSValue. Where do you get that value from? Or, more specifically, where do you get the JavaScriptCore context from which that value was derived?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Use the JavaScriptCore library to parse the jsvalue obtained from the js file. Is this crash related to wkwebview loading html? Will it crash due to the js code in the h5 page?

I was hoping to get an answer to this question:

where do you get the JavaScriptCore context from which that value was derived?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

We use the JavaScriptCore library to interact with WebView and JS, such as this code: NSString *js = @"function add(a,b) {return a + b}"; [self.jsContent evaluateScript:js]; JSValue *jsValue = [self.jsContent[@"add"] callWithArguments:@[@2,@3]]; jsValue obtained here

So, in your snippet, it looks like self.jsContent is of type JSContext *. Is that right?

If so, how do you initialise that?

ps When you post code snippets, it’s best to use a code block. See Quinn’s Top Ten DevForums Tips for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

JavaScriptCore Crashed in iOS17 and above system
 
 
Q