Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.



狀況

當您使用 Windows Presentation Foundation (WPF) 以.NET Framework 3.5 Service Pack 1 (SP1) 呈現圖形時您可能會遇到下列問題之一為基礎的應用程式。


問題 1

當您變更在 WPF 應用程式中的VisualBrush.Visual屬性的值時,則應用程式當機。

問題 2

當您執行下列動作之一時,就會呈現執行緒的 WPF 應用程式中發生記憶體遺漏︰

  • 您可以使用軟體轉譯管線來呈現 3D 場景,並包含VisualBrush物件或DrawingBrush物件。例如,您正在使用的軟體轉譯管線,當您執行下列動作之一︰

    • 您是使用RenderTargetBitmap類別呈現的場景。

    • 您要列印的場景。

    • 您呈現層將屬性設定為 0。

    • 您透過 [遠端桌面連線中呈現場景。

  • 您不使用 Windows 顯示驅動程式模型 (WDDM) 的電腦上使用WriteableBitmap類別中呈現景象。

  • 您可以使用硬體轉譯管線來使用 [不使用 WDDM 的電腦上的 [磚塊式並排的VisualBrush物件或磚塊式並排的DrawingBrush物件呈現景象。


問題 3

使用的 WPF 應用程式層次 windows 損毀,當您執行下列動作之一︰

  • 您使電腦進入待命,使用 Windows XP 顯示驅動程式模型 (XPDDM),然後恢復電腦從待命狀態。

  • 您切換到全螢幕主控台模式,在 Windows XP 上。

原因

原因 1

之所以發生這個問題,是因為不正確地排列執行緒中的作業時,將會傳回從呈現執行緒的一般錯誤。這些作業會造成從 null 的父物件中斷連結的子物件。

例如,視覺的物件必須先移除從VisualBrush物件從VisualBrush物件中斷連結。 不過,若要移除的視覺物件的作業可能會不正確地排序。因此,從 null 的父物件中斷連結的視覺物件。

原因 2

由於參考計數呈現執行緒中的錯誤會發生這個問題。

原因 3

Win32 錯誤代碼不正確地處理,就會發生這個問題。

解決方案

若要解決這個問題,請套用下列 「 Microsoft 知識庫 」 文件中所述的 hotfix 套件︰

2667241更新彙總套件是可用的 Windows Presentation Foundation (WPF) 的 Microsoft.NET Framework 3.5

更多的資訊

堆疊輸出

System.InvalidOperationException: An unspecified error occurred on the render thread.
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)

狀態

Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×