本文介绍了iOS Instruments 分配和泄漏使 Xamarin 应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Xamarin 开发一个大型应用程序.我正在尝试修复一些发生的泄漏,但每当我使用仪器时,泄漏或分配这些工具都会使应用程序冻结并且录制停止进行任何操作.

I'm currently developing a big application with Xamarin.I'm trying to fix some leaks that happens but whenever I use instruments Leaks or Allocation those tools make the app freeze and the recording stops taking anything.

如此链接中所述,我的应用处于调试模式:
当 iPad 应用离开启动画面时,Xcode Instruments 停止录制屏幕

My app is in Debug mode as stated in this link:
Xcode Instruments stops recording when iPad app leaves the splash screen

日志中没有特别的崩溃,我尝试了启用 NSZombie 检测但没有成功.

No particular crash in the logs and I have tried Enable NSZombie detection without success.

Dec 15 21:00:15 SU04 xxxxxxxxx[351] <Warning>: Using ThreadCount: 2
Dec 15 21:00:23 SU04 backboardd[28] <Warning>: CoreAnimation: updates deferred for too long
Dec 15 21:00:23 SU04 backboardd[28] <Warning>: CoreAnimation: timed out fence 2ecaf
Dec 15 21:00:23 SU04 SpringBoard[33] <Warning>: CoreAnimation: failed to receive fence reply: 10004003

在启动时,应用程序必须加载大量内存(部分来自 xamarin,部分来自不同的 SDK),我怀疑这些工具无法处理.我们在启动时将 180Mo 和 90Mo 转为 120Mo,但这些工具使应用程序在完全正常运行之前冻结.

At the startup, the application have to load a big amount of memory (part from xamarin, part from different SDK) and I suspect that those tools can't handle that. We are turning around 180Mo and 90Mo to 120Mo are loaded at startup but the tools make the app freeze before being fully functionnal.

我的团队中没有人能够使用这些工具进行分析,所以它来自于工具或应用程序,而不是我的计算机配置.(imho).我在模拟器 7.x 和 8.x、ipads 7.x 和 8.x 上尝试过,结果相同.

Nobody of my team is able to profile using those tools so it is coming (imho) from the tools or application and not the configuration of my computer. I tried on simulator 7.x and 8.x, ipads 7.x and 8.x with the same result.

关于我可以尝试解决什么问题的更多想法?谢谢:)

Any more idea of what I can try to solve this? Thanks :)

推荐答案

尝试单击右侧栏第一个选项卡上的仅跟踪 VM 分配"复选框.

Try clicking the "Only track VM Allocations" checkbox on the first tab of the right-hand bar.

我在 Instruments 和 Xamarin 上遇到了类似的问题,虽然这使设备超出了启动画面(并正常工作),但遗憾的是,您可能会注意到许多有用的分配信息丢失了.

I have a similar problem with Instruments and Xamarin, and while this gets the device beyond the splash screen (and working normally), you will likely notice that a lot of the useful allocation information is missing, sadly.

这篇关于iOS Instruments 分配和泄漏使 Xamarin 应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 00:47