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-2417] Crash in IndexPath._unconditionallyBridgeFromObjectiveC in UICollectionView #45022
Comments
Xcode 8.0 beta 6 (8S201h). tvOS. I could only see this one when UICollectionView prefetching is enabled. |
Can you attach your project, or a smaller test case? (It's also possible you're being passed |
I've attached a sample project, see IndexPathBridgeCrash.zip.
|
It looks like a UIKit bug. The index path is nil, but I'm not sure why. Do you want to file the Radar, so that you can track when it's fixed, or would you like me to do it? |
Filed Radar 27981831 |
Thanks. I'm going to close this, since there's not much we can do on the Swift side. |
Comment by Ryan Grier (JIRA) @bobergj Can you post your radar to open radar? I'd love to file a dup. I am running into this same issue. I've experienced a very similar crash log without prefecting enabled. |
Comment by Koushik Karmakar (JIRA) I'm facing a similar issue in UITableView |
Please file a Radar for each mis-annotated API you find. There's also an Xcode 8.1 release note that demonstrates how you can work around this sort of issue. |
Comment by Christophe Braud (JIRA) I guest you can reopen this ticket. My environment:
My application crash randomly for some users on: |
Again, this is a UIKit bug, and not something we can fix in Swift. Please file a Radar for each mis-annotated API you find—in this case, tableView(_:cellForRowAt:). |
Comment by Tom Kraina (JIRA) I have just run into a similar issue. Is there a workaround? |
The workaround is usually just to write a wrapper function in Objective-C, which isn't a great answer. There's an example of how to handle return values or callbacks buried in the Xcode release notes. See https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW10. |
Comment by Tom Kraina (JIRA) Thanks. What worked for me is just to define the indexPath parameter as optional. The method gets called correctly with nil without crashes. For more info see https://openradar.appspot.com/31375101 |
Comment by Viktor Shurapov (JIRA) tomkraina (JIRA User) Thank you so much![]( Your idea with optional indexPath works great)! :-) |
Attachment: Download
Additional Detail from JIRA
md5: 6878f5e47575efe69a535677c3bf1d7d
relates to:
Issue Description:
I get the crash in
The text was updated successfully, but these errors were encountered: