Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Resolving Assert failure before Main execution

$
0
0
//MyClass.cpp
MyClass accessClass;

MyClass::MyClass()
{
    loopRuning = true;   //type bool
    deviceHandle = NULL; //type unsigned long
    //ResetDevice();     //temporarily commented out to assist in debuging
    opMode = -1;         // type int
    targetMsg = -1;      //type int
    hasDevice = false;   //type bool
    isRunning = false;   //type bool
    msgFound = false;    //type bool

    msgCount = 0;        //type WORD (unsigned short)
}

The assertion failure occurs after MyClass constructor exits before line 1 of int main(array<System::String ^> ^args) is ever called. No pointers or arrays appear to be initialized, called, or referenced up to this point.

_ASSERTE(_CrtIsValidHeapPointer(pUserData))

@ _msize_dbg(void *pUserData, int nBlockUse) in dbgheap.c

@ _dllonexit_nolock(int (void)* func, void (void)*** pbegin, void (void)*** pend) in onexit.c

@ __dllonexit(int (void)* func, void (void)*** pbegin, void (void)*** pend) in onexit.c

@ _onexit(int (void)* func) in atonexit.c

@ atexit(void (void)* func) in atonexit

@ 'dynamic initializer for 'myClass''() in myClass.cpp

@ _initterm(void** pfbegin, void pfend) in pureMSILcode.cpp

@ <CrtImplementationDetails>::LanguageSupport::InitializeNative() in mstartup.cpp

@ (eventually) languageSupport.Initialize() in mstartup.cpp

Any ideas on what is going on or where I should be looking? The usual suggestion is look for heap access failure, but the words 'new' or 'malloc' do not appear anywhere in my code.


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>