Open kaniosm opened 18 hours ago
Could you provide us with a sample project so we can investigate it further? Looking forward to your reply!
Might be relative to #25762.
Thanks @eerojaaskelainen, It seems that the issue is indeed the same, but it's not happening all times. In my case I noticed that it always happens whenever I open the map while the user location is still running, but I faced the same under different conditions that are more difficult to replicate.
I'll try to to reproduce this in a clear project and post here. As commented on the other post, I believe it has to do with the cast of the user location to IMKAnnotation by looking at this from the original source.
// https://bugzilla.xamarin.com/show_bug.cgi?id=26416 var userLocationAnnotation = Runtime.GetNSObject(annotation.Handle) as MKUserLocation;
Description
After updating to .NET 9 (MAUI 9.0.10) whenever opening my customized map control while the app is still looking for the GPS location the app crashes with the below error: NativeHandle Registrar_Callbacks__.callback_1320_MapKit_MKMapViewMKMapViewDelegate_GetViewForAnnotation(IntPtr pobj, IntPtr sel, IntPtr p0, IntPtr p1, IntPtr* exception_gchandle). The same was not happening in .NET 8. This is happening only in release mode.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
9.0.10 SR1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.100 SR10
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output