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
comdebugging
13 Posts 5 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.
  • I Offline
    I Offline
    identity_85
    wrote on last edited by
    #1

    i made a program using flexgrid ActiveX control and when i run and call a function from the flexgrid class i got a debug assertion failed mesaage

    H C 2 Replies Last reply
    0
    • I identity_85

      i made a program using flexgrid ActiveX control and when i run and call a function from the flexgrid class i got a debug assertion failed mesaage

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Use your debugger to see where your program crashes. And if you want more chances to get an answer you have to provide a lot more informations (but still, use your debugger and if you are stuck, THEN post informations that comes from your debugger).


      Cédric Moonen Software developer
      Charting control

      I 1 Reply Last reply
      0
      • I identity_85

        i made a program using flexgrid ActiveX control and when i run and call a function from the flexgrid class i got a debug assertion failed mesaage

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

        Can you be more specific

        _**


        **_

        WhiteSky


        1 Reply Last reply
        0
        • C Cedric Moonen

          Use your debugger to see where your program crashes. And if you want more chances to get an answer you have to provide a lot more informations (but still, use your debugger and if you are stuck, THEN post informations that comes from your debugger).


          Cédric Moonen Software developer
          Charting control

          I Offline
          I Offline
          identity_85
          wrote on last edited by
          #4

          when calling msflexgrid::clear() for example the program fails in this line ASSERT(m_pCtrlSite != NULL); in the vs/src/WINOCC.cpp file

          Z 1 Reply Last reply
          0
          • I identity_85

            when calling msflexgrid::clear() for example the program fails in this line ASSERT(m_pCtrlSite != NULL); in the vs/src/WINOCC.cpp file

            Z Offline
            Z Offline
            Zac Howland
            wrote on last edited by
            #5

            Are you calling AfxEnableOleAutomation() or CoInitialize() in your InitInstance function? Usually you get those types of assertions when you haven't initialized COM.

            If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

            I 1 Reply Last reply
            0
            • Z Zac Howland

              Are you calling AfxEnableOleAutomation() or CoInitialize() in your InitInstance function? Usually you get those types of assertions when you haven't initialized COM.

              If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

              I Offline
              I Offline
              identity_85
              wrote on last edited by
              #6

              how can i initialize COM? and what's the declaration for these two functions?

              D 1 Reply Last reply
              0
              • I identity_85

                how can i initialize COM? and what's the declaration for these two functions?

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

                identity_85 wrote:

                how can i initialize COM?

                By using one of the two functions that Zac mentioned.


                "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                "Judge not by the eye but by the heart." - Native American Proverb

                Z 1 Reply Last reply
                0
                • D David Crow

                  identity_85 wrote:

                  how can i initialize COM?

                  By using one of the two functions that Zac mentioned.


                  "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                  "Judge not by the eye but by the heart." - Native American Proverb

                  Z Offline
                  Z Offline
                  Zac Howland
                  wrote on last edited by
                  #8

                  DavidCrow wrote:

                  identity_85 wrote: how can i initialize COM? By using one of the two functions that Zac mentioned.

                  This is about the time where I would tell him to take his hands off the keyboard, go to Barnes and Noble, buy any Intro to C++ book and any Intro to COM book ... and not to touch the keyboard again until both have been read and understood ... *sigh*

                  If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

                  D 1 Reply Last reply
                  0
                  • Z Zac Howland

                    DavidCrow wrote:

                    identity_85 wrote: how can i initialize COM? By using one of the two functions that Zac mentioned.

                    This is about the time where I would tell him to take his hands off the keyboard, go to Barnes and Noble, buy any Intro to C++ book and any Intro to COM book ... and not to touch the keyboard again until both have been read and understood ... *sigh*

                    If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

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

                    Zac Howland wrote:

                    This is about the time where I would tell him to...go to Barnes and Noble...

                    Be sure to include directions.


                    "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                    "Judge not by the eye but by the heart." - Native American Proverb

                    I 1 Reply Last reply
                    0
                    • D David Crow

                      Zac Howland wrote:

                      This is about the time where I would tell him to...go to Barnes and Noble...

                      Be sure to include directions.


                      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                      "Judge not by the eye but by the heart." - Native American Proverb

                      I Offline
                      I Offline
                      identity_85
                      wrote on last edited by
                      #10

                      program fails cause in ASSERT(m_pCtrlSite != NULL); "m_pCtrlSite" not an OLE control ?? will these two functions solve it and if so what's the directions or classes of them plz?

                      D 1 Reply Last reply
                      0
                      • I identity_85

                        program fails cause in ASSERT(m_pCtrlSite != NULL); "m_pCtrlSite" not an OLE control ?? will these two functions solve it and if so what's the directions or classes of them plz?

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

                        identity_85 wrote:

                        will these two functions solve it

                        Very doubtful. Had you failed to initialize COM, the application would have most likely failed to even start. I created a dialog-based project and added the Microsoft FlexGrid v6 Control to it. I then added the control to the dialog template. At this point, I could compile and run the application fine. What else do you have in place?


                        "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                        "Judge not by the eye but by the heart." - Native American Proverb

                        Z 1 Reply Last reply
                        0
                        • D David Crow

                          identity_85 wrote:

                          will these two functions solve it

                          Very doubtful. Had you failed to initialize COM, the application would have most likely failed to even start. I created a dialog-based project and added the Microsoft FlexGrid v6 Control to it. I then added the control to the dialog template. At this point, I could compile and run the application fine. What else do you have in place?


                          "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                          "Judge not by the eye but by the heart." - Native American Proverb

                          Z Offline
                          Z Offline
                          Zac Howland
                          wrote on last edited by
                          #12

                          DavidCrow wrote:

                          Had you failed to initialize COM, the application would have most likely failed to even start.

                          It would have started, but as soon as any access to the control was made, it would have given an assertion (in debug) or just crashed (in release).

                          If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

                          D 1 Reply Last reply
                          0
                          • Z Zac Howland

                            DavidCrow wrote:

                            Had you failed to initialize COM, the application would have most likely failed to even start.

                            It would have started, but as soon as any access to the control was made, it would have given an assertion (in debug) or just crashed (in release).

                            If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

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

                            Zac Howland wrote:

                            It would have started...

                            True, in a sense.

                            Zac Howland wrote:

                            ...but as soon as any access to the control was made, it would have given an assertion (in debug) or just crashed (in release).

                            Neither of which happened. It just went away quietly.

                            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