# Direct X 9 assertion error

This topic is 4888 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I get this:
Direct3D9: (ERROR) :************************************************************
Direct3D9: (ERROR) :ASSERTION FAILED! File d:\builds\nt32_chk\multimedia\directx\dxg\d3d9\fw\d3dobj.cpp Line 63: m_cRef > 0
Direct3D9: (ERROR) :************************************************************

when I include my md2 rendering function. I'm not sure what it means. Anyone have any clue? My harddrive is C:, which is where my SDK is. Dunno why it comes up D:. Any help would be great, thanks :)

##### Share on other sites
That path is the internal path to the files used to build D3D, it has nothing to do with your system.

Are there any other warnings or errors? Do you have the Debug level at maximum?

At a random guess I'd say that somehow some Reference Counts are going screwy.

##### Share on other sites
It looks like you tried to release an object that had a ref count of 0. Look for any places you used Release() once too many, or something. If you can't find it, try this:

assert( OBJ->GetRefCount() > 0 );
OBJ->Release();

That way, the assert will happen in your own code, rather than D3D's. A clever define might even make this automatic.

##### Share on other sites
fixed it, thanks guys :)

• 40
• 15
• 10
• 23
• 19