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. Crash

Crash

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
17 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.
  • T T RATHA KRISHNAN

    If I hover over m_pBackButton during debugging, it has this value :0x0516b488.

    _ Offline
    _ Offline
    _Superman_
    wrote on last edited by
    #7

    If you put a breakpoint at draw() are you able to step into it?

    «_Superman_»
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

    Polymorphism in C

    T 1 Reply Last reply
    0
    • _ _Superman_

      If you put a breakpoint at draw() are you able to step into it?

      «_Superman_»
      I love work. It gives me something to do between weekends.

      Microsoft MVP (Visual C++)

      Polymorphism in C

      T Offline
      T Offline
      T RATHA KRISHNAN
      wrote on last edited by
      #8

      If I press F10 0r F11, it just goes to the next line not to the draw() function definition.

      _ 1 Reply Last reply
      0
      • T T RATHA KRISHNAN

        If I press F10 0r F11, it just goes to the next line not to the draw() function definition.

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #9

        Are you debugging the Release mode? Otherwise make sure to disable optimization in Project -> Properties -> Configuration Properties -> C/C++ -> Optimization -> Optimization.

        «_Superman_»
        I love work. It gives me something to do between weekends.

        Microsoft MVP (Visual C++)

        Polymorphism in C

        T 1 Reply Last reply
        0
        • _ _Superman_

          Are you debugging the Release mode? Otherwise make sure to disable optimization in Project -> Properties -> Configuration Properties -> C/C++ -> Optimization -> Optimization.

          «_Superman_»
          I love work. It gives me something to do between weekends.

          Microsoft MVP (Visual C++)

          Polymorphism in C

          T Offline
          T Offline
          T RATHA KRISHNAN
          wrote on last edited by
          #10

          Did u mean Full optimization i.e /Od? There's no Optimization in this Project -> Properties -> Configuration Properties -> C/C++ -> Optimization -> If I set this, I got the following error: Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible

          _ 1 Reply Last reply
          0
          • T T RATHA KRISHNAN

            Did u mean Full optimization i.e /Od? There's no Optimization in this Project -> Properties -> Configuration Properties -> C/C++ -> Optimization -> If I set this, I got the following error: Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible

            _ Offline
            _ Offline
            _Superman_
            wrote on last edited by
            #11

            I meant optimization should be /Od. If optimization is disabled and you're in debug mode, you should be able to step into the draw function by pressing F11 unless the draw function is in another DLL or library.

            «_Superman_»
            I love work. It gives me something to do between weekends.

            Microsoft MVP (Visual C++)

            Polymorphism in C

            T 1 Reply Last reply
            0
            • _ _Superman_

              I meant optimization should be /Od. If optimization is disabled and you're in debug mode, you should be able to step into the draw function by pressing F11 unless the draw function is in another DLL or library.

              «_Superman_»
              I love work. It gives me something to do between weekends.

              Microsoft MVP (Visual C++)

              Polymorphism in C

              T Offline
              T Offline
              T RATHA KRISHNAN
              wrote on last edited by
              #12

              I'm in debug only. I misunderstood ur prev. post. It's Irrlicht Engine's function. I can't step into this by pressing F11. If I press F11, control moves to the next line. It's a virtual function and is defined in a file called IGUIElement.h like this:

              virtual void draw()
              {
              	if ( isVisible() )
              	{
              		core::list<IGUIElement\*>::Iterator it = Children.begin();
              		for (; it != Children.end(); ++it)
              			(\*it)->draw();
              	}
              }
              
              _ 1 Reply Last reply
              0
              • T T RATHA KRISHNAN

                I'm in debug only. I misunderstood ur prev. post. It's Irrlicht Engine's function. I can't step into this by pressing F11. If I press F11, control moves to the next line. It's a virtual function and is defined in a file called IGUIElement.h like this:

                virtual void draw()
                {
                	if ( isVisible() )
                	{
                		core::list<IGUIElement\*>::Iterator it = Children.begin();
                		for (; it != Children.end(); ++it)
                			(\*it)->draw();
                	}
                }
                
                _ Offline
                _ Offline
                _Superman_
                wrote on last edited by
                #13

                Is this the final version? I mean have you overloaded it? You could put a breakpoint inside this function and try to debug.

                «_Superman_»
                I love work. It gives me something to do between weekends.

                Microsoft MVP (Visual C++)

                Polymorphism in C

                T 1 Reply Last reply
                0
                • _ _Superman_

                  Is this the final version? I mean have you overloaded it? You could put a breakpoint inside this function and try to debug.

                  «_Superman_»
                  I love work. It gives me something to do between weekends.

                  Microsoft MVP (Visual C++)

                  Polymorphism in C

                  T Offline
                  T Offline
                  T RATHA KRISHNAN
                  wrote on last edited by
                  #14

                  Not overloaded. I'm calling it with a derived class's object. All the Buttons and other elements are derived from IGUIElement.

                  1 Reply Last reply
                  0
                  • T T RATHA KRISHNAN

                    Hi! When running my application, it suddenly crashes and goes to this line: m_pBackButton->draw();. The variable m_pBackButton's address is: 0x04ea5608. If I set a data break point at this address, the following are the contents: 0x04EA5608 ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþî How to run my application without crash?

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

                    T.RATHA KRISHNAN wrote:

                    When running my application, it suddenly crashes and goes to this line:

                    You always forget to supply important information while asking a question. A really important information in this case is the exact error message. What does it say exactly ?

                    Cédric Moonen Software developer
                    Charting control [v3.0] OpenGL game tutorial in C++

                    1 Reply Last reply
                    0
                    • T T RATHA KRISHNAN

                      Hi! When running my application, it suddenly crashes and goes to this line: m_pBackButton->draw();. The variable m_pBackButton's address is: 0x04ea5608. If I set a data break point at this address, the following are the contents: 0x04EA5608 ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþî How to run my application without crash?

                      I Offline
                      I Offline
                      Iain Clarke Warrior Programmer
                      wrote on last edited by
                      #16

                      Is it possible you've deleted your pointer elsewhere? If so, NULL your pointer every time you delete it, so you can find this bug more easily. Or the function that created the pointer did it badly, and returned a pointer to a stack variable. If so, it might work for a while, until the memory got re-used... The 0x4ea5608 looks like a legitimate pointer value - so it was probably correct, even if only briefly. Iain.

                      I am one of "those foreigners coming over here and stealing our jobs". Yay me!

                      1 Reply Last reply
                      0
                      • T T RATHA KRISHNAN

                        Hi! When running my application, it suddenly crashes and goes to this line: m_pBackButton->draw();. The variable m_pBackButton's address is: 0x04ea5608. If I set a data break point at this address, the following are the contents: 0x04EA5608 ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþî How to run my application without crash?

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #17

                        Hi, The data located at your m_pBackButton pointer address is the magic number 0xFEEEFEEE which is used by the MSVC debug heap and this would imply that your m_pBackButton has been deleted. Best Wishes, -David Delaune

                        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