简体   繁体   English

当我调用 OpenFileDialog 的 ShowDialog 方法时,vshost32.exe 已停止工作

[英]vshost32.exe has stopped working when I call the ShowDialog method of OpenFileDialog

I've a c# application, I'm doing a final test of it.我有一个 c# 应用程序,我正在对其进行最终测试。

But now, a function which has worked everytimes until now doesn't work anymore!但是现在,一直有效的 function 不再有效了!

I've a Button, when I click on it I want to browse files, I see the "Open file" windows, and an half second after, I got an uncaught visual studio error:我有一个按钮,当我点击它时我想浏览文件,我看到“打开文件”windows,半秒后,我收到一个未捕获的视觉工作室错误:

vshost32.exe has stopped working: vshost32.exe 已停止工作:

I'm sorry but the error is happening on a french localized computer:抱歉,错误发生在法语本地化计算机上:

Signature du problème :
  Nom d’événement de problème:  APPCRASH
  Nom de l’application: TOM.vshost.exe
  Version de l’application: 10.0.30319.1
  Horodatage de l’application:  4ba2084b
  Nom du module par défaut: ntdll.dll
  Version du module par défaut: 6.1.7600.16695
  Horodateur du module par défaut:  4cc7ab44
  Code de l’exception:  c0000008
  Décalage de l’exception:  0004631f
  Version du système:   6.1.7600.2.0.0.256.48
  Identificateur de paramètres régionaux:   4108
  Information supplémentaire n° 1:  ffb6
  Information supplémentaire n° 2:  ffb61531feaa1f65f528a2694a510c22
  Information supplémentaire n° 3:  b220
  Information supplémentaire n° 4:  b2205da238309b0a025a25162a3a18f3

My code is:我的代码是:

OpenFileDialog ofd = new OpenFileDialog {Filter = Filters};
if (ofd.ShowDialog() != true) {
    return;
}

it crash just when I'm in the ofd.ShowDialog.当我在 ofd.ShowDialog 中时它崩溃了。

Is this a code related issue?这是代码相关的问题吗?

Do you have any idea about how to debug?你知道如何调试吗? Or even how to debug this??或者甚至如何调试这个?

When activating the "unmanaged code to be debug", I got this:当激活“要调试的非托管代码”时,我得到了这个:

"First-chance exception at 0x77cd631f in TOM.exe: 0xC0000008: An invalid handle was specified."

The stack trace if it could help:堆栈跟踪是否有帮助:

>   ntdll.dll!77cd631f()    
    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
    ntdll.dll!77d1792d()    
    ntdll.dll!77ce343b()    
    ntdll.dll!77ce2d80()    
    ole32.dll!776b4102()    
    ole32.dll!776b411e()    
    ole32.dll!7767e505()    
    SearchFolder.dll!1046b49d()     
    SearchFolder.dll!1046b267()     
    shell32.dll!76281cb7()  
    shell32.dll!761701b6()  
    shell32.dll!761991fd()  
    shell32.dll!761d61ee()  
    shell32.dll!761d6159()  
    System.ni.dll!524c4ed4()    
    shlwapi.dll!77b6b6cf()  
    ntdll.dll!77cbb428()    
    ntdll.dll!77cbe6f9()    
    kernel32.dll!77c01114()     
    ntdll.dll!77ceb429()    
    ntdll.dll!77ceb3fc()    

Some things I've tried:我尝试过的一些事情:

An important new point : It seems that the error doesn't happen when I run it without visual studio(which seems to be logic)一个重要的新点:在没有visual studio的情况下运行它似乎没有发生错误(这似乎是逻辑)

Important point bis : It seems the same code is working in visual studio of another computer(which is exactly the same and issued of the same image of windows要点之二:似乎相同的代码在另一台计算机的 visual studio 中工作(完全相同并发出 windows 的相同图像

I tried to remove all files and do a GetLatest, but still doesn't work我尝试删除所有文件并执行 GetLatest,但仍然无效

I was having the same problem and my solution was to "Enable native code debugging" in "Project properties/Debug/Enable Debuggers" section. 我遇到了同样的问题,我的解决方案是在“项目属性/调试/启用调试器”部分中“启用本机代码调试”。

I thought, that I should be able to debug the issue, but instead the error was gone. 我想,我应该能够调试问题,但错误消失了。

I had a very similar issue that drove me crazy for a few days. 我有一个非常类似的问题让我疯狂了几天。 It ended up being Lenovo Password Manager that came pre-installed on my laptop. 它最终成为我的笔记本电脑上预装的Lenovo Password Manager。 It overlays forms with password boxes in with a remember password banner. 它使用密码框覆盖表单,并使用记住密码横幅。 Since uninstalling I've not encountered the issue again. 自卸载以来我没有遇到过这个问题。

My suggestion to anyone coming across this is to check if you have any software that does any overlaying at all and check to see if that is the cause. 我对任何遇到这种情况的人的建议是检查你是否有任何软件完全覆盖,并检查是否是原因。

I just re-installed the image of this computer that have I done after the installation and now it works :/. 我只是重新安装了这台计算机的图像,我在安装后完成了它现在可以工作:/。 Very strange 很奇怪

I have had this problem with "VS Express 2013 for Windows Desktop" in a VB project. 我在VB项目中遇到过“VS Express 2013 for Windows Desktop”这个问题。 In the menu DEBUG -> Exceptions... there has been an item checked. 在菜单DEBUG - > Exceptions ...中检查了一个项目。 After a "Reset All" in that dialog (unchecking all) the problem disappeared once, but came again the next time. 在该对话框中的“全部重置”(取消全部检查)后,问题消失一次,但下次再次出现。 There was a 0x4000001f, so I found Program and debugger quit without indication of problem . 有一个0x4000001f,所以我发现程序和调试器退出没有指示问题 The given tip was helping again only onec: Project -> Properties -> Debug and turn off "Enable the Visual Studio hosting process". 给出的提示再次只帮助onec:Project - > Properties - > Debug并关闭 “启用Visual Studio托管过程”。 Later the problem occurred again! 后来又出现了问题!

I remember seeing something akin to this on a computer with German locale, with our French application. 我记得在带有德语语言环境的计算机上看到类似于此的东西,我们的法语应用程序。 I can't remember how we solved it, but the similarity points me towards checking locales... Invalid handle though usually means the object you call is already destroyed, though I really can't guess which object, as ofd must still be valid at this point. 我不记得我们是如何解决它的,但相似性指向我检查区域设置...无效的句柄虽然通常意味着你调用的对象已被破坏,但我真的无法猜测哪个对象,因为它必须仍然有效这一点。

Solution for me was adding new debug method. 我的解决方案是添加新的调试方法。 Instead of AnyCPU I used x86 debugging (next to "Start" button above click Configuration Manager -> Platform -> New -> x86 ). 而不是AnyCPU我使用x86调试(在上面的“开始”按钮旁边单击配置管理器 - >平台 - >新建 - > x86 )。 In meantime I have also enabled ClickOnce security settings in Project Properities, to "This is full trust app" but don't know the impact. 与此同时,我还在Project Properities中启用了ClickOnce安全设置 ,以“这是完全信任的应用程序”,但不知道其影响。 Hope this will help somone. 希望这将有助于somone。

I had the same problem My exception code is c0020001. 我有同样的问题我的异常代码是c0020001。 I solved this issue by resetting all exceptions. 我通过重置所有异常解决了这个问题。 For that go to {Debug --> Exceptions} and there you can reset all exceptions. 为此,请转到{Debug - > Exceptions},然后您可以重置所有异常。

Add a key "Auto" of type DWORD into the registry under the location HKLM\Software\Microsoft NT\CurrentVersion\AeDebug and set to zero.在 HKLM\Software\Microsoft NT\CurrentVersion\AeDebug 位置下的注册表中添加 DWORD 类型的键“Auto”并设置为零。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio中“ vshost32.exe停止工作”或“致命执行引擎错误” - “vshost32.exe has stopped working” OR “fatal execution engine error” in Visual Studio 知道什么可能导致“vshost32.exe已停止工作”在Visual Studio 2013中? - Any idea what can cause “vshost32.exe has stopped working” in Visual Studio 2013? c# Get Active Window Text(导致 vshost32.exe 已停止工作) - c# Get Active Window Text (causes vshost32.exe has stopped working) vshost.exe已停止在ExecuteReader上工作 - vshost.exe has stopped working on ExecuteReader c#多线程问题/vshost32-clr.exe已停止工作 - c# Multithreading Issue / vshost32-clr.exe has stopped working 尝试读取或写入受保护的内存。 当我调用openfileDialog的showDialog方法时 - Attempted to read or write protected memory. When I call showDialog method of openfileDialog vshost32-clr2.exe已停止工作[错误模块名称:cdosys.dll,版本:6.6.7601.17514,时间戳:0x4ce7b774] - vshost32-clr2.exe has stopped working [Faulting module name: cdosys.dll, version: 6.6.7601.17514, time stamp: 0x4ce7b774] VS2012 C#-vshost32已停止工作 - VS2012 C# - vshost32 has stopped working glTexImage2D时,[OpenGL | C#] vhost32.exe停止工作 - [OpenGL|C#]vhost32.exe has stopped working when glTexImage2D 如何填充OpenFileDialog.ShowDialog方法 - How to shim OpenFileDialog.ShowDialog method
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM