Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance)
Forum Update on Monday, May 27th 2025

Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance)

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 5 Posters 6.9k Views
  • 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
    aravmadd
    wrote on last edited by aravmadd
    #1

    My gui was crashing so i decided to debug my program.

    The Error Occurs to happen at this particular point

    int nObjects = std::stoi(dtObjects); // my dtObjects is std::string

    Below you can find Application Output which i got from QtCreator and also i attached screenshot of the error which i am getting when i tried to debug!

    Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in SYSFER
    
    Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in MSVCP140D!std::_Xinvalid_argument
    
    Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) in MSVCP140D!std::_Xinvalid_argument
    

    ![alt text](Capture2.PNG image url)

    Can someone please help me why this is happening?

    I found similar questions like this(https://forum.qt.io/topic/69597/warning-c-exception-flags-0x1) in this forum but they are not yet solved or person who raised question forgot to update the status!

    Regarding my pc
    Its windows 64bit and
    calibrator is Desktop Qt MSVC2015 64 bit!

    JonBJ 1 Reply Last reply
    0
    • A aravmadd

      My gui was crashing so i decided to debug my program.

      The Error Occurs to happen at this particular point

      int nObjects = std::stoi(dtObjects); // my dtObjects is std::string

      Below you can find Application Output which i got from QtCreator and also i attached screenshot of the error which i am getting when i tried to debug!

      Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in SYSFER
      
      Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in MSVCP140D!std::_Xinvalid_argument
      
      Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) in MSVCP140D!std::_Xinvalid_argument
      

      ![alt text](Capture2.PNG image url)

      Can someone please help me why this is happening?

      I found similar questions like this(https://forum.qt.io/topic/69597/warning-c-exception-flags-0x1) in this forum but they are not yet solved or person who raised question forgot to update the status!

      Regarding my pc
      Its windows 64bit and
      calibrator is Desktop Qt MSVC2015 64 bit!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @aravmadd
      I'm not sure why you get such a severe exception. But from the error messages you are falling foul of the:

      if (_Ptr == _Eptr)
          _XinvalidArgument(...);
      

      case.

      Which I think is happening because not even one character of your string can be converted (doesn't start with a decimal digit). So what's in your string, you can see it in the debugger?

      A 1 Reply Last reply
      0
      • JonBJ JonB

        @aravmadd
        I'm not sure why you get such a severe exception. But from the error messages you are falling foul of the:

        if (_Ptr == _Eptr)
            _XinvalidArgument(...);
        

        case.

        Which I think is happening because not even one character of your string can be converted (doesn't start with a decimal digit). So what's in your string, you can see it in the debugger?

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

        @JonB said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

        Which I think is happening because not even one character of your string can be converted

        I can see. It is "3"

        JonBJ 1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Take a look at the backtrace to see where the crash comes from.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          A 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            Take a look at the backtrace to see where the crash comes from.

            A Offline
            A Offline
            aravmadd
            wrote on last edited by aravmadd
            #5

            @Christian-Ehrlicher . I checked it and it is showing me at line 116 is the problem and line 116 is int nBodies = std::stoi(dtBodies);![alt text](Capture3.PNG image url).

            I will also check if all my things are pointing towards correct things.! I checked once but will try to revisit entire code and see but from the error iniformation i think everything should be fine

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              So what do you do in widget.cpp:116?

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              A 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                So what do you do in widget.cpp:116?

                A Offline
                A Offline
                aravmadd
                wrote on last edited by
                #7

                @Christian-Ehrlicher I convert string to int in that particular line 116.

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Come on... please show the code and the input value.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  A 1 Reply Last reply
                  1
                  • A aravmadd

                    @JonB said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                    Which I think is happening because not even one character of your string can be converted

                    I can see. It is "3"

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #9

                    @aravmadd said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                    @JonB said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                    Which I think is happening because not even one character of your string can be converted

                    I can see. It is "3"

                    Verify in the debugger my suggestion that _Ptr == _Eptr is true? And what is *_Ptr?

                    While you're also responding to @Christian-Ehrlicher .

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Christian Ehrlicher

                      Come on... please show the code and the input value.

                      A Offline
                      A Offline
                      aravmadd
                      wrote on last edited by aravmadd
                      #10

                      @Christian-Ehrlicher

                          std::string dtObjects;
                          bool ok = dt->getinfo("number_of_objects", dtObjects );
                          if ( false == ok )
                          {
                              ui->plainTextEdit->appendPlainText("Could not retrieve information!" );
                          }
                          int nObjects = std::stoi(dtObjects);
                          ui->plainTextEdit->appendPlainText("No of Objects: " +  QString::number(nObjects));
                      

                      and below you can find declaration of this getinfo function.

                      bool process::getinfo(const std::string& para, std::string& val)
                      

                      I am assuming somewhere wrong going during the process(like since i am using reference i might be doing somewhere wrong). Currently i am doing this thing will get back as soon as possible!

                      JonBJ jsulmJ 2 Replies Last reply
                      0
                      • A aravmadd

                        @Christian-Ehrlicher

                            std::string dtObjects;
                            bool ok = dt->getinfo("number_of_objects", dtObjects );
                            if ( false == ok )
                            {
                                ui->plainTextEdit->appendPlainText("Could not retrieve information!" );
                            }
                            int nObjects = std::stoi(dtObjects);
                            ui->plainTextEdit->appendPlainText("No of Objects: " +  QString::number(nObjects));
                        

                        and below you can find declaration of this getinfo function.

                        bool process::getinfo(const std::string& para, std::string& val)
                        

                        I am assuming somewhere wrong going during the process(like since i am using reference i might be doing somewhere wrong). Currently i am doing this thing will get back as soon as possible!

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by JonB
                        #11

                        @aravmadd
                        And prove to us what is dtObjects? And what is your code doing since you allow it to continue after false == ok --- why would you do that?? So for all we know this could easily be being produced because dtObjects does not contain what you said it contains....

                        1 Reply Last reply
                        3
                        • A aravmadd

                          @Christian-Ehrlicher

                              std::string dtObjects;
                              bool ok = dt->getinfo("number_of_objects", dtObjects );
                              if ( false == ok )
                              {
                                  ui->plainTextEdit->appendPlainText("Could not retrieve information!" );
                              }
                              int nObjects = std::stoi(dtObjects);
                              ui->plainTextEdit->appendPlainText("No of Objects: " +  QString::number(nObjects));
                          

                          and below you can find declaration of this getinfo function.

                          bool process::getinfo(const std::string& para, std::string& val)
                          

                          I am assuming somewhere wrong going during the process(like since i am using reference i might be doing somewhere wrong). Currently i am doing this thing will get back as soon as possible!

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by jsulm
                          #12

                          @aravmadd said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                          int nObjects = std::stoi(dtObjects);
                          ui->plainTextEdit->appendPlainText("No of Objects: " + QString::number(nObjects));

                          Shouldn't this be in an else {} block?

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          S 1 Reply Last reply
                          3
                          • Christian EhrlicherC Offline
                            Christian EhrlicherC Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on last edited by Christian Ehrlicher
                            #13

                            @aravmadd said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                            dtObjects

                            And how do you check that this is really a number?

                            Please read the docs and do what you have to when you don't do the sanity check by yourself:

                            Exceptions

                            std::invalid_argument if no conversion could be performed
                            std::out_of_range if the converted value would fall out of the range of the result type or if the underlying function (std::strtol or std::strtoll) sets errno to ERANGE.
                            

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            S A 2 Replies Last reply
                            1
                            • jsulmJ jsulm

                              @aravmadd said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                              int nObjects = std::stoi(dtObjects);
                              ui->plainTextEdit->appendPlainText("No of Objects: " + QString::number(nObjects));

                              Shouldn't this be in an else {} block?

                              S Offline
                              S Offline
                              sm2770s
                              wrote on last edited by
                              #14
                              This post is deleted!
                              1 Reply Last reply
                              0
                              • Christian EhrlicherC Christian Ehrlicher

                                @aravmadd said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                                dtObjects

                                And how do you check that this is really a number?

                                Please read the docs and do what you have to when you don't do the sanity check by yourself:

                                Exceptions

                                std::invalid_argument if no conversion could be performed
                                std::out_of_range if the converted value would fall out of the range of the result type or if the underlying function (std::strtol or std::strtoll) sets errno to ERANGE.
                                
                                S Offline
                                S Offline
                                sm2770s
                                wrote on last edited by sm2770s
                                #15
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • Christian EhrlicherC Christian Ehrlicher

                                  @aravmadd said in Exception at 0x7ffaea0496c9, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance):

                                  dtObjects

                                  And how do you check that this is really a number?

                                  Please read the docs and do what you have to when you don't do the sanity check by yourself:

                                  Exceptions

                                  std::invalid_argument if no conversion could be performed
                                  std::out_of_range if the converted value would fall out of the range of the result type or if the underlying function (std::strtol or std::strtoll) sets errno to ERANGE.
                                  
                                  A Offline
                                  A Offline
                                  aravmadd
                                  wrote on last edited by
                                  #16

                                  @Christian-Ehrlicher

                                  It is solved. I should keep that part in else block. When i was doing checks i found that then i also saw the same in comment. When coming to your question, it always gives the number of devices available, so that string always contains int values. like 3 or 4 or 8 not more than 9 .

                                  But I would like to say sorry for everyone here because I completly lost in the code because i completly missed else block which is a big blunder.

                                  But anways thanks for all the help. With all your comments i also got various ideas of debugging ideas which can be helpful for future. Thanks a lot

                                  1 Reply Last reply
                                  1

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved