Open DanielLavrushin opened 3 years ago
are u trying with Hot Restart?
Im having same or similar issue. And from what Ive read on Xamarin.Forms.Maps, iOS 14 changed some callback methods and is causing the crash. Try this fix too. https://forums.xamarin.com/discussion/185275/xamarin-4-8-apps-crashing-with-xcode-12-and-ios14
I think I am having a similar issue although I am able to start the app. No way to work it around with the proposed solution. Working great on simulator though.
When ever I am showing a map on Iphone device iOS 14+ it shows a full black screen. I was able to catch this stacktrace once:
[0:] An error occurred: 'Object reference not set to an instance of an object.'. Callstack: ' at Xamarin.Forms.GoogleMaps.iOS.MapRenderer.UpdateIsShowingUser (System.Nullable`1[T] initialMyLocationButtonEnabled) <0x117b47e88 + 0x0007a> in <c613a8dd57764697aab63c2c7c8919d7>:0
at Xamarin.Forms.GoogleMaps.iOS.MapRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) <0x117b34818 + 0x002d0> in <c613a8dd57764697aab63c2c7c8919d7>:0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00172] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:296
at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:158
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:227
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:115
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:49
at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x0012e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:283
at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:158
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:227
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:115
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:49
at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x0008f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:237
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr)
at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.4.1.3/src/Xamarin.iOS/UIKit/UIViewController.g.cs:3267
at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:103
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:119
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:227
at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:376
at Xamarin.Forms.Platform.iOS.NavigationRenderer.OnPushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x0001d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:352
at Xamarin.Forms.Platform.iOS.NavigationRenderer.<ViewDidLoad>b__47_0 (Xamarin.Forms.Page p) [0x00024] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:239
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
at (wrapper delegate-invoke) <Module>.invoke_void_object(object)
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.4.1.3/src/Xamarin.iOS/Foundation/NSAction.cs:178
--- End of stack trace from previous location where exception was thrown ---
Now I am still getting the black screen but I can't manage to raise this exception again. From the output window everything looks working great.. Can anyone help?
@Davidoutz are u using iOS Hot Restart?
@themronion sorry I didn't see, thanks for quick reply btw. Yes I am using hot restart. Shall I disable it ? (I can try in a couple hours I don't have access to the device atm)
@Davidoutz the library won't work with hot restart, after u try building the app on a mac like before everything will be fine
Hi, I have the following issue in an almost default project (including the example one from the repository). It is failing when deploying to IOS (in my case iPhone phisical device). The app is trying to start but then crashes to the OS. Visual Studio does not catch the break point.
In the output window I get this:
First, I tried on my local project. After, I decided to get the source code of the googlemaps libray from git hub and debug it. It breaks in the MapRenderer.cs
Apparently the native Google.Maps.MapView.Settings is null here. I am not sure what exacly am I doing wrong, but the same library works perfect in Andoid version. It only fails in IOS.
I have set up API keys and API on google developer console.
Visual Studio Version 16.7.7 IOS 14.1 Xamarin.iOS 14.2.0.12 I also tried the standard xamarin google maps lirary and it works fine (it just miss many features comparing to Xamarin.Forms.GoogleMaps).
Any ideas what is wrong here?