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 Updated to NodeBB v4.3 + New Features

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 7.4k 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.
  • 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 Online
      Christian EhrlicherC Online
      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 Online
                Christian EhrlicherC Online
                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