amay077 / Xamarin.Forms.GoogleMaps

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

After a recent update my app crashes when trying to show a map.... #786

Open john-dalsgaard opened 2 years ago

john-dalsgaard commented 2 years ago

Not sure if it is after the latest Xcode updates - but I have a suspicion...

This happens in the iOS simulator. Just commenting out the map in the XML and it runs without crashing.

It just crashes with something like this:

=================================================================
    Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x10f576a65 - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : mono_dump_native_crash_info
    0x10f56ae8e - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : mono_handle_native_crash
    0x10f57ddab - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : mono_sigsegv_signal_handler_debug
    0x125213e2d - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x0 - Unknown
    0x16dd32195 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/libGLProgrammability.dylib : glvmInterpretFPTransformFour
    0x16d23d986 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/GLRendererFloat.bundle/GLRendererFloat : gldLLVMFPTransform2x2
    0x16d23cce7 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/GLRendererFloat.bundle/GLRendererFloat : gldMergeScanlines2x2
    0x16d2520c4 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/GLRendererFloat.bundle/GLRendererFloat : gldLLVMVecPolyRender
    0x16d23a540 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/GLRendererFloat.bundle/GLRendererFloat : gldRenderFillPolygonPtr
    0x1736ea16e - Unknown
    0x16d0c66f7 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/GLEngine.bundle/GLEngine : gleFlushAtomicFunc
    0x16d11310d - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/GLEngine.bundle/GLEngine : glDrawElements_IMM_ES2Exec
    0x10f0f2c83 - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : _ZN7gmscore8renderer8GLEntity4DrawEPNS0_14EntityRendererEPNS0_9RenderBinERKPKc
    0x10f0f7360 - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : _ZN7gmscore8renderer9RenderBin11PerformDrawINSt3__121__tree_const_iteratorINS_4base10reffed_ptrINS0_10BaseEntityEEEPNS3_11__tree_nodeIS8_PvEElEEEEvT_SE_PNS0_14EntityRendererEb
    0x10f1b07cd - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : _ZN7gmscore6vector22GMSVectorTileRenderBin4DrawEPNS_8renderer14EntityRendererE
    0x10f0f0a4a - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : _ZN7gmscore8renderer14EntityRenderer4DrawEb
    0x10f17c77c - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : -[GMSPhoenixRenderer drawForced:]
    0x10f161780 - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : -[GMSEntityRendererView draw]
    0x10f1abd80 - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : -[GMSVectorMapView draw]
    0x10f15fe76 - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : -[GMSEntityRendererView displayLinkFired:]
    0x10f15ee9f - /Users/jda/Library/Developer/CoreSimulator/Devices/8C2837C8-72C2-4B79-B4AD-D3FD28EC35A6/data/Containers/Bundle/Application/DF77A01C-FC0A-41B4-A827-9055A922D1B4/Angler.iOS.app/Angler.iOS : -[GMSDisplayLink displayLinkFired:]
    0x1202bc474 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/QuartzCore.framework/QuartzCore : _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy
    0x1203bb9c6 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/QuartzCore.framework/QuartzCore : _ZL22display_timer_callbackP12__CFMachPortPvlS1_
    0x112afcb42 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFMachPortPerform
    0x112b31125 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
    0x112b304cc - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopDoSource1
    0x112b2a901 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopRun
    0x112b29a90 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
    0x1256c1c8e - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal
    0x13a65190e - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : -[UIApplication _run]
    0x13a656569 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
    0x168cacf85 - Unknown
    0x168cac753 - Unknown

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x16dce38b9):0x16dce38a9  00 48 8b 7d d0 48 8d 5f 08 c7 45 b8 00 00 00 00  .H.}.H._..E.....
0x16dce38b9  44 8a 27 44 8a 33 41 83 f8 06 0f 87 eb 06 00 00  D.'D.3A.........
0x16dce38c9  44 89 ef 21 cf 66 0f ef c0 44 89 c0 48 8d 1d 1c  D..!.f...D..H...
0x16dce38d9  21 00 00 48 63 04 83 48 01 d8 ff e0 40 0f b6 c7  !..Hc..H....@...

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00254>
      at UIKit.UIApplication:Main <0x00172>
      at Angler.iOS.Application:Main <0x00092>
      at <Module>:runtime_invoke_void_object <0x001a8>
=================================================================

Anyone else seeing this - and have ideas to solve it?

I have not made any changes to this code - so it is something "around" the project i.e. development tools

JPZV commented 2 years ago

Not sure if related, but I have a similar issue with Xamarin.Google.iOS.Maps v6.0.1. The only workaround for me is to install Xamarin.Google.iOS.Maps v3.9.0 aside of Xamarin.Forms.GoogleMaps v3.3.0

john-dalsgaard commented 2 years ago

Interesting. I tried to upgrade Xamarin.Google.iOS.Maps from v.3.9 to 6.0.1 - but then it cannot build...

This is my map code:

<maps:Map  InitialCameraUpdate="{Binding InitialCameraUpdate,Mode=OneWay}"
                    MapType="{Binding MyMapType, Mode=OneTime}">
    <maps:Map.Behaviors>
        <bindings:BindingPinsBehavior Value="{Binding Pins}"/>
        <bindings:AnimateCameraBehavior Request="{Binding AnimateCameraRequest}"/>
        <bindings:InfoWindowClickedToCommandBehavior Command="{Binding PinClickedCommand}" />
    </maps:Map.Behaviors>
</maps:Map>

If I remove the InitialCameraUpdate then it doesn't crash - but obviously place the map in a wrong place..

myonlinegolfclub commented 2 years ago

I am experiencing the same issue whereby the app crashes when the map is shown on iOS. It happens on the simulator and on a physical device.

I am using Xamarin.Forms.GoogleMaps 3.3.0 and Xamarin.Google.IOS.Maps 3.9.0 on an iPhone 13 running iOS 15.5. I have tried updating to version 6 but that stops the project from building.

I am running the solution from my MacBook Pro using Visual Studio for mac:

image

I am not currently able to publish my app. Please help! Thanks. Everything was working until recent updates, no code has changed.

themronion commented 2 years ago

@myonlinegolfclub Try my nuget - posted here https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/784#issuecomment-1040305197, or try my MAUI version, i have a feeling it will work with XF as well https://www.nuget.org/packages/Onion.Maui.GoogleMaps/5.0.0-alpha1