WPF后台线程崩溃

时间:2016-03-18 03:59:34

标签: c# wpf windows access-violation direct3d

我正在开发一个WPF应用程序。在极少数情况下(当我的应用程序能够在50毫秒内加载文件时 - 通常在第二次加载小文件时发生)一些后台非托管WPF线程崩溃。

只能在32位和64位平台上使用或不使用调试器在发布版本中重现。

异常说: my.exe中的0x00007FFA7C088BB8(wpfgfx_v0400.dll)抛出异常:0xC0000005:访问冲突读取位置0xFFFFFFFFFFFFFFFF。

或32位:在my.exe中的0x5CBB01F0(wpfgfx_v0400.dll)抛出异常:0xC0000005:访问冲突读取位置0x00000000。

堆栈跟踪64位:

wpfgfx_v0400.dll!CPtrMultisetBase::Remove(unsigned __int64)
wpfgfx_v0400.dll!CMilSlaveResource::UnRegisterNotifierInternal(class CMilSlaveResource *)
wpfgfx_v0400.dll!CMilVisual::~CMilVisual(void)
wpfgfx_v0400.dll!CMilVisual::`vector deleting destructor'(unsigned int)
wpfgfx_v0400.dll!CMILCOMBase::InternalRelease(void)
wpfgfx_v0400.dll!CMilSlaveHandleTable::DeleteHandle(unsigned int)
wpfgfx_v0400.dll!CComposition::ReleaseResource(class CMilSlaveHandleTable *,unsigned int,class CMilSlaveResource *,bool)
wpfgfx_v0400.dll!CComposition::Channel_DeleteResource(class CMilServerChannel *,class CMilSlaveHandleTable *,struct MILCMD_CHANNEL_DELETERESOURCE const *)
wpfgfx_v0400.dll!CComposition::ProcessCommandBatch(class CMilCommandBatch *)
wpfgfx_v0400.dll!CComposition::ProcessPartitionCommand(class CMilCommandBatch *,bool)
wpfgfx_v0400.dll!CCrossThreadComposition::ProcessBatches(bool)
wpfgfx_v0400.dll!CCrossThreadComposition::OnBeginComposition(void)
wpfgfx_v0400.dll!CComposition::ProcessComposition(bool *)
wpfgfx_v0400.dll!CComposition::Compose(bool *)
wpfgfx_v0400.dll!CPartitionThread::RenderPartition(class Partition *)
wpfgfx_v0400.dll!CPartitionThread::Run(void)
wpfgfx_v0400.dll!CPartitionThread::ThreadMain(void *)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

堆栈跟踪32位:

wpfgfx_v0400.dll!CGlyphRunResource::DeleteRealizationInArray(class DynArrayIA<class CGlyphRunRealization *,2,0> *)
wpfgfx_v0400.dll!CGlyphRunResource::Disable(void)
wpfgfx_v0400.dll!CComposition::ReleaseResource(class CMilSlaveHandleTable *,unsigned int,class CMilSlaveResource *,bool)
wpfgfx_v0400.dll!CComposition::Channel_DeleteResource(class CMilServerChannel *,class CMilSlaveHandleTable *,struct MILCMD_CHANNEL_DELETERESOURCE const *)
wpfgfx_v0400.dll!CComposition::ProcessCommandBatch(class CMilCommandBatch *)
wpfgfx_v0400.dll!CComposition::ProcessPartitionCommand(class CMilCommandBatch *,bool)
wpfgfx_v0400.dll!CCrossThreadComposition::ProcessBatches(bool)
wpfgfx_v0400.dll!CCrossThreadComposition::OnBeginComposition(void)
wpfgfx_v0400.dll!CComposition::ProcessComposition(bool *)
wpfgfx_v0400.dll!CComposition::Compose(bool *)
wpfgfx_v0400.dll!CPartitionThread::RenderPartition(class Partition *)
wpfgfx_v0400.dll!CPartitionThread::Run(void)
wpfgfx_v0400.dll!CPartitionThread::ThreadMain(void *)
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()

与此同时,我自己的线程没有任何有趣的东西。例如,主踏板通常在WindowsBase.dll!Dispatcher.GetMessage

中休眠

现在我添加了一个延迟,所以如果文件加载太快,我就等到100毫秒过去了。

但是,我想在不等待的情况下实施正确的修复。

有没有办法找出那些WPF后台线程正在尝试做什么,以及它崩溃的原因?

0 个答案:

没有答案