我们有一个相当大的应用程序,用C ++编写,在Windows Server 2003和Windows Server 2008 R2上运行。它使用GetOpenFileName API打开“打开文件”对话框,以选择视频文件。
我们在Windows Server 2008 R2上看到,我们偶尔会在“打开文件”对话框中遇到崩溃。主GUI线程正在等待工作线程,并且工作线程正在获取访问冲突异常。堆栈跟踪如下所示:
linkinfo.dll!_IsValidLinkInfo@4()
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
shell32.dll!_GetExtractIconW@16() + 0x63 bytes
shell32.dll!_GetILIndexFromItem() + 0x5f bytes
shell32.dll!_SHGetIconIndexFromPIDL@20() - 0x3857d bytes
shell32.dll!CFSFolder::GetIconOf() + 0xa57c3 bytes
shell32.dll!_SHGetIconIndexFromPIDL@20() + 0x24 bytes
shell32.dll!_SHIconIndexFromPIDL@16() + 0x3d bytes
shell32.dll!CRegFolder::GetIconOf() + 0x10a892 bytes
shell32.dll!_SHGetIconIndexFromPIDL@20() + 0x24 bytes
shell32.dll!_SHIconIndexFromPIDL@16() + 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
shlwapi.dll!_ExecuteWorkItemThreadProc@4() + 0xe bytes
ntdll.dll!_RtlpTpWorkCallback@8() + 0xdf bytes
ntdll.dll!_TppWorkerThread@4() - 0x1185 bytes
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
似乎其他一些人遇到了类似的问题:MSDN thread from 2011。
“我有同样的情况,打开通用对话框(8R2)应用程序崩溃。有时它有助于重新启动应用程序并再次尝试..有时不会。因为这发生在来自不同供应商的几个应用程序,它更可能是普通对话的问题。“
“我想在这里说明我们遇到了与2008 R2机器相同的问题。它可以是任何程序(我在Notepad.exe中看到过一次)。当你查看事件查看器时,你会看到崩溃发生在由公共对话框调用的不同模块中。它发生在32位程序和64位程序中。它不会100%发生 - 而是大约50%。我们还没有看到什么时候以及为什么会发生的任何模式。“
我们的假设是“打开文件”对话框试图从视频文件中获取一些缩略图信息,但视频解码器正在崩溃。
还有其他人遇到过这个问题吗?如果是这样,你能找出根本原因是什么吗?你知道为什么IsValidLinkInfo会获得访问冲突吗?
我们可以在这里应用任何变通办法吗?我们计划尝试删除此特定文件类型(.ts)的文件关联。有没有办法告诉“打开文件”对话框不要创建缩略图?
答案 0 :(得分:0)
更新
我们发现another thread on ServerFault报告了类似的问题(“通常情况下,单击文件/打开或文件/保存时会崩溃,但不会每次都崩溃”)。根据微软的建议,另一个用户(PG)能够通过从数据执行保护中排除应用程序来解决问题。
我们检查了数据执行保护设置,发现它已设置为“为我选择的所有程序和服务打开DEP”。将其更改为“仅为基本Windows程序和服务启用DEP”后,问题不再出现。