views:

447

answers:

2

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.

A: 

Hi Scott, I'm having same issue with playing back jpg files in a windows forms.net application with the quicktime active x control. Works fine for hours and hours then suddenly once a day/week or even month we get this giant dirty error message on screen. Do you do anything to get rid of it?

I've just tried to fix it by putting in AppDomain.CurrentDomain.UnhandledException but need to wait for it to happen again on our test setup which could take ages.

Thanks for any help!

Paul

Paul
We pretty much chalked it up to a hardware / video card error. After upgrading (or maybe downgrading - but changing for sure) the video card drivers, we were able to see this much less, but it's still there at random.
ScottCate
Hi Scott. Forgot I posted this :-). Thanks for the response. I've tried everything but there doesn't seem to be any way to catch the error in the application code.What i've done so far is disable the error reporting in windows and created a windows service which monitors our application. If the service finds that the application isn't running then it starts it again in 10 seconds unless the user disables the feature with the service notify icon so they can actually exit the program.It doesn't really solve the problem but its a good work around for us.
Paul
A: 

I believe this to be a bug with the windows media decoder filter. I have experienced the same exception in other media players that DO NOT use MediaElement.

This exception is coming from native code on a thread you don't have access to. So I am unaware of how to catch these exceptions.

If you want to submit a detailed bug report to the microsoft connect site, try running this util after it crashes (DebugDiag): http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

Add the "Crash Rule" and go through the options to generate a crash report. I will do the same and maybe they can get this fixed.

A work around for you, if possible, is to find a stable codec (divx?) and convert your Windows Media Files to this format.

You may be experiencing different results with different GPUs because the WM codec will use DXVA for hardware acceleration. I think different drivers/gpus will give different amount of reliability.

Jeremiah Morrill