Catching MediaPlayer Exceptions from WPF MediaElement Control
- by ScottCate
I'm playing video in a MediaElement in WPF.
It's working 1000's of times, over and over again.
Once in a blue moon (like once a week), I get a windows exception (you know the dialog Dr. Watson Crash??) that happens. The MediaElment doesn't expose an error, it just crashes and sits there with an ugly Crash report on the screen.
If you "view this report" you can see it is in fact MediaPlayer that has crashed. I know I can disable the crash reports from popping up - but I'm more interested in finding out what's going wrong.
I'm not sure how to capture the results of the Dr. Watson capture, but I have the dialog open now if someone has advice on a better way to capture. Here is the opening line of data, that points to my application, then to wmvdecod.dll
AppName: ScottApp.exe
AppVer: 2.2009.2291.805
AppStamp:4a36c812
ModName: wmvdecod.dll
ModVer: 11.0.5721.5145
ModStamp:453711a3
fDebug: 0
Offset: 000cbc88
And from the Win Event Log. (same information)
Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 1000
Date: 7/13/2009
Time: 10:20:27 AM
User: N/A
Computer:28022
Description: Faulting application ScottApp.exe, version 2.2009.2291.805, stamp 4a36c812, faulting module wmvdecod.dll, version 11.0.5721.5145, stamp 453711a3, debug? 0, fault address 0x000cbc88.