如何处理Win32异常 [英] How to handle win32 exception

查看:140
本文介绍了如何处理Win32异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按钮的onclick事件,我发现一个Win32未处理的异常onrsd.exe [4008]

显示Visual Studio即时调试器

请帮助我删除此类异常.

onclick event of a button I am finding a win32 unhandled exception onrsd.exe [4008]

displaying a Visual Studio Just-In-Time Debugger

Please help me to remove such an exception.

推荐答案

要禁用该异常,您需要编辑注册表.在注册表编辑器(regedit命令)窗口中,找到并删除以下注册表项:
To disable the exception you need to edit the registry. In the Registry Editor (regedit command) window, locate and delete the follow registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger


您需要做的第一件事就是找出导致异常的原因-我们不能,因为我们看不到您的屏幕,无法访问您的硬盘,或读懂你的想法! :laugh:
在点击事件开始时,添加一个try块,最后将其捕获:
The first thing you need to do is find out what is causing the exception - we can''t because we can''t see your screen, access your HDD, or read your mind! :laugh:
At the beginning of your click event, add a try block, and it''s catch at the end:
private void button1_Click(object sender, EventArgs e)
    {
    try
        {
        ... All your code goes here
        }
    catch (Exception ex)
        {
        MessageBox.Show(ex.ToString());
        }
    }

如果运气好的话,错误和跟踪将使您指向有问题的代码.
如果不是,那么我们需要错误详细信息以及生成错误的代码.

With any luck, the error and trace will point you at the offending code.
If it doesn''t then we need the error details, and the code that generated it.




这是msdev.exe的Win 32未处理异常的解决方案,也许您的问题很相似.

http://support.microsoft.com/kb/811191 [
Hi,

this is a solution for the a win 32 unhandled exception with msdev.exe, maybe your problem is similar.

http://support.microsoft.com/kb/811191[^]

What does your application do (should do...) on click event?
onrsd.exe belongs to oracle, do you have Android Java JDK installed?

Regards


这篇关于如何处理Win32异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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