Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Debug Assertion Failed!

Debug Assertion Failed!

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpsharepointdebugging
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raju_shiva
    wrote on last edited by
    #1

    Hi all, I am trying to run my application.It is building successfuly. But i am getting run time error as...

    Debug Assertion Failed! f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp

    please can anyone tell me,what may be the problem. Thanks Raj

    _ W Z 3 Replies Last reply
    0
    • R raju_shiva

      Hi all, I am trying to run my application.It is building successfuly. But i am getting run time error as...

      Debug Assertion Failed! f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp

      please can anyone tell me,what may be the problem. Thanks Raj

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      There might be N reasons for the assertion, some are mentioned below: 1. You might be accessing an out of bound array element 2. Your application is showing a message box due to the ASSERT statement 3. Your code is trying to access an uninitialized memory/pointer Why don't you debug your application and figure this out?

      I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

      R 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        There might be N reasons for the assertion, some are mentioned below: 1. You might be accessing an out of bound array element 2. Your application is showing a message box due to the ASSERT statement 3. Your code is trying to access an uninitialized memory/pointer Why don't you debug your application and figure this out?

        I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

        R Offline
        R Offline
        raju_shiva
        wrote on last edited by
        #3

        Hi sir, Thanks for your reply.Its working fine is some system. I am trying with a fresh system(installed Windows XP and VS 2005),there i am getting this error.

        BOOL CTestApp::::InitInstance()
        {

        if (!ProcessShellCommand(cmdInfo)) // here it is giving error
        	return FALSE;
        

        }

        Thanks Raj

        modified on Monday, December 27, 2010 2:59 AM

        _ 1 Reply Last reply
        0
        • R raju_shiva

          Hi sir, Thanks for your reply.Its working fine is some system. I am trying with a fresh system(installed Windows XP and VS 2005),there i am getting this error.

          BOOL CTestApp::::InitInstance()
          {

          if (!ProcessShellCommand(cmdInfo)) // here it is giving error
          	return FALSE;
          

          }

          Thanks Raj

          modified on Monday, December 27, 2010 2:59 AM

          _ Offline
          _ Offline
          _AnsHUMAN_
          wrote on last edited by
          #4

          What are the contents of cmdInfo variable? Is this initialized?

          I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

          R 1 Reply Last reply
          0
          • _ _AnsHUMAN_

            What are the contents of cmdInfo variable? Is this initialized?

            I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

            R Offline
            R Offline
            raju_shiva
            wrote on last edited by
            #5

            HI sir, Yes it is initilized. here it is..

            BOOL CTestApp::::InitInstance()
            {

            // Parse command line for standard shell commands, DDE, file open
            CCommandLineInfo cmdInfo;
            ParseCommandLine(cmdInfo);
            
            
            // Dispatch commands specified on the command line.  Will return FALSE if
            // app was launched with /RegServer, /Register, /Unregserver or /Unregister.
            if (!ProcessShellCommand(cmdInfo))
            	return FALSE;
            

            }

            Thanks Raj

            1 Reply Last reply
            0
            • R raju_shiva

              Hi all, I am trying to run my application.It is building successfuly. But i am getting run time error as...

              Debug Assertion Failed! f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp

              please can anyone tell me,what may be the problem. Thanks Raj

              W Offline
              W Offline
              WoutL
              wrote on last edited by
              #6

              Take a look at this article[^]

              Wout Louwers

              R 1 Reply Last reply
              0
              • W WoutL

                Take a look at this article[^]

                Wout Louwers

                R Offline
                R Offline
                raju_shiva
                wrote on last edited by
                #7

                HI, when i am trying to debug it,its going into

                "occount.cpp file"

                COleControlSiteOrWnd *pTemp =
                new COleControlSiteOrWnd(
                hwndCtrl,
                pOccDlgInfo->m_pItemInfo[i].bAutoRadioButton);
                ASSERT(IsWindow(pTemp->m_hWnd));//the breakpoint is coming here

                The occcount.cpp path is in "C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\mfc". I am not getting how to cum out of this problem. Please someone help me. Thanks Raj

                1 Reply Last reply
                0
                • R raju_shiva

                  Hi all, I am trying to run my application.It is building successfuly. But i am getting run time error as...

                  Debug Assertion Failed! f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp

                  please can anyone tell me,what may be the problem. Thanks Raj

                  Z Offline
                  Z Offline
                  zhl8230569
                  wrote on last edited by
                  #8

                  Hi, you should be less header files

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups