使用 Instruments Allocation 时 iOS 应用程序冻结

问题描述

当我想使用 Instruments Allocation 来分析我的应用程序的内存使用情况时,它在启动后立即冻结。它总是停留在启动屏幕(这是一个 Xamarin.forms 应用程序)。

截图如下:

enter image description here

其他信息

如果我创建一个新项目然后使用 Instruments Allocation,它只有在我将我的应用程序发布到设备时才有效。(虽然即使我将我的应用程序发布到设备它仍然无法工作)

演示 here 也有效。

有什么帮助吗?

更新:

我发现应用在通过分配启动时崩溃了:

=================================================================
    Managed Stacktrace:
=================================================================
      at <unkNown> <0xffffffff>
      at System.Reflection.RuntimeMethodInfo:get_name <0x00007>
      at System.Reflection.RuntimeConstructorInfo:get_Name <0x00027>
      at Objcmethod:get_IsPropertyAccessor <0x00057>
      at Registrar.Registrar:GetBindAsAttribute <0x0018f>
at Objcmethod:get_NativeParameters <0x00067>
      at Registrar.Registrar:ComputeSignature <0x0014b>
      at Objcmethod:ComputeSignature <0x0004f>
      at Objcmethod:ValidateSignature <0x0004f>
      at ObjCType:Add <0x000e3>
      at Registrar.Registrar:RegisterTypeUnsafe <0x03623>
      at Registrar.Registrar:RegisterType <0x000af>
      at Registrar.DynamicRegistrar:Lookup <0x000df>
      at ObjCRuntime.Class:LookupClass <0x000b7>
      at ObjCRuntime.Class:Lookup <0x00017>
      at ObjCRuntime.Runtime:GetNSObject <0x00083>
      at UIKit.UIColor:get_Black <0x00037>
at Xamarin.Forms.Platform.iOS.ColorExtensions:.cctor <0x00053>
      at System.Object:runtime_invoke_dynamic <0x0010f>
      at <unkNown> <0xffffffff>
      at Xamarin.Forms.Forms:Init <0x000c7>
      at Xamarin.iOS.AppDelegate:FinishedLaunching <0x001a3>
      at System.Object:runtime_invoke_dynamic <0x0010f>
      at <unkNown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00007>
      at UIKit.UIApplication:Main <0x0002f>
      at UIKit.UIApplication:Main <0x00043>
      at XamarinUI.iOS.Application:Main <0x0007f>
      at System.Object:runtime_invoke_dynamic <0x0010f>
=================================================================
<End of Run>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)