好的,这是问题, 我有来自thriple的ContentControl3D对象 在我创建一个带有图像的LibraryStack它运行正常,直到我运行创建和填充LibraryStack的功能。当我点击里面的任何一个对象时,我得到以下错误
An unspecified error occurred on the render thread.
with 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,它完全没有效果
答案 0 :(得分:1)
我讨厌这个例外!我也正在调查它,并认为我会发布我发现的内容。
msdn上有一篇帖子声称WinDbg内存转储可以帮助Microsoft调查。
我希望这里有所帮助。
答案 1 :(得分:1)
Here是关于此错误的详细说明,以及您可以采取的措施。
答案 2 :(得分:0)
我知道这是一个老线程,但是在我注意到的一些PC上,异常仍然存在。
除了确保您的图形驱动程序是最新的,它还帮助我将硬件加速更改到最低级别(特别是使用Matrox卡)。
(在Win7上):右键单击&gt;个性化&gt;显示&gt;更改显示设置&gt;高级设置&gt;疑难解答&gt;更改设置
我同意大卫的观点,这是一个可怕的例外!