如何调试在Windows CE 6的.NET CF 3.5 WinForms应用程序中调用Application.Exit()之后发生的致命错误? [英] How to debug a fatal error that happens after calling Application.Exit() in .NET CF 3.5 WinForms application for Windows CE 6?

查看:225
本文介绍了如何调试在Windows CE 6的.NET CF 3.5 WinForms应用程序中调用Application.Exit()之后发生的致命错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将.NET CF 1.0 WinForms应用程序(对于Windows CE的较早版本)移植到.NET CF 3.5(对于Windows CE 6).问题是,在调用Application.Exit()几秒钟后,出现一则致命错误"消息框,它只是说出发生致命错误,应用程序将终止"的提示. ".由于我使用的是Windows CE中文版本,因此该消息是中文,并且我不确定确切的消息是英文.无论如何,错误消息然后会自动消失,并且应用程序无法终止并完全释放资源,从而使整个操作系统变得不可用(启动任何应用程序都将导致沙漏动画,将设备停放在其底座中也不会导致ActiveSync连接),直到我热启动设备.

I am porting a .NET CF 1.0 WinForms application (for older versions of Windows CE) to .NET CF 3.5 (for Windows CE 6). The problem is that, a few seconds after Application.Exit() is called, I get a flash of a "fatal error" message box, which simply says something to the effect of "A fatal error has occurred and the application will terminate.". Since I'm using a Chinese version of Windows CE, the message is in Chinese and I'm not sure what the exact message is in English. Anyway, the error message then automatically disappears and the application fails to terminate and release resources completely, such that the whole operating system becomes unusable (launching any application would result in the perpetual hourglass animation, docking the device in its cradle also does not cause ActiveSync to connect) until I warm boot the device.

这个致命错误显然没有在较旧的设备上以其原始形式(.NET CF 1.0)发生.

This fatal error apparently never occurred in its original form (.NET CF 1.0) on the older device.

并且因为它不是.NET异常,所以.NET运行时不会捕获它.

And because it's not a .NET exception, it is not caught by the .NET runtime.

我该怎么办?

推荐答案

由于您无法捕获Application.Exit()处发生的异常,因此听起来您正在遇到我以前见过的错误.请尝试注释掉设置Font属性的所有行.如果该应用程序存在而没有错误消息,则您将面临一个仅在WinCE 6.0上影响NetCF 3.5的错误.请参阅此链接了解更多信息.

Because you can not catch the exception which is happening at Application.Exit(), this sounds like you are facing a bug I've seen before. Please try to comment out all the lines where you set the Font attribute. If the application exists without the error message, you are facing a bug which affects NetCF 3.5 at WinCE 6.0 only. See this link for more information.

这篇关于如何调试在Windows CE 6的.NET CF 3.5 WinForms应用程序中调用Application.Exit()之后发生的致命错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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