I have a render from webcam to dx texture application. Everytime I call IMediaControl->Run() I get an assertion error that say "ASSERT Failed, ObjectCookie at line 853 of wxdebug.cpp". If I don't add my custom renderer filter to IGraphBuilder, this error doesn't show up. The most perplexing thing is I used the same code in my initial test application and it works fine. Any idea what cause this

Re: DirectShow Development Object Cookie error


I'd try setting a breakpoint in DbgRegisterObjectCreation and see what's going on.

Re: DirectShow Development Object Cookie error


I already tried that, but when I'm inside DbgRegisterObjectCreation I can't see the value of any variables. I'm using VC++ Express with Platform SDK Server 2003 R2.

The assertion error already points to the line inside
DbgRegisterObjectCreation spesifically:

pObject->m_szName = szObjectName;

pObject->m_wszName = wszObjectName;
pObject->m_dwCookie = ++m_dwNextCookie;
pObject->m_pNext = pListHead;

pListHead = pObject;

DWORD ObjectCookie = pObject->m_dwCookie;
ASSERT(ObjectCookie); <-
This is the line that throw assertion error

As you can see ObjectCookie gets its value from pObject->m_dwCookie that gets it from m_dwNextCookie. The strange thing is in wxdebug.cpp in line 60 there is a line:

DWORD m_dwNextCookie;

Based on that line it's pretty clear that m_dwNextCookie is variable with DWORD type, but when I select m_dwNextCookie inside
DbgRegisterObjectCreation and choose 'Go to Definition' it went into dsschedule.h at line 96 which has this text:

volatile DWORD_PTR m_dwNextCookie;

Does it have anything to do with thread my custom rendere class has CCritSec as member variable.

Re: DirectShow Development Object Cookie error


Hi kamilzubair,

Did you ever get any traction on resolving this problem

I am hitting the same ASSERT intermittently.


Re: DirectShow Development Object Cookie error


No, I actually put that project on hold while I do something else