-
Notifications
You must be signed in to change notification settings - Fork 493
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
Persistent crash on launch when running in iOS 14.4 simulator on M1 Mac #4140
Closed
Milestone
Comments
Johennes
added a commit
to Johennes/matrix-ios-sdk
that referenced
this issue
Mar 24, 2021
Due to a Simulator bug on the Apple M1, `UTTypeCreatePreferredIdentifierForTag` can unexpectedly return `NULL`. This causes a crash because the return value is later passed into `CFRelease` which explicitly disallows `NULL` arguments. This commit fixes the issue by ensuring the return value is not `NULL` before proceeding. Fixes: element-hq/element-ios#4140 Signed-off-by: Johannes Marbach <[email protected]>
Johennes
added a commit
to Johennes/matrix-ios-sdk
that referenced
this issue
Mar 24, 2021
Due to a Simulator bug on the Apple M1, `UTTypeCreatePreferredIdentifierForTag` can unexpectedly return `NULL`. This causes a crash because the return value is later passed into `CFRelease` which explicitly disallows `NULL` arguments. This commit fixes the issue by ensuring the return value is not `NULL` before proceeding. Fixes: element-hq/element-ios#4140 Signed-off-by: Johannes Marbach <[email protected]>
Merged
3 tasks
ghost
mentioned this issue
Aug 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The app continuously crashes when trying to cache room avatars on launch in the iOS 14.4 simulator on an M1 Mac.
To Reproduce
#element-ios:matrix.org
)Expected behavior
App does not crash.
Screenshots
Smartphone (please complete the following information):
develop
branchAdditional context
The crash occurs in MXTools when calling
CFRelease
on aNULL
pointer (which is documented behavior).The
NULL
pointer is returned fromUTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, mimeType, NULL)
and calling that function is accompanied with an error logged in the console:This might be a simulator bug on the M1 (see e.g. here). Nevertheless, the return value should be checked to avoid releasing a null pointer.
The text was updated successfully, but these errors were encountered: