-
Notifications
You must be signed in to change notification settings - Fork 10.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
Printing an NSError casted to Error results in a crash thrown by JSONSerialization. #59804
Comments
|
I was wrong. |
@HellotalkXJP Can you provide a self-contained test case? Reproducing this with so much omitted is going to be guesswork. |
@coppercash Can you provide a very small (one ObjC file, one Swift file) project that reproduces this? There are already some checks in the runtime to detect cases like this and print out nice error messages before crashing, and I'd like to see if we should add more for this particular issue. |
Sure. The stack I get from it:
Some nice error messages would definitely be lovely. |
@mikeash Should |
That would probably be a good idea. I don't think this function is called so often that the overhead of a NULL check would matter, and a better crash would be useful. |
Describe the bug
To Reproduce
Occasionally on iOS15.4.0
Environment (please complete the following information):
Additional context
![image](https://user-images.githubusercontent.com/37888366/176582583-1ccc2f38-04f4-46fd-9821-ca059b5a2b0e.png)
The text was updated successfully, but these errors were encountered: