Any method for MF PVP application fail gracefully if video driver is not PVP signed?

I am working on an application that runs protected playback with Media Foundation.

I've encountered a problem that with some graphics cards, an error dialog box pops up from another process saying " Bad Image: X is either not designed to run on Windows or it contains an error". After repeatedly pressing OK for the same dialog poping up many times, I can see the application hits a debug assertion saying that  ESP is not properly restored.

I've read about the following previous thread in this forum and know that this symptom happens because video driver is unsigned and mfpmp.exe failed.

"MF_ProtectedPlayback Sample doesn't work for Video on Vista Beta 2:
Thread Starter: igor1960   Started: 03 Jun 2006 7:03 AM UTC   Replies: 19

"

Because the latest SDK available to me is 5472, I built my application with this SDK and runs on Vista 5472.

I would like to know if there is a solution to this symptom. Can I make my application fail gracefully

That is:supress the "bad image" dialog, and do not hit debug assertion, just like how Windows Media Player behaves.

 

 Best regards,

James



Answer this question

Any method for MF PVP application fail gracefully if video driver is not PVP signed?

  • JCube

    The system is an Intel 940GML notebook.

    I have tried following two drivers with different Vista versions listed in the parentheses.
    Driver: 7.14.10.1028 (on Vista 5472)
    Driver: 7.14.10.1065 (on Vista 5600)

    The drivers are not signed drivers.

    Here is what I got from the "Driver details" tab

    Mobile Intel(R) 945GM Express Chipset Family
    difx32.dll
    difxapi.dll
    igdkmd32.sys
    hccutils.dll
    ...
    various intel graphics driver modules

    ID: VEN_8086&DEV_27A2

    Hope these are enough.

    Best regards,

    James.


  • KirkHaselden

    Hi James,

    Would you mind sharing the video driver info for the graphics cards that have failures

    From a command prompt, type devmgmt.msc (you will receive a privileges elevation prompt; accept it). Go under "Display adapters", right-click on your video device, go to the Driver tab, hit "Driver details", and tell us what's listed. Also, go under the "Details" tab, choose the Hardware Ids property, and tell us what's there.



  • VBGMan

    No. I don't hit this issue if all the drivers are properly signed(Vista v.5600 inbox driver).
  • idoprz

    Hi Becky,

    Thank you for your reply.

    I had a try on SetErrorMode(), it suppressed the error dialog of "bad image...". Great!

    However, I stucked with the insuing debug assertion with debug build of the application saying

    Run-Time Check Failure#0 The value of ESP was not properly saved across a function call. THis is usually a result of calling a function declared with one calling convention with a function pointer declared with a differenct calling convention.

    Abort, Retry ,Ignore

    In the release version, this causes an OCA dialog box prompting me to send minidump file to Microsoft.

    I found that with unsigned driver, I will get with MFENABLETYPE_MF_UpdateUntrustedComponent by GetEnableType(&guidEnableType)

    If in this case, I continue to do IMFMediaEventGenerator::BeginGetEvent(this, NULL)
    then I will meet this issue.

    Now, I could only work around the issue by avoiding from calling BeginGetEvent in content enabler when I get MFENABLETYPE_MF_UpdateUntrustedComponent guid.

    My application's implementaion is mainly the same as MF_ProtectedPlayback sample in SDK. You can reproduce it with unsigned video driver.

    I would like to know if I should really work around in this way, or should there be any other better practice, or could it probably be a bug in MF

    Regards,

    James. L.


  • Maxim Karzaev

    Hi Becky and Janaka,

    Thank you for your suggestion on workaround. I will wait for the final solution of this issue.

    Thanks and best regards,

    James. L.

      


  • bkana

    Hi James,

    Another workaround is you can change the video driver to thein-box "Standard VGA" driver, which should work with most devices. This driver is signed.



  • Yaakov Ellis

    Hi James,

    We've successfully reproduced the problem you're describing in-house, and we're looking into it some more. Thanks for reporting this issue.

    In the meanwhile, if you need a workaround, I know this isn't a great answer, but I suppose you just should work on systems where the drivers are signed for now...

    Becky



  • Binary

    P.S. One of our test developers has confirmed this. SetErrorMode( SEM_FAILCRITICALERRORS ) is the way to go for what you want to do.

  • Don 216

    One more question: If you have access to a system on which all the drivers are properly signed, do you hit this BeginGetEvent issue you're describing

  • Craig G

    Hi Eric,

    Thank you.

    I tested the inbox driver in RC1 build. It is ok. And I know that by using signed driver I won't meet problem.
    However, my point is that is there a way for applications to fall back gracefully when user is not using signed driver

    As an application maker, we cannot assume end user use signed driver because
    1. End user always upgrade their driver from graphics vender site. these drivers are not always signed one.
    2. OEM cusotmers need to test application with unsigned drivers before they get signed ones.

    Any way for application to fail like Windows Media Player 11

    With the unsigned driver the application fails too ugly!

    Regards,

    James. L.


  • Chicken Leg Willy

    James,

    I suggest that you roll you video drivers back to the Inbox version.

    The Inbox drivers for build 5600 for intel are 7.14.10.1053. These are signed properly and you should not have a signing problem if you are running these. In addition, once WHQL starts to logo and sign drivers, those will be posted to the Windows Update site and these will also be signed properly.

    Please reply here if you are still having problems with this issue or if you are having difficulties rolling back to the inbox driver for 5600.

    Eric.


  • Pockey

    Hi James,

    We're still in the process of getting a hard answer for you, but our suspicion over here is that the Media Player is calling SetErrorMode (see MSDN documentation) to suppress this error dialog. If you want to give it a try in the meantime, go for it.



  • Any method for MF PVP application fail gracefully if video driver is not PVP signed?