好,这是问题所在,
我有一个来自thriple的ContentControl3D对象
在那个即时消息中创建带有图像的LibraryStack,它运行良好,直到我运行创建并填充LibraryStack的函数。当我单击内部的任何对象时,出现以下错误
An unspecified error occurred on the render thread.
与stacktrace
at System.Windows.Media.MediaContext.NotifyPartitionIsZombie(Int32 failureCode)
at System.Windows.Media.MediaContext.NotifyChannelMessage()
at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at WelkoMap.App.Main() in F:\MediaGarde\Surface\Development\WelkoMap\WelkoMap\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
这是添加和创建LibraryStack并填充它的代码
public void ReplaceBackContent(List<Image> images, List<MediaElement> videos)
{
ContentControl3D control = this.TryFindParent<ContentControl3D>();
if (control == null)
{
return;
}
LibraryStack stack = new LibraryStack();
foreach (Image image in images)
{
if (image.Parent != null)
{
continue;
}
LibraryStackItem item = new LibraryStackItem();
item.Content = image;
stack.Items.Add(item);
}
control.BackContent = stack;
}
由于它具有NotifyPartitionIsZombie错误,因此我已经安装了Windows更新KB967634,它根本没有任何作用
最佳答案
我讨厌这个异常(exception)!我也在调查此事,以为我会发布发现的内容。
msdn上有一篇文章声称WinDbg内存转储可以帮助Microsoft调查。
我希望这里有所帮助。
关于c# - 渲染线程上发生未指定的错误。 (NotifyPartitionIsZombie),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2607827/