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. OnInitDialog giving debug assertion failure

OnInitDialog giving debug assertion failure

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelp
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.
  • D Dhiraj kumar Saini

    Can you just tell me where is the call stack. I am new

    R Offline
    R Offline
    Rane
    wrote on last edited by
    #8

    When an Assertion failed error occurs,click on the button "Retry" to debug. You will be able to see the "Call Stack" window aside of the output window.If not,Go to Debug ->Windows ->Call Stack to view the call stack. Regards, Rane

    D 1 Reply Last reply
    0
    • R Rane

      When an Assertion failed error occurs, try to debug and see exactly the problem happens using the "call stack". This will give you the line that caused the error. Regards, Rane

      D Offline
      D Offline
      Dhiraj kumar Saini
      wrote on last edited by
      #9

      Actually earlier it was not giving any errors. But as soon as i had added few control on class CMainDlg it is giving the errorrs "Warning: UpdateData failed during dialog init.\n"

      R 1 Reply Last reply
      0
      • C Cedric Moonen

        Ok, I misunderstood your post. Did you use your debugger to see where exactly it crashes and check the call stack ? What is the exact error message ? Without any further information, we won't be able to help you.

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

        D Offline
        D Offline
        Dhiraj kumar Saini
        wrote on last edited by
        #10

        I am getting this type of error: validation failed due to OOM or other resource failure

        1 Reply Last reply
        0
        • R Rane

          When an Assertion failed error occurs,click on the button "Retry" to debug. You will be able to see the "Call Stack" window aside of the output window.If not,Go to Debug ->Windows ->Call Stack to view the call stack. Regards, Rane

          D Offline
          D Offline
          Dhiraj kumar Saini
          wrote on last edited by
          #11

          I am gettinh this assertion validation failed due to OOM or other resource failure

          1 Reply Last reply
          0
          • D Dhiraj kumar Saini

            Actually earlier it was not giving any errors. But as soon as i had added few control on class CMainDlg it is giving the errorrs "Warning: UpdateData failed during dialog init.\n"

            R Offline
            R Offline
            Rane
            wrote on last edited by
            #12

            Can you please post us the complete error message/warnings that you are getting during execution? Regards, Rane

            D 1 Reply Last reply
            0
            • R Rane

              Can you please post us the complete error message/warnings that you are getting during execution? Regards, Rane

              D Offline
              D Offline
              Dhiraj kumar Saini
              wrote on last edited by
              #13

              I think its giving assertion failure b'coz i have copied controls from other dilaog box and pasted it in my another although i have copied the member variables

              S 1 Reply Last reply
              0
              • D Dhiraj kumar Saini

                I think its giving assertion failure b'coz i have copied controls from other dilaog box and pasted it in my another although i have copied the member variables

                S Offline
                S Offline
                SandipG
                wrote on last edited by
                #14

                Did you copy code from DoDataExchange()?? I suggest to to read from some book for MFC Cedric has suggested you a very good book.

                Regards, Sandip.

                D 1 Reply Last reply
                0
                • D Dhiraj kumar Saini

                  Hi, My code is giving debiug assertion failure when I call from OnInitDialog Function of CMainDlg the function Cdialog::OnInitDialog(); the code is like the folowing: BOOL CMainDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); } Please help me Dhiraj Kumar Saini

                  Z Offline
                  Z Offline
                  zengkun100
                  wrote on last edited by
                  #15

                  I think reinstall your vc or repair may work :-D

                  A Chinese VC++ programmer

                  1 Reply Last reply
                  0
                  • S SandipG

                    Did you copy code from DoDataExchange()?? I suggest to to read from some book for MFC Cedric has suggested you a very good book.

                    Regards, Sandip.

                    D Offline
                    D Offline
                    Dhiraj kumar Saini
                    wrote on last edited by
                    #16

                    Sorry I was not copying DoDataExchange Properly

                    1 Reply Last reply
                    0
                    • D Dhiraj kumar Saini

                      Hi, My code is giving debiug assertion failure when I call from OnInitDialog Function of CMainDlg the function Cdialog::OnInitDialog(); the code is like the folowing: BOOL CMainDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); } Please help me Dhiraj Kumar Saini

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

                      Dhiraj kumar Saini wrote:

                      My code is giving debiug assertion failure...

                      What line of what file is asserting?

                      "Love people and use things, not love things and use people." - Unknown

                      "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

                      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