Open jtorvald opened 2 years ago
A bit more info: after the crash I directly see this in de device output:
2022-04-04 21:19:09.077973+0200 MyApp.iOS[34052:341665] Xamarin.iOS: Unable to locate assembly 'MyApp.resources' (culture: 'es-ES')
2022-04-04 21:19:09.090994+0200 MyApp.iOS[34052:341665] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N10__cxxabiv116__shim_type_infoE, id, N10__cxxabiv117__pbase_type_infoE.
This was posted 2 days ago by someone else about something iOS native, so maybe it has to do with some iOS change in recent version? https://developer.apple.com/forums/thread/703309
@jtorvald, Could you attach a small repro?
@pictos I'm trying to reproduce in a separate repo, but guess what: it works there. I will dig a bit deeper this week to see if I can find the cause.
Thank you @jtorvald
@pictos After hours of debugging to see what changed I came to the point where the crash happens because of a TabView being used in an active page in shell (not the current page but still in the background). Not sure how relevant but that tabview is used within a StateView.
In the sample project I use now the culture change works, but that is probably because it happens on the same page. So I would need to create a separate settings screen there in the same way to see if I can reproduce the error then. No time for that at this moment so... to be continued.
@jtorvald no problem, take your time. I can there's a lot of elements in the equation, having a repro will help a lot, thanks for moving this forward
@jtorvald Have you been able to solve this issue?
Description
When using XCT with LocalizationResourceManager I get weird crashes when I set a new culture on language switch in the settings page: LocalizationResourceManager.Current.CurrentCulture = cult;
When I restart the app, the same line is used on App startup and then I see the correct language. This worked before.
All the latest libraries and iOS version. Will test later on Android and with a test project.
Stacktrace
In App center I see this, not sure if it's related: