目前正在测试一个C#建立在C ++库(管理,我相信,我没有写它)的顶部(.NET 4.5)WPF应用程序。 对于不同的(实际)的原因,它的运行的服务器(安装了VS2012,是的,呸)上。
程序(通过库)钩到相机并显示图像帧,它接收。
什么奇怪的是,我得到缓冲区溢出 (缓冲区溢出我能理解)。 和垃圾收集过程中!
A buffer overrun has occurred in App.exe which has corrupted the program's internal state.
各种其他信息可能有用的花絮:
- 加大了“吞吐量”使得它迟早会发生(秒而不是分钟)
- 运行在VS(调试或释放)停止它在所有发生的事情(或者至少是延迟时间比我准备等待)
- 有没有
unsafe
在我的C#,唯一的“深奥”的事情,我做的是转换位图(从库)成BitmapSource
(像这样 )。 - 该库被编译为X86,exe文件了。
调用堆栈,同时每一次:
vcr110_clr0400.dll!__crt_debugger_hook () Unknown
clr.dll!___raise_securityfailure () Unknown
clr.dll!___report_gsfailure () Unknown
clr.dll!CrawlFrame::SetCurGSCookie(unsigned long *) Unknown
clr.dll!StackFrameIterator::Init(class Thread *,class Frame *,struct _REGDISPLAY *,unsigned int) Unknown
clr.dll!Thread::StackWalkFramesEx(struct _REGDISPLAY *,enum StackWalkAction (*)(class CrawlFrame *,void *),void *,unsigned int,class Frame *) Unknown
clr.dll!Thread::StackWalkFrames(enum StackWalkAction (*)(class CrawlFrame *,void *),void *,unsigned int,class Frame *) Unknown
clr.dll!CNameSpace::GcScanRoots(void (*)(class Object * *,struct ScanContext *,unsigned long),int,int,struct ScanContext *,class GCHeap *) Unknown
clr.dll!WKS::gc_heap::mark_phase(int,int) Unknown
clr.dll!WKS::gc_heap::gc1(void) Unknown
clr.dll!WKS::gc_heap::garbage_collect(int) Unknown
clr.dll!WKS::GCHeap::GarbageCollectGeneration(unsigned int,enum WKS::gc_reason) Unknown
clr.dll!WKS::GCHeap::GarbageCollectTry(int,int,int) Unknown
clr.dll!WKS::GCHeap::GarbageCollect(int,int,int) Unknown
clr.dll!GCInterface::Collect(int,int) Unknown
mscorlib.ni.dll!6dcd33e5() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for mscorlib.ni.dll]
mscorlib.ni.dll!6dcd33e5() Unknown
064afa73() Unknown
clr.dll!MethodTable::FastBox(void * *) Unknown
clr.dll!MethodTable::CallFinalizer(class Object *) Unknown
clr.dll!SVR::CallFinalizer(class Object *) Unknown
clr.dll!SVR::CallFinalizer(class Object *) Unknown
clr.dll!SVR::CallFinalizer(class Object *) Unknown
clr.dll!WKS::GCHeap::FinalizerThreadWorker(void *) Unknown
clr.dll!Thread::DoExtraWorkForFinalizer(void) Unknown
clr.dll!Thread::DoExtraWorkForFinalizer(void) Unknown
clr.dll!Thread::DoExtraWorkForFinalizer(void) Unknown
clr.dll!WKS::GCHeap::FinalizerThreadStart(void *) Unknown
clr.dll!Thread::intermediateThreadProc(void *) Unknown
kernel32.dll!@BaseThreadInitThunk@12 () Unknown
ntdll.dll!___RtlUserThreadStart@8 () Unknown
ntdll.dll!__RtlUserThreadStart@8 () Unknown