Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Contact info
Forum
 
Other projects
   Altirra

Search

Archives

01 Dec - 31 Dec 2013
01 Oct - 31 Oct 2013
01 Aug - 31 Aug 2013
01 May - 31 May 2013
01 Mar - 31 Mar 2013
01 Feb - 29 Feb 2013
01 Dec - 31 Dec 2012
01 Nov - 30 Nov 2012
01 Oct - 31 Oct 2012
01 Sep - 30 Sep 2012
01 Aug - 31 Aug 2012
01 June - 30 June 2012
01 May - 31 May 2012
01 Apr - 30 Apr 2012
01 Dec - 31 Dec 2011
01 Nov - 30 Nov 2011
01 Oct - 31 Oct 2011
01 Sep - 30 Sep 2011
01 Aug - 31 Aug 2011
01 Jul - 31 Jul 2011
01 June - 30 June 2011
01 May - 31 May 2011
01 Apr - 30 Apr 2011
01 Mar - 31 Mar 2011
01 Feb - 29 Feb 2011
01 Jan - 31 Jan 2011
01 Dec - 31 Dec 2010
01 Nov - 30 Nov 2010
01 Oct - 31 Oct 2010
01 Sep - 30 Sep 2010
01 Aug - 31 Aug 2010
01 Jul - 31 Jul 2010
01 June - 30 June 2010
01 May - 31 May 2010
01 Apr - 30 Apr 2010
01 Mar - 31 Mar 2010
01 Feb - 29 Feb 2010
01 Jan - 31 Jan 2010
01 Dec - 31 Dec 2009
01 Nov - 30 Nov 2009
01 Oct - 31 Oct 2009
01 Sep - 30 Sep 2009
01 Aug - 31 Aug 2009
01 Jul - 31 Jul 2009
01 June - 30 June 2009
01 May - 31 May 2009
01 Apr - 30 Apr 2009
01 Mar - 31 Mar 2009
01 Feb - 29 Feb 2009
01 Jan - 31 Jan 2009
01 Dec - 31 Dec 2008
01 Nov - 30 Nov 2008
01 Oct - 31 Oct 2008
01 Sep - 30 Sep 2008
01 Aug - 31 Aug 2008
01 Jul - 31 Jul 2008
01 June - 30 June 2008
01 May - 31 May 2008
01 Apr - 30 Apr 2008
01 Mar - 31 Mar 2008
01 Feb - 29 Feb 2008
01 Jan - 31 Jan 2008
01 Dec - 31 Dec 2007
01 Nov - 30 Nov 2007
01 Oct - 31 Oct 2007
01 Sep - 30 Sep 2007
01 Aug - 31 Aug 2007
01 Jul - 31 Jul 2007
01 June - 30 June 2007
01 May - 31 May 2007
01 Apr - 30 Apr 2007
01 Mar - 31 Mar 2007
01 Feb - 29 Feb 2007
01 Jan - 31 Jan 2007
01 Dec - 31 Dec 2006
01 Nov - 30 Nov 2006
01 Oct - 31 Oct 2006
01 Sep - 30 Sep 2006
01 Aug - 31 Aug 2006
01 Jul - 31 Jul 2006
01 June - 30 June 2006
01 May - 31 May 2006
01 Apr - 30 Apr 2006
01 Mar - 31 Mar 2006
01 Feb - 29 Feb 2006
01 Jan - 31 Jan 2006
01 Dec - 31 Dec 2005
01 Nov - 30 Nov 2005
01 Oct - 31 Oct 2005
01 Sep - 30 Sep 2005
01 Aug - 31 Aug 2005
01 Jul - 31 Jul 2005
01 June - 30 June 2005
01 May - 31 May 2005
01 Apr - 30 Apr 2005
01 Mar - 31 Mar 2005
01 Feb - 29 Feb 2005
01 Jan - 31 Jan 2005
01 Dec - 31 Dec 2004
01 Nov - 30 Nov 2004
01 Oct - 31 Oct 2004
01 Sep - 30 Sep 2004
01 Aug - 31 Aug 2004

Stuff

Powered by Pivot  
XML: RSS feed 
XML: Atom feed 

§ InterVideo, you suck

I always have problems debugging DV capture in VirtualDub because I don't actually have a capture device that outputs it. Recently, I got the idea to insert the DV Video Encoder filter into the DirectShow filter graph, which would then create DV on the fly. So I set the magic registry key to use it as the transform filter, started a debug session in Visual Studio, and set the capture device.

VirtualDub vanished.

Did it crash? Nope, no exception dialog. Stack overflow? Nope. Failed exception unwind? Nope. The debugger just showed all threads in the process exiting with return code 2. That's not a failure code.

Long shot: Set a breakpoint on {,,kernel32}_ExitProcess@4... what do you know, breakpoint hit. WTF? Who's causing my process to exit?

The answer:

0:000> ~1kb
*** WARNING: Unable to verify checksum for C:\Program Files\InterVideo\Common\Bin\MP4VDEC.ax
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\InterVideo\Common\Bin\MP4VDEC.ax -
ChildEBP RetAddr  Args to Child             
016aeda4 01d6fb1f 00000002 01037e28 01037c30 kernel32!ExitProcess+0x1
WARNING: Stack unwind information not available. Following frames may be wrong.
016aede0 01d42be4 80000000 01d819b0 01037c30 MP4VDEC!DllCanUnloadNow+0x215af
00000000 00000000 00000000 00000000 00000000 MP4VDEC+0x2be4

Gee, thank you. Let's try a known good program, Microsoft GraphEdit. Insert the InterVideo MPEG-4 Video Decoder, everything's OK. Try it again with GraphEdit running under a debugger... oh, look, ExitProcess() got called. Hmm, I wonder....

0:005> bp kernel32!IsDebuggerPresent
0:005> g
ModLoad: 75f40000 75f51000   C:\WINDOWS\system32\devenum.dll
ModLoad: 77920000 77a13000   C:\WINDOWS\system32\setupapi.dll
ModLoad: 76c30000 76c5e000   C:\WINDOWS\system32\WINTRUST.dll
ModLoad: 77a80000 77b14000   C:\WINDOWS\system32\CRYPT32.dll
ModLoad: 77b20000 77b32000   C:\WINDOWS\system32\MSASN1.dll
ModLoad: 76c90000 76cb8000   C:\WINDOWS\system32\IMAGEHLP.dll
ModLoad: 736b0000 736b7000   C:\WINDOWS\system32\msdmo.dll
ModLoad: 10000000 10054000   C:\Program Files\InterVideo\Common\Bin\MP4VDEC.ax
Breakpoint 1 hit
eax=7c813093 ebx=00000000 ecx=7c919aeb edx=7c97c0d8 esi=008f14d8 edi=7c800000
eip=7c813093 esp=0006ec64 ebp=7c81cdda iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
kernel32!IsDebuggerPresent:
7c813093 64a118000000    mov     eax,dword ptr fs:[00000018h] fs:003b:00000018=7ffdd000

What a surprise. Oh look, it tests the return value and conditionally calls ExitProcess(). How incredibly lame. This must have come out of "Software Protection For Dummies."

Essentially, the InterVideo decoder contains logic that detects debuggers and deliberately kills the application if one is found. Because this happens on load, it happens any time the decoder is queried, even for formats it doesn't support. I've run into this once before with the DivX decoder, but to the credit of the DivX guys, their decoder actually popped up a dialog saying that debuggers weren't allowed, and they turned it off after I complained. This just silently fires -- if you're lucky it exits silently, and if you're not, it causes some DLL cleanup code to crash the application in an utterly confusing manner.

Why'd I have this installed? Well, I think it came with some "InterVideo Home Theater" software that came with my Adaptec GameBridge. Which I will be uninstalling, not just because it interferes with my work, but also because, well, it sucks. As far as I can tell, you have to actually exit the program and run a separate config app to adjust the contrast.

In case you've been wondering why Windows-based systems are such a sea of instability, anti-social behavior like this is one reason. Drivers that are written for general-purpose APIs like DirectShow are guests in an application's process. I don't care how much developers want to "protect" their driver, they have no right to interfere with my ability to develop my software when I'm not even using their driver. Don't want your driver debugged? Don't load into my process and leave my program alone.

Don't support software developers that do lame things like this.

Comments

Comments posted:


Hi,

Cyberlink's powerdvd decoders are the same but doesn't exit process, shows dialog box instead when trying to run graph, they can be added and queried. Nero the same as Cyberlink, but they are based on Cyberlink. CoreAVC throws exception when trying to add to graph.

So not only intervideo ;-)

Piotr Wozniak - 26 01 07 - 03:30


The sony Atrac3 audio decoder filter (used for decoding Sonys OMA/OMG Atrac3 files), as well as the Microsoft WMA encoder filter, do the same. Add these filters to your graph while debugging, and the filter will purposly bomb out with an exception.

MarC - 26 01 07 - 03:51


What I can't figure out is how the programmers ever thought this was effective. I'm no fan of copy protection, but some of the ones out there do have some nice tricks, such as checking the TEB directly for a debugger, rewriting DLL import prologues, abusing the SEH chain, etc. Whoever wrote the debugger check for this driver was an idiot, because he tried to hide it by encoding the strings "kernel32.dll" and "IsDebuggerPresent," not realizing that anyone who would be interested at all in looking at the driver would find it simply by setting a breakpoint on the most obvious function on the planet for implementing such a check.

Phaeron - 26 01 07 - 04:49


For what it's worth, I don't think DivX deserves credit for doing a bad thing in a marginally less bad way. It means they're a little less incompetent, but that's about it.

It wouldn't hurt, of course, for DirectShow to not run these filters in the same process; instead, creating another process and use shared memory for the heavy data, so at worst a bad filter would just hose the helper process and the application could recover. Maybe it could be wrapped like that ...

Glenn Maynard - 26 01 07 - 19:26


I believe the NVIDIA PureVideo decoders are even worse, not only do they not run under a debugger, If I remember correctly, they actually unregister the filter if they detect that you're running a debugger.

Blight - 26 01 07 - 22:56


Don't you hate crappy software? I use VirtualDub as my video editor.

Mega Mario (link) - 02 02 07 - 19:19


ATI TV on AIW 9600XT is even a bigger mess… Hit F8 at windows startup and select “Debugging mode” from the start-up menu. When windows is ready, try to run ATI-MMC TV. The computer freezes stops responding. I’ve done this a few years ago, I don’t know if they keep that behavior.

George Valkov - 07 10 07 - 16:49

Comment form


Please keep comments on-topic for this entry. If you have unrelated comments about VirtualDub, the forum is a better place to post them.
Name:  
Remember personal info?

Email (Optional):
Your email address is only revealed to the blog owner and is not shown to the public.
URL (Optional):
Comment: /

An authentication dialog may appear when you click Post Comment. Simply type in "post" as the user and "now" as the password. I have had to do this to stop automated comment spam.



Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.