Re: Why assertion on initialized CRITICAL_SECTION ?
From: RJGraham (spamcop_764376__at_surfbytes_123_._5637.com_4785)
Date: Sun, 9 May 2004 13:07:39 -0700
Nevermind, it's my bug.
"RJGraham" <spamcop_764376_@surfbytes_123_._5637.com_4785> wrote in message
> What could cause a debug assertion on an initialized CRTITICAL_SECTION
> I've declared and initialized a static CS object.
> While debugging, I see one thread call EnterCriticalSection() and start
> executing code in my CS block.
> As I step through the CS block, another thread enters and calls
> EnterCricicalSection() on my CS object.
> At this point I expect the 2nd thread to block, but instead I get a debug
> assertion at wincore.cpp:974 .
> I also get the assertion when I just run the code without the debugger.
> The assertion always occurs when the 2nd thread calls
> when another thread is already in the CS.
> My CS object is definitely initialized.
> What could be going on here?
> Thanks for any help.
> FWIW I'm developing an unmanaged mfc C++ app using VS.Net studio 2003 on
> XP pro machine.