什么可以导致WP7应用程序崩溃,没有例外 [英] What can cause a WP7 app to crash with no exception

查看:309
本文介绍了什么可以导致WP7应用程序崩溃,没有例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在设备模拟器上工作正常,但在真实的设备上,它崩溃了一段时间后。它可以发生在几分钟后,以及在1-2小时后。
问题发生在设备单独或连接到visual studio。



问题是没有异常被抛出,VS只是报告连接丢失。
我确实检查我是否使用了太多的内存,但事实并非如此(http://stackoverflow.com/questions/4239193/whats-causing-my-wp7-app-to-crash)./

解决方案

这可能会导致应用程式崩溃,在 异常> Stackoverflow



在调试时,您可以通过向 Application.UnhandledException 并在 Debug.WriteLine 方法中写入异常详细信息。结果在Visual Studio输出/调试窗口中可见。

  private void OnAppUnhandledException(object sender,ApplicationUnhandledExceptionEventArgs e)
{
Debug.WriteLine(e.ExceptionObject.ToString());
}


I have an app that works ok on the device emulator but on the real device it crashes after some time. It can happen after some minutes as well after 1-2 hours. The problem happens both with the device alone or attached to visual studio.

The point is that no exception is being thrown, VS just reports the connection was lost. I did check if i'm using too much memory but that's not the case (http://stackoverflow.com/questions/4239193/whats-causing-my-wp7-app-to-crash).

What can cause apps to crash without throwing exceptions?

解决方案

It can crash without a visible exception on a Stackoverflow.

While debugging, you can detect such an exception by adding an event handler to Application.UnhandledException and writing the exception details in the Debug.WriteLine method. The result is visible in the Visual Studio Output / Debug window.

    private void OnAppUnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
    {
        Debug.WriteLine(e.ExceptionObject.ToString());
    }

这篇关于什么可以导致WP7应用程序崩溃,没有例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆