-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
iOS 15/Xcode 13: Crash with RxTableViewDataSourceProxy #2368
Comments
We are also running into this issue on a production app, which is preventing us from using Xcode 13/iOS 15 SDKs. We are currently working around it by manually removing any calls to UITableView Rx extensions that access the datasource e.g. What would be nice however is for these methods to fail gracefully on the iOS 15 SDK instead of crashing the app, since no warnings are raised at compile time. I noticed that Apple's documentation for (oh also all of this applies to the equivalent |
This is interesting since we're using iOS 15 with this in production and I'm not seeing any crashes around this. Thanks! |
Hi @freak4pc! The code snippet @Kn1kt posted above is sufficient to trigger the crash, but I have made an example project as requested: https://github.com/hatched-cory/RxSwiftDiffableCrash Running on Xcode 13 in an iOS 15 sim (I'm using 13 Pro) is enough to repro I believe the crash occurs when RxSwift/Cocoa tries to install its datasource proxy after the UITableViewDiffableDataSouce has been setup. |
Oh, actually this is the first time I've noticed this warning. This seems to be the main reason for this crash. I wonder if this can be fixed, because |
After scanning the RxSwift code I kind of came to that conclusion as well. There might not be an elegant way for Rx to perform its necessary magicks when these datasources are in use. But I am not intimately familiar with the codebase, nor all the UIKit trickery. At the very least I'd love a more graceful fail state instead of a surprise runtime crash, though. |
@freak4pc Hey guys, any updates on this issue? |
Thanks for the repro. Unfortunately I don't think there's anything we can do with this specific case (i.e. using It seems to perform some sort of a hostile takeover on the delegate and data source - seems like everything is working fine if I simply use RxDataSources or vanilla UITableViewDelegate & UITableViewDataSource. I won't have time to look into this soon, unfortunately, but am happy to accept a PR if someone wants to debug this further. I'm keeping this open so I can come back to it if I can find some free time. Thanks! |
thanks @freak4pc appreciate your hard work on the library :) it is indeed tricky and for now we are just avoiding |
Closing this for now since this isn't something we can do much about. |
Has this issue been resolved? Xcode 14 The same problem occurs. |
Short description of the issue:
In iOS 15 setting some UITableViewDiffableDataSource as UITableView datasource leads to terminating app due to uncaught exception, when trying to acess to
.rx.dataSource
Expected outcome:
It works as expected on iOS 13 and 14
What actually happens:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RxCocoa.RxTableViewDataSourceProxy _subclassOverridesMethodWithSelector:]: unrecognized selector sent to instance ...'
Self contained code example that reproduces the issue:
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
RxSwift 6.2.0
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
Installation method:
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
The text was updated successfully, but these errors were encountered: