• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
.NET Framework Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Downloads
 
 
Support
 
 
Community
 
 
Forums
 
 
 
.NET Framework Developer Center > .NET Development Forums > Windows Presentation Foundation (WPF) > WPF Application Shutdown: An unspecified error occurred on the render thread.
Ask a questionAsk a question
Search Forums:
  • Search Windows Presentation Foundation (WPF) Forum Search Windows Presentation Foundation (WPF) Forum
  • Search All .NET Development Forums Search All .NET Development Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerWPF Application Shutdown: An unspecified error occurred on the render thread.

  • Monday, July 14, 2008 1:04 PMrenzskas Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    I have recently released my first WPF application, MuvUnder Cover: The Album Art Sleuth.  During the beta testing period I had the program run on about 20 different hardware configurations without issue.  Now, with the release, the software is crashing to the desktop on a lot of user machines when they are navigating in different areas of the interface.  The application is built against .NET 3.5 and the installer installs .NET 3.5 if the user does not have it.

    The error is as follows:

    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)


    At least one user that had the issue on Vista has had luck resolving the issue by installing the DirectX End-User Runtime Web Installer, as mentioned at http://forums.msdn.microsoft.com/en-US/wpf/thread/446f5f1c-4a0b-4479-b4ac-605d3c96d90b.  The DirectX End-User Runtime Web Installer has not helped other users running Windows XP SP2 or SP3.

    I really need to get this issue resolved as it is currently hurting my sales.  The application can be downloaded from http://www.muvunder.com/  If anyone needs any additional information, please let me know.

    Thank you,

    John Rennemeyer
    MuvEnum
    • ReplyReply
    • QuoteQuote
     

Answers

  • Wednesday, July 16, 2008 8:39 PMBrendan Clark - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0

    The specific issue I mentioned above with the Intellipoint software seems like the most likely culprit here as well, based on the further information you've given me.  I'm guessing that TopDesk is calling PrintWindow on your hwnd to create thumbnails.  Internally, this can cause WPF updates to layered windows to fail if they happen to occur at the same time as that other process calling PrintWindow.  As I stated before, this bug is fixed in 3.5 SP1, but the fix did not make the public beta.  The only workaround in the meantime would be to stop running the other process concurrently, or to modify your application to no longer use layered windows.  The good news is that 3.5 SP1 is planned for release later this summer.

    • Marked As Answer byMarco ZhouMSFT, ModeratorFriday, July 18, 2008 10:00 AM
    •  
    • ReplyReply
    • QuoteQuote
     

All Replies

  • Wednesday, July 16, 2008 12:29 AMBrendan Clark - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    That error is a generic indication that the underlying graphics system has encountered a problem.  Unfortunately, it does not provide enough information to diagnose the problem.  It is unlikely that updating the DirectX runtime will fix the problem for all your users.  I attempted to reproduce the problem on both a Vista and an XP machine but was unable to - I'm not sure what to look for.  Can you provide a more detailed account on how to recreate the problem?  Does it only affect users on XP SP2?  It would be even better if you could provide a simplified repro project for debugging - you can send it to brendan.clark@microsoft.com.

    Also, it looks like your application is using a layered window.  There is a known issue fixed in 3.5 SP1 where a WPF app with layered windows can crash if you are running Intellipoint mouse software (ipoint.exe), which could be a potential cause.  Also, there have been updates released to address performance issues with this feature (included in XP SP3 and Vista SP1).  If you haven't upgraded to the latest service packs, I would advise installing this hotfix for XP:
    http://support.microsoft.com/kb/937106/en-us
    or this for Vista:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=140AA58E-C363-4EA4-8836-F0119EF3F763&displaylang=en
    though this is unlikely to fix the crash.
    • ReplyReply
    • QuoteQuote
     
  • Wednesday, July 16, 2008 5:54 AMrenzskas Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
     The only way I have been able to recreate the issue on my development machine (Windows Vista SP1 x64) is by installing TopDesk and then using its Win+Tab feature like crazy, but even then it may take a bunch of messing with that to get it to error out and sometimes it doesn't error out at all.  I was able to break on the exception in my unhandled exception handler but it didn't give me any more info than what you had.

    I'm figuring the fix would be .NET 3.5 SP1 so I'm really wondering about a release date for it?  Any word on this?

    Thanks,

    John
    • ReplyReply
    • QuoteQuote
     
  • Tuesday, July 22, 2008 12:34 AMSteveGfromRR Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    I am also encountering this problem.  It is very reproducible.
    I am running WinXP with SP3 v3311, all latest service packs and patches have been applied.
    I have an AMD64 X2 machine with NVIDEA GeForce 6150 on the motherboard.  It has dual monitors (1920x1200 and 1440x900).
    Whenever I try to drag the open MuvUnder Cover application window from the larger to the smaller display it disappears.
    I am unfamiliar with TopView, so I don't think I have this installed. 
    I have a logitech cordless mouse with HID-compliant mouse driver, so I don't think I have the Intellimouse drivers installed.
    • ReplyReply
    • QuoteQuote
     
  • Saturday, August 09, 2008 12:30 PMAshishSuvarna Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Hi I am having similar problems when i run a video using mediaelement. I am using Vista Ultimate sp1. I get this error on a mpeg file. there are other files which work file using mediaelement..  I see many people are facing the same problem. Any solutions please ?

    Cheers,
    Ashish.
    • ReplyReply
    • QuoteQuote
     
  • Saturday, January 03, 2009 9:40 PMMo Flanagan Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Brendan, 
    Is there any safe way to capture a thumbnail of a WPF window (on XP and Vista)?  Even if the WPF window is not Layered, PrintWindow displays a black box for all WPF windows that I have tested.
    Thanks,
    Mo
    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement