1

我们有一个相当大的应用程序,用C++编写,运行在Windows Server 2003和Windows Server 2008 R2上。它使用GetOpenFileName API调出打开文件对话框,以选择视频文件。Windows Server 2008 R2上的常见对话框:GetOpenFileName中的崩溃

我们看到,在Windows Server 2008 R2上,我们偶尔会在打开文件对话框中发生崩溃。主GUI线程正在等待工作线程,并且工作线程正在获取访问冲突异常。堆栈跟踪看起来是这样的:

[email protected]() 
shell32.dll!LinkInfo_LoadFromStream() + 0x7d bytes 
shell32.dll!CShellLink::_LoadFromStream() + 0x14b bytes  
shell32.dll!CShellLink::Initialize() + 0x1a bytes 
shell32.dll!InitializeFileHandlerWithStream() + 0xc4 bytes 
shell32.dll!CFileSysItemString::HandlerCreateInstance() + 0x13b bytes 
shell32.dll!CFileSysItemString::LoadHandler() - 0x9f1d bytes 
shell32.dll!CFSFolder::_CreatePerInstanceDefExtIcon() + 0x9b bytes 
shell32.dll!CFSFolder::_CreateDefExtIcon() + 0xb6 bytes  
shell32.dll!CFSFolder::s_GetExtractIcon() + 0x1e bytes 
shell32.dll!CFSFolder::_BindHandler() - 0xd759 bytes 
shell32.dll!CFSFolder::GetThumbnailHandler() + 0x51 bytes 
shell32.dll!_CreateThumbnailHandler() + 0x61 bytes 
shell32.dll!CShellItem::BindToHandler() - 0x20a93 bytes  
[email protected]() + 0x63 bytes 
shell32.dll!_GetILIndexFromItem() + 0x5f bytes 
[email protected]() - 0x3857d bytes 
shell32.dll!CFSFolder::GetIconOf() + 0xa57c3 bytes 
[email protected]() + 0x24 bytes 
[email protected]() + 0x3d bytes 
shell32.dll!CRegFolder::GetIconOf() + 0x10a892 bytes 
[email protected]() + 0x24 bytes 
[email protected]() + 0x3d bytes 
explorerframe.dll!CNscIconTask::_Extract() + 0x1f bytes  
explorerframe.dll!CNscOverlayTask::InternalResumeRT() + 0x31 bytes 
explorerframe.dll!CRunnableTask::Run() + 0xa2 bytes  
shell32.dll!CShellTask::TT_Run() + 0x5b bytes 
shell32.dll!CShellTaskThread::ThreadProc() + 0x99 bytes  
shell32.dll!CShellTaskThread::s_ThreadProc() + 0x1b bytes 
[email protected]() + 0xe bytes 
[email protected]() + 0xdf bytes 
[email protected]() - 0x1185 bytes 
[email protected]@12() + 0x12 bytes  
[email protected]() + 0x27 bytes 
[email protected]() + 0x1b bytes  

看来,其他一些人遇到了类似的问题:MSDN thread from 2011

“我有一个打开普通对话框(8R2)的应用程序崩溃了同样的情况。有时,它有助于重新启动应用程序并尝试again..sometimes没有。因为这种情况发生的一对夫妇的应用来自不同的供应商,这更可能是一个共同对话的问题。“

“我想在这里发现我们遇到了与2008 R2机器相同的问题,它可以是任何程序(并且我曾在Notepad.exe中看到过它)当您查看事件查看器,您会发现崩溃发生在通用对话框调用的不同模块中,它发生在32位程序和64位,它不是100%的时间发生,而是发生在50%左右。看到了何时何地发生的任何模式。“

我们的假设是,打开文件对话框试图从视频文件中获取一些缩略图信息,但视频解码器崩溃。

有没有其他人遇到这个问题?如果是这样,你能找出根源是什么吗?你知道为什么IsValidLinkInfo会得到访问冲突吗?

是否有任何可以应用的解决方法?我们计划尝试删除此特定文件类型(.ts)的文件关联。有什么办法可以告诉打开文件对话框不要创建缩略图吗?

回答

0

更新:

我们发现another thread on ServerFault报告了类似的问题(“通常当你点击文件/打开或文件/保存,但不是每一次崩溃”)。根据微软的建议,另一位用户(PG)能够通过从Data Execution Prevention中排除应用程序来解决问题。

我们检查了数据执行保护设置,发现它已设置为“为所有程序和服务启用DEP,除了我选择的那些程序和服务”。将其更改为“仅启用基本Windows程序和服务的DEP”后,问题不再发生。

相关问题