having the message "An unspecified error occurred on the render thread." when i using the effect

Aug 11, 2010 at 7:50 PM

when i using the control in my software
and i getting the message "An unspecified error occurred on the render thread."
it happen in two defrent situations
1. i using effect with with the transitions together and it happen
2. i using the control from "WPF Win32 Interop Render Control" for doing effect on browser putting the effect and then it happen as well
it happen Intermittent maybe becouse i create and destoried the control again and again?

is there way to fix this bug OR at least a way to that the program will handle this exception??????


StactTrace is
"at System.Windows.Media.MediaContext.NotifyPartitionIsZombie(Int32 failureCode)\r\n  
 at System.Windows.Media.MediaContext.NotifyChannelMessage()\r\n
 at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)\r\n
 at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n 
 at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n 
 at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)\r\n 
 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)\r\n 
 at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)\r\n 
 at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)\r\n 
 at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)\r\n  
 at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)\r\n 
 at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n  
 at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)\r\n  
 at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)\r\n  
 at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)\r\n  
 at System.Windows.Threading.Dispatcher.Run()\r\n  
 at System.Windows.Application.RunDispatcher(Object ignore)\r\n  
 at System.Windows.Application.RunInternal(Window window)\r\n  
 at System.Windows.Application.Run(Window window)\r\n  
 at System.Windows.Application.Run()\r\n   at test.App.Main() in D:\\Users\\Coder\\Documents\\Visual Studio 2008\\Projects\\test\\obj\\Release\\App.g.cs:line 0\r\n  
 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n  
 at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n  
 at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n  
 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n  
 at System.Threading.ThreadHelper.ThreadStart()"

targetsite is "{Void NotifyPartitionIsZombie(Int32)}"

declartion type = {Name = "MediaContext" FullName = "System.Windows.Media.MediaContext"}

Oct 13, 2010 at 11:12 AM

It's because the video driver doesn't support pixel shader 2.0.

We have this as well, and searching for a solution.

Feb 22, 2011 at 6:23 AM

thanks but, i tried for more then 10 diffrent computer and it happen all of them
tried also framework 3.5 sp1, framework 4.0
same result

i using the Transitions effect with using the control from "WPF Win32 Interop Render Control" Project


Please anyone need Help ASAP...

Feb 22, 2011 at 8:23 AM

First of all, try to subscribe to the PixelShader.InvalidPixelShaderEncountered so your software doesn't crash on that one. Catel has a ShaderEffectBase class which you can use as an example:


Next, you should set the rendering of the pixelshader to SoftwareOnly (also a feature of the ShaderEffectBase). If that doesn't work, the only thing you can do is to force software rendering in  the registry for WPF. Search for it on google and you will find how to do it.