Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debug Assertion Failed! AfxColl.inl

Status
Not open for further replies.

Simse

Programmer
Feb 24, 2005
22
Hi all,

I have a really weired problem ..
In my programm there comes up an debug assertion:
File:AfxColl.inl
Line:426

The Assertion comes up to no predictable moments.
The strange thing about is, that my programm is
still running during this assertion?! how is
that possible?

The programm is running in our production, so there
is no debug version possible to run .. which makes the
failure search very complicated.

Would be very happy for ideas about this.

Cheers
Simon
 
Oops. Looks like somebody released a Debug version of the software instead of the Release version. [thumbsdown]
Is this software your bought or did your company write it?
 
Hi,
yes it is written by ourself, and yes it is a debug
version, because there are many changes the last year.
so that we can debug directly at the production.
to debug u need to logon at this place as admin.
but this strange problem happens to no predictable
times, about 1 or 2 times a month, and u cant stay
logged on for a whole month as admin ;)

Thanks anyway
Simon
 
Well you can look at that file and line, and read what the assert() call is checking for.
It's usually to trap those "impossible" situations which should never happen.

My guess is some previous resource allocation has failed, and this has gone unchecked. When you try and use that failed result, the assert happens.

> that my programm is still running during this assertion?
How indeed - maybe there are many threads?

I think the best you can get out of it at the moment is to cause the system to save a stack trace at the point of the assertion. At least that way you can track back into your code to find out where the call is coming from.

There is (or used to be) a "stress-app" test which permitted easier testing of low-resource situations.

--
 
Assuming the version of VC++ you have is the same as what I found on Google, this is what line 426 of AfxColl.Inl says:
Code:
_AFXCOLL_INLINE void CStringList::SetAt(POSITION pos, const CString& newElement)
	{ CNode* pNode = (CNode*) pos;
		ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
		pNode->data = newElement; }

As to why it's asserting, I haven't got a clue. You'll have to look at your source code and get a stack trace like Salem suggested... It could be a NULL or invalid pointer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top