unhandled exception Handler in .Net 3.5 SP1
I'm converting my own web browser use WPF from Windows XP to Windows 7. when I test on Windows XP, It has no error and exceptions. But I convert and test on Windows 7 with Multi-touch Library, My Browser occurred unhandled exception.
Source: PresentationCore
Message: 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开发者_JAVA百科.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)
InnerException: null
I want to know where the bug occurred. That Trace Message are garbage information for me. I already googling to know that message, but i never found any information. How do I get exactly function where the bug occurred? please tell me something.
I encountered a similar problem myself so I thought I should document it here for others too.
My WPF application runs fine in .net 3.0 / 3.5 or 4.0. However, using a multi-touch screen would cause crashes due to multiple stylus inputs being unhandled:
System.ArgumentException was unhandled Message="StylusPointDescription cannot contain duplicate StylusPointPropertyInfos.\r\nParameter name: stylusPointPropertyInfos" Source="PresentationCore" ParamName="stylusPointPropertyInfos"
It turns out this is a debug in .net 3.0 / 3.5 that is addressed (in theory) with this hotfix from MS: http://thehotfixshare.net/board/index.php?showtopic=14251
However, that actually never worked for me.
Currently the only work around I have found for this multi-touch crash is to upgrade to VS2010 and use .NET 4.0. (as this bug was fixed in WPF 4 and back ported to 3.5 I believe)
精彩评论