Xamarin.iOS应用程序在iOS 13上冻结

问题描述 投票:1回答:1

我有Xamarin Native(iOS / Android)应用程序。该应用程序可以在iOS 12及更低版本上正常运行。如果您在装有iOS 13的设备上运行该应用程序,则由于未知原因它会开始冻结,并且此bug没有明确的重现步骤,它会出现在不同的屏幕上。

这是Visual Studio Mac版的堆栈跟踪

=================================================================
    Native Crash Reporting
=================================================================
Got a SIGSEGV 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:
=================================================================
    0x1003ea775 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_dump_native_crash_info
    0x1003de6b5 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_handle_native_crash
    0x1003f19f1 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_sigsegv_signal_handler_debug
    0x10790bb1d - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x111ab5e38 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : OBJC_CLASS_$_UIView
    0x122711c6b - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZNSt3__110shared_ptrIN3ggl6BufferEED2Ev
    0x1227397f3 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZNSt3__110shared_ptrIN3ggl12ConstantDataEED2Ev
    0x122c98778 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZNSt3__113__vector_baseIN3ggl19ConstantDataElementEN3geo12StdAllocatorIS2_NS1_9AllocatorEEEED2Ev
    0x122c9850c - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZN3ggl13PipelineSetupD2Ev
    0x1227b3d24 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZN3ggl6Circle17FillPipelineSetupD0Ev
    0x122b3059d - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZNSt3__120__shared_ptr_emplaceIN2md23CircleOverlayRenderableENS_9allocatorIS2_EEE16__on_zero_sharedEv
    0x12281c40b - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : _ZNSt3__110shared_ptrIN2md23CircleOverlayRenderableEED2Ev
    0x1068eff02 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class
    0x1068ff3c9 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : objc_destructInstance
    0x10690598f - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : -[NSObject dealloc]
    0x122b2eb22 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/VectorKit.framework/VectorKit : -[VKVectorOverlayCircle dealloc]
    0x106906116 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZN11objc_object17sidetable_releaseEb
    0x1068eff02 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class
    0x1068ff3c9 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : objc_destructInstance
    0x10690598f - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : -[NSObject dealloc]
    0x101d63e52 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/MapKit.framework/MapKit : -[MKOverlayRenderer dealloc]
    0x101d63d9b - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/MapKit.framework/MapKit : -[MKOverlayPathRenderer dealloc]
    0x106906116 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZN11objc_object17sidetable_releaseEb
    0x100640abd - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : xamarin_release_managed_ref
    0x12a596bbc - Unknown
    0x132b427b9 - Unknown
    0x1003f4dd5 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_jit_runtime_invoke
    0x1005210e7 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_runtime_invoke_checked
    0x100524a6e - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_runtime_invoke
    0x10064a822 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : xamarin_invoke_trampoline
    0x10065257b - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : xamarin_arch_trampoline
    0x100653782 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : xamarin_x86_64_common_trampoline
    0x100dd0d10 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : __NSThreadPerformPerform
    0x105b2e271 - /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_SOURCE0_PERFORM_FUNCTION_
    0x105b2e19c - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopDoSource0
    0x105b2d974 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __CFRunLoopDoSources0
    0x105b2867f - /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
    0x105b27e66 - /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
    0x10ca74bb0 - /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
    0x110d41dd0 - /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
    0x12a4abae2 - Unknown
    0x12a4ab833 - Unknown
    0x12940fae3 - Unknown
    0x12940ffb9 - Unknown
    0x1003f4dd5 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_jit_runtime_invoke
    0x1005210e7 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_runtime_invoke_checked
    0x10052756c - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_runtime_exec_main_checked
    0x100354a22 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : mono_jit_exec
    0x100651a1e - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : xamarin_main
    0x10030f4a7 - /Users/konstya.gerasymenko/Library/Developer/CoreSimulator/Devices/95B31EC1-0A24-474B-858E-024385DE8FFA/data/Containers/Bundle/Application/216D0956-E0D0-40AD-A6F0-838AE3A49926/MyAppiOS.app/MyAppiOS : main
    0x107528d29 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
    0x3 - Unknown

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x122cb448d):0x122cb447d  48 8b 7f 08 48 85 ff 74 13 48 8b 73 10 48 8b 07  H...H..t.H.s.H..
0x122cb448d  ff 50 10 b8 ad ba ad de 48 89 43 10 48 83 c4 08  .P......H.C.H...
0x122cb449d  5b 5d c3 55 48 89 e5 53 50 48 89 fb 48 8d 05 90  [].UH..SPH..H...
0x122cb44ad  f2 29 00 48 89 07 48 8b 7f 08 48 85 ff 74 0a 48  .).H..H...H..t.H

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at Foundation.NSObject:xamarin_release_managed_ref <0x000cb>
      at Foundation.NSObject:ReleaseManagedRef <0x0007a>
      at NSObject_Disposer:Drain <0x00392>
      at <Module>:runtime_invoke_void_object <0x001a8>
      at <unknown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00251>
      at UIKit.UIApplication:Main <0x000b2>
      at UIKit.UIApplication:Main <0x00132>
      at MyApp.iOS.Application:Main <0x00202>
      at <Module>:runtime_invoke_void_object <0x001a8>
=================================================================

首先想到的是处置某些NSObject的问题(可能会发生内存泄漏),但是很奇怪的是,此问题不会在具有较低iOS版本的较慢的设备上重现。

[请告诉我是否有人遇到类似问题。是否有关于问题根源的任何假设?

ios xamarin xamarin.ios freeze ios13
1个回答
0
投票

我发现了此错误的原因,并且与处置MKMapView有关。在显示地图的几个屏幕上,我向地图添加了Overlays(MKCircle)和OverlayRenderers(MKCircleRenderer),并引用了私有变量中包含的Overlays和OverlayRenderers。因此,主要问题是在屏幕处置期间仅处置了map(MKMapView)对象,而不处置了引用map Overlay和OverlayRenderer的私有变量。在添加了对这些变量的显式处理后,此错误已消失。

© www.soinside.com 2019 - 2024. All rights reserved.