-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Fix reflection-related iOS crashes #29992
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dear lord.
so long as it works i guess (i can't test, obviously)
One sec - I found another case. |
False alarm... My files became out of date during some more iOS testing. |
For every new usage of realm, we will need to keep in mind that custom handling will be necessary to allow iOS to work, yeah? This seems absolutely fucked and bound to fail sooner or later (but I guess we just have to live with this?) I'd also want the changes in this PR do have loud inline comments in each case. Because the chance of it getting changed without realising it will break iOS is high (and we have no automated coverage of this). |
Honestly I see it as not that different from every single mono-related explosion after we used a new language feature in an unrelated change. See ppy/osu-framework#6162, ppy/osu-framework#5571, etc. |
Yeah I get that. I'm just disgruntled each time. There's not much we can do without having runtime tests running on iOS (probably not worth it yet). I think deploying working to app store and relying on testflight testing is best. |
I agree. I will be trying to isolate and report this to .NET, and will revert at least the Realm-related changes if it gets fixed. It's definitely a bug. |
This is one half of the fixes required to get iOS to run.
The crashes can be reproed on device or simulator by running in Release configuration (with
<MtouchUseLlvm>false</MtouchUseLlvm>
to reduce compile time, but also fails without it), and trying to do certain actions:DoubleTime
,ModAccuracyChallenge
,ModDifficultyAdjust
).All these cases are fixed with this change. Additional to the above, I've also tested the following extra scenarios:
The stack trace always ends up in some sort of reflection
This would be a .NET/Mono regression, but I haven't isolated/reported it yet. The bindable-related commit lends perhaps a hint as to why this is happening - in the case of
IBindable<>
, the interface can be implemented multiple times on leaf objects so the runtime is unsure which property to resolve, even if there is only one matching implementation in the leaf type.I gather similar is happening with
IHasOnlineID<>
leading to the Realm issue, though in that case (and because it's the first issue I resolved) I've taken a sledgehammer to it by avoiding any inner references.The bindable change can continue existing going into the future, because, while it's not trying to cover for every possible use-case ever, it's also adding a bit of safety for truly undefined scenarios.
I will be reporting the issue later, time-provided.