amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
545 stars 346 forks source link

ArgumentNullException on iOS when going into background #712

Closed drgarrison2 closed 4 years ago

drgarrison2 commented 4 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

The user cannot tell the application has crashed until they resume the application and it starts at the splash screen.

EXPECTED BEHAVIOR

Would expect the app not to crash and resume at the map when the user brings the app back into the foreground.

2020-05-16 12:18:31.346 beonshell.iOS[3924:1594229] System.ArgumentNullException: Value cannot be null. Parameter name: enumerable at Xamarin.Forms.Internals.EnumerableExtensions.IndexOf[T] (System.Collections.Generic.IEnumerable`1[T] enumerable, T item) [0x00003] in :0 at Xamarin.Forms.Application.OnRequestedThemeChanged (Xamarin.Forms.AppThemeChangedEventArgs args) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Application.cs:172 at Xamarin.Forms.Platform.iOS.PageRenderer.TraitCollectionDidChange (UIKit.UITraitCollection previousTraitCollection) [0x00021] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:373 at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:86 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:65 at beonshell.iOS.Application.Main (System.String[] args) [0x00002] in /Users/davegarrison/Projects/beonshell/beonshell.iOS/Main.cs:19

HOW TO REPRODUCE

iPhone XR iOS 13.x

  1. Xamarin Shell App with ContentPage using a grid with Map
  2. Launch App
  3. Swipe up from bottom to send app into background.
// code for reproduce
Dexus commented 4 years ago

This error comes from the Xamarin.Forms and should be fixed by now with the last update.

drgarrison2 commented 4 years ago

This error comes from the Xamarin.Forms and should be fixed by now with the last update.

Thanks - Xamarin.Forms 4.6.0.8 did indeed fix the problem.