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. Assertion error

Assertion error

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
8 Posts 6 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.
  • A Offline
    A Offline
    Anu_Bala
    wrote on last edited by
    #1

    I got error as follows _CrtISValidHeapPointer(pUserData) as assertion error what is that?any one help me

    H S D D B 5 Replies Last reply
    0
    • A Anu_Bala

      I got error as follows _CrtISValidHeapPointer(pUserData) as assertion error what is that?any one help me

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Can you be more specific please_**


      **_

      whitesky


      A 1 Reply Last reply
      0
      • H Hamid Taebi

        Can you be more specific please_**


        **_

        whitesky


        A Offline
        A Offline
        Anu_Bala
        wrote on last edited by
        #3

        Just file reading i am reading,the whole coding is going process fine,but after InitInstance the control goes to disassembly and shows this error and sometimes unhandled exception error is also coming.

        H 1 Reply Last reply
        0
        • A Anu_Bala

          Just file reading i am reading,the whole coding is going process fine,but after InitInstance the control goes to disassembly and shows this error and sometimes unhandled exception error is also coming.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          can you show your code that has error,please_**


          **_

          whitesky


          1 Reply Last reply
          0
          • A Anu_Bala

            I got error as follows _CrtISValidHeapPointer(pUserData) as assertion error what is that?any one help me

            S Offline
            S Offline
            Stephen Hewitt
            wrote on last edited by
            #5

            It means you're trying to delete (or free or some other heap allocation function) memory you shoudn't. Possible reasons;  - Freeing already freed memory;  - Freeing memory not allocated on the heap;  - Freeing an address in the middle of a heap block (e.g. delete ((new int[2])+1);). Steve

            1 Reply Last reply
            0
            • A Anu_Bala

              I got error as follows _CrtISValidHeapPointer(pUserData) as assertion error what is that?any one help me

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              What line of what file is asserting? Without context, the error is rather meaningless.


              "The largest fire starts but with the smallest spark." - David Crow

              1 Reply Last reply
              0
              • A Anu_Bala

                I got error as follows _CrtISValidHeapPointer(pUserData) as assertion error what is that?any one help me

                D Offline
                D Offline
                Dennis Gourjii
                wrote on last edited by
                #7

                _CrtISValidHeapPointer(pUserData) To find out what's wrong with this line, declare pUserData as constant pointer and see where you get compiler errors. ;)

                1 Reply Last reply
                0
                • A Anu_Bala

                  I got error as follows _CrtISValidHeapPointer(pUserData) as assertion error what is that?any one help me

                  B Offline
                  B Offline
                  Bram van Kampen
                  wrote on last edited by
                  #8

                  An assertion is something the System Uses,(and you should also use them) to make sure that an assumption is actually the case. If it is not, it will throw an exception. In this case, if you use free(p), it assumes that p is a valid heap pointer. That assumption is tested, or asserted deep in the bowels of the code, and in this case it failed, pUserData is NOT a valid heap pointer. Go back on the Call Stack to find out what is being freed, and take it from there LateNightsInNewry

                  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