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
[SR-9256] Crash on 32-bit iOS Devices #51736
Comments
Looks like it's crashing while hashing a string as part of doing a dictionary subscript. Can you share the code around the last stack frame in your code, and describe where the keys in that dictionary come from? (Sharing on Radar is perfectly fine, of course, if you don't want to show the world.) |
Comment by Michael McGuire (JIRA) I've attached the source code for the various files involved in the first 5 or so crashes. The |
After looking at the crash logs more thoroughly, it looks like some sort of general memory corruption but I don't have much in the way of specifics. A lot of the crashes happen when it gets a bad class pointer out of an object. Unfortunately I haven't been able to figure out what might be causing it. Any luck with a reduced example? |
Comment by Michael McGuire (JIRA) @mikeash Not yet, but we're still working on it! Hopefully should have something soon. |
Comment by Justin Swart (JIRA) Hi, are there any ways we could attempt to workaround this? We are also experiencing a high number of `outlined copy of Optional?` crashes on iOS 9.x and 10.x devices since updating to Swift 4.2. |
I don't understand the crash well enough to recommend anything yet. If you'd like to attach whatever crash logs and source code you can, it might be useful to compare with the ones reported by Michael. Please feel free to attach them to a radar as Michael has done if you don't want to share them here. |
Comment by Justin Swart (JIRA) Thanks for the reply, Mike. I've attached a crash log for this. Fortunately our codebase is open-source, so here are a few links to relative source files: Crash entry-point: https://github.com/kickstarter/ios-oss/blob/master/Library/ViewModels/DiscoveryPageViewModel.swift#L157 Struct in question: https://github.com/kickstarter/ios-oss/blob/master/KsApi/models/Project.swift Will provide more info as we find it! |
Comment by Justin Swart (JIRA) Further investigation proved that this is our problematic enum: https://github.com/kickstarter/ios-oss/blob/master/KsApi/lib/Route.swift and breaking it up into smaller enums helped to prevent the crash. Although this does feel like an awkward workaround. |
Awkward indeed. That is extremely valuable information, though! |
Comment by Justin Swart (JIRA) Good! Hope it proves useful. Something else I should mention is that although we've been discussing it on this thread, SR-8950 actually seems exactly like the crash we are having. |
Thanks for the pointer. If it is indeed the same problem then that would be great, since it has a simple test case. |
Comment by Michael McGuire (JIRA) @mikeash Hope you had (are having?) some great time off for the holidays! A colleague of mine spent some time removing most of the code from our application to create a reproduction we could sent to you. He uploaded it as #46878694 to Bug Reporter. Let me know if there's anything else we can do to help! |
MonocularVision (JIRA User) Thanks! I took some extra time off and am now getting back into things. It looks like that bug got assigned to someone else in the meantime and is working through. I'll keep an eye on it. Having a reproducer should help enormously, thanks very much for doing that. Hopefully we can figure it out. |
Guess I did a poor job of keeping an eye on it. This was fixed in Xcode 10.2. |
Attachment: Download
Environment
iOS 10.3.x+
32-bit Devices (iPhone 5, iPhone 5C, iPad 4)
Xcode 10.0 (10A255)
Swift 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Additional Detail from JIRA
md5: 9ebc60515fece58cf93f5b337ec1e4b8
Issue Description:
After upgrading to Xcode 10.0 (10A255) with Swift 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1), we are experiencing a large number of crashes on 32-bit devices (iPhone 5, iPhone 5C and iPad 4) running iOS 10.3.x. We only support iOS 10 and up so these are the only 32-bit devices in our user base.
I'm unable to attach the crash reports here, but I've created a radar #46076755 with the crash reports. The crashes are not identical but share a lot of commonalities and a similar set of calls are in the stack. We are able to reproduce these crashes.
While I cannot send our entire project, I can attach requested source files to the Radar if that would help. I'm working on trying to reduce the problem down to a smaller project but wanted to get this opened ASAP.
The text was updated successfully, but these errors were encountered: