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. Can anybody explain below statment ?
Forum Updated to NodeBB v4.3 + New Features

Can anybody explain below statment ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 4 Posters 823 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.
  • Q Qt embedded developer

    Can anybody explain me below statements of back trace :

    (gdb) bt
    #0 StatusController::slotPollingRequested (this=0x555555ea8440)
    at ../../QTAppDir/QTAppDirComponents/controllers/statuscontroller.cpp:781
    #1 0x0000555555665b25 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, bool (StatusController::)()>::call(bool (StatusController::)(), StatusController*, void**) (
    f=(bool (StatusController::)(StatusController * const)) 0x55555563f964 StatusController::slotPollingRequested(), o=0x555555ea8440, arg=0x7fffffffd5a0)
    at /home/user/Qt5.15.8/5.15.8/gcc_64/include/QtCore/qobjectdefs_impl.h:152
    #2 0x0000555555665692 in QtPrivate::FunctionPointer<bool (StatusController::)()>::call<QtPrivate::List<>, void>(bool (StatusController::)(), StatusController, void**) (
    f=(bool (StatusController::)(StatusController * const)) 0x55555563f964 StatusController::slotPollingRequested(), o=0x555555ea8440, arg=0x7fffffffd5a0)
    at /home/user/Qt5.15.8/5.15.8/gcc_64/include/QtCore/qobjectdefs_impl.h:185
    #3 0x0000555555664b5a in QtPrivate::QSlotObject<bool (StatusController::)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x555555fe5620, r=0x555555ea8440, a=0x7fffffffd5a0,
    ret=0x0)
    at /home/user/Qt5.15.8/5.15.8/gcc_64/include/QtCore/qobjectdefs_impl.h:418
    #4 0x00007ffff42d7860 in void doActivate<false>(QObject*, int, void**) ()
    --Type <RET> for more, q to quit, c to continue without paging-
    

    can anybody tell what may be the cause of crash ?

    Christian EhrlicherC Offline
    Christian EhrlicherC Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @Qt-embedded-developer said in Can anybody explain below statment ?:

    can anybody tell what may be the cause of crash ?

    You did something wrong.
    Use a debugger, fix your code.

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

    Q 1 Reply Last reply
    1
    • Christian EhrlicherC Christian Ehrlicher

      @Qt-embedded-developer said in Can anybody explain below statment ?:

      can anybody tell what may be the cause of crash ?

      You did something wrong.
      Use a debugger, fix your code.

      Q Offline
      Q Offline
      Qt embedded developer
      wrote on last edited by
      #3

      @Christian-Ehrlicher

      dear yes i knew some thing is wrong. but its auto start application and randomly crash after 10 to 12 hour.

      and to figure out i used GDB so it can tell what went wrong and its given me :

                                                                                                     Thread 1 "QTApp" received signal SIGSEGV, Segmentation fault.
                        StatusController::slotPollingRequested (this=0x555555ea8440) at ../../QTApp/QTAppComponents/controllers/statuscontroller.cpp:781
      

      781 ../../QTApp/QTAppComponents/controllers/statuscontroller.cpp: No such file or directory.

      and its part of code is below :

                       if (lConnProbe->getProbeSts() != PROBEDISCONNECTED)
                          {
                              if(lConnProbe->getProbePerso() == "Arterial")
                              {
                                  bACuvetteNotDetected = false;
                                  list<int>::iterator errorcode;
                                  for (errorcode = lConnProbe->getProbeErrorList()->begin(); errorcode != lConnProbe->getProbeErrorList()->end(); ++errorcode)
                                  {
                                      switch(*errorcode)
                                      {
                                      case EC_HSAT_COLOR_CHIP_FAILURE:
                                      {
                                          TechnicalAlarmModelData lAlarm1;
                                          lAlarm1.aAlarmType = EnumClass::EnTechAlarmType::TECHALARM_INFO;
                                          lAlarm1.aAlarmString = "Arterial H/S-" + QString::fromStdString(lConnProbe->getSerialNumber()) + " Color Chip test failure <H151>";
                                          lAlarm1.aActionText = "Check surfaces of color chip and H/S and clean if necessary.\n\nIf error persists, use replacement H/S if available\n Technical Support";
                                          lModelDataList.push_back(lAlarm1);
                                      }
                                      break;
      
      Christian EhrlicherC 1 Reply Last reply
      0
      • Q Qt embedded developer

        @Christian-Ehrlicher

        dear yes i knew some thing is wrong. but its auto start application and randomly crash after 10 to 12 hour.

        and to figure out i used GDB so it can tell what went wrong and its given me :

                                                                                                       Thread 1 "QTApp" received signal SIGSEGV, Segmentation fault.
                          StatusController::slotPollingRequested (this=0x555555ea8440) at ../../QTApp/QTAppComponents/controllers/statuscontroller.cpp:781
        

        781 ../../QTApp/QTAppComponents/controllers/statuscontroller.cpp: No such file or directory.

        and its part of code is below :

                         if (lConnProbe->getProbeSts() != PROBEDISCONNECTED)
                            {
                                if(lConnProbe->getProbePerso() == "Arterial")
                                {
                                    bACuvetteNotDetected = false;
                                    list<int>::iterator errorcode;
                                    for (errorcode = lConnProbe->getProbeErrorList()->begin(); errorcode != lConnProbe->getProbeErrorList()->end(); ++errorcode)
                                    {
                                        switch(*errorcode)
                                        {
                                        case EC_HSAT_COLOR_CHIP_FAILURE:
                                        {
                                            TechnicalAlarmModelData lAlarm1;
                                            lAlarm1.aAlarmType = EnumClass::EnTechAlarmType::TECHALARM_INFO;
                                            lAlarm1.aAlarmString = "Arterial H/S-" + QString::fromStdString(lConnProbe->getSerialNumber()) + " Color Chip test failure <H151>";
                                            lAlarm1.aActionText = "Check surfaces of color chip and H/S and clean if necessary.\n\nIf error persists, use replacement H/S if available\n Technical Support";
                                            lModelDataList.push_back(lAlarm1);
                                        }
                                        break;
        
        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #4

        I will not debug your code - provide a minimal, compilable example or use code checker or other tools like asan.
        And why do you ask the same question you already did 17 hours ago?

        https://forum.qt.io/topic/144226/what-is-the-reason-behind-below-crash-of-qt-application

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

        Q 1 Reply Last reply
        2
        • Christian EhrlicherC Christian Ehrlicher

          I will not debug your code - provide a minimal, compilable example or use code checker or other tools like asan.
          And why do you ask the same question you already did 17 hours ago?

          https://forum.qt.io/topic/144226/what-is-the-reason-behind-below-crash-of-qt-application

          Q Offline
          Q Offline
          Qt embedded developer
          wrote on last edited by Qt embedded developer
          #5

          Dear @Christian-Ehrlicher Because i want to understand from back trace that what i done wrong. because nobody told me from back trace that what went wrong.

          Because if i use asan or gdb. may they give same reason like above reason.

          So if anybody explain above back trace it can help me.

          This question is all about when this type of trace log get generated ? what it mean to say ? And thanks i removed that sub question becuase i want to do discussion of it in this post.

          i have seen that there are lots of post available for similar type of trace.

          So if any expert can help me when this happen it will redirect to right thing.

          JonBJ Axel SpoerlA 2 Replies Last reply
          0
          • Q Qt embedded developer

            Dear @Christian-Ehrlicher Because i want to understand from back trace that what i done wrong. because nobody told me from back trace that what went wrong.

            Because if i use asan or gdb. may they give same reason like above reason.

            So if anybody explain above back trace it can help me.

            This question is all about when this type of trace log get generated ? what it mean to say ? And thanks i removed that sub question becuase i want to do discussion of it in this post.

            i have seen that there are lots of post available for similar type of trace.

            So if any expert can help me when this happen it will redirect to right thing.

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

            @Qt-embedded-developer
            I don't think anyone can say what precisely is wrong from that backtrace. All the more so since it takes a long time to show up, so it's some particular situation.

            @Qt-embedded-developer said in Can anybody explain below statment ?:

            781 ../../QTApp/QTAppComponents/controllers/statuscontroller.cpp: No such file or directory.
            and its part of code is below :

            And which of those lines is #781?? You know, we do not.

            Q 1 Reply Last reply
            1
            • JonBJ JonB

              @Qt-embedded-developer
              I don't think anyone can say what precisely is wrong from that backtrace. All the more so since it takes a long time to show up, so it's some particular situation.

              @Qt-embedded-developer said in Can anybody explain below statment ?:

              781 ../../QTApp/QTAppComponents/controllers/statuscontroller.cpp: No such file or directory.
              and its part of code is below :

              And which of those lines is #781?? You know, we do not.

              Q Offline
              Q Offline
              Qt embedded developer
              wrote on last edited by Qt embedded developer
              #7

              @JonB

              781 line may be

              below line

              if (lConnProbe->getProbeSts() != PROBEDISCONNECTED)

              or

              switch(*errorcode)

              this block of code also i mentioned above.

              JonBJ 1 Reply Last reply
              0
              • Q Qt embedded developer

                Dear @Christian-Ehrlicher Because i want to understand from back trace that what i done wrong. because nobody told me from back trace that what went wrong.

                Because if i use asan or gdb. may they give same reason like above reason.

                So if anybody explain above back trace it can help me.

                This question is all about when this type of trace log get generated ? what it mean to say ? And thanks i removed that sub question becuase i want to do discussion of it in this post.

                i have seen that there are lots of post available for similar type of trace.

                So if any expert can help me when this happen it will redirect to right thing.

                Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by
                #8

                @Qt-embedded-developer
                A lot of posts about segmentation faults don’t mean that they all have the same reason. The error just means that unallocated memory is accessed. And without showing us a reproducible code example, we can only guess.

                So let’s guess.

                Your trace doesn’t look like you access a stale object or an invalid pointer. Yet, that can’t be completely excluded. You explain that you show data in a graph and it crashes after 15 hours. You don’t mention that you manage memory usage, e.g. you store only what is displayed and free what is not.
                So the guess is that the application keeps consuming memory until the system runs out of it. Then the stack flows over and it accesses an unallocated memory page. Boom. Segfault at a completely random place.

                Software Engineer
                The Qt Company, Oslo

                1 Reply Last reply
                3
                • Q Qt embedded developer

                  @JonB

                  781 line may be

                  below line

                  if (lConnProbe->getProbeSts() != PROBEDISCONNECTED)

                  or

                  switch(*errorcode)

                  this block of code also i mentioned above.

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

                  @Qt-embedded-developer
                  As @Axel-Spoerl has just written. Meanwhile your if (lConnProbe->getProbeSts() != PROBEDISCONNECTED) and switch(*errorcode) are about 10 lines apart, so you should be able to locate line #781 a bit better than that. Though if you are in @Axel-Spoerl's "short of memory" case it won't help much, but still...

                  Q 1 Reply Last reply
                  2
                  • JonBJ JonB

                    @Qt-embedded-developer
                    As @Axel-Spoerl has just written. Meanwhile your if (lConnProbe->getProbeSts() != PROBEDISCONNECTED) and switch(*errorcode) are about 10 lines apart, so you should be able to locate line #781 a bit better than that. Though if you are in @Axel-Spoerl's "short of memory" case it won't help much, but still...

                    Q Offline
                    Q Offline
                    Qt embedded developer
                    wrote on last edited by Qt embedded developer
                    #10

                    @JonB @Axel-Spoerl

                    mean while i figure out from both which line is it.

                    Can anybody tell me.

                    IF my app need to store data of 15 hour and show immediately on qcustomplot ?

                    then what need to be the approach to deal with sort of memory?

                    because i have doubt that my data get stored into ram.

                    JonBJ 1 Reply Last reply
                    0
                    • Q Qt embedded developer

                      @JonB @Axel-Spoerl

                      mean while i figure out from both which line is it.

                      Can anybody tell me.

                      IF my app need to store data of 15 hour and show immediately on qcustomplot ?

                      then what need to be the approach to deal with sort of memory?

                      because i have doubt that my data get stored into ram.

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

                      @Qt-embedded-developer
                      If you stuck to one question about this it would help. In your other thread
                      @Pl45m4 said in What is the reason behind below crash of QT application ?:

                      But there is no point to store all 15h of data at any time in your graph. Work with models and only show the visible area of your graph. Use downsampling to reduce the datapoints, when you show the whole timespan.

                      Q 1 Reply Last reply
                      1
                      • JonBJ JonB

                        @Qt-embedded-developer
                        If you stuck to one question about this it would help. In your other thread
                        @Pl45m4 said in What is the reason behind below crash of QT application ?:

                        But there is no point to store all 15h of data at any time in your graph. Work with models and only show the visible area of your graph. Use downsampling to reduce the datapoints, when you show the whole timespan.

                        Q Offline
                        Q Offline
                        Qt embedded developer
                        wrote on last edited by Qt embedded developer
                        #12

                        @JonB means the immediate data which i need to show on qcustomplot based graph.

                        need to get store into local file and when user click on graph button and want to see variation into graph at time i need to load that onto qcustom plot.

                        my data is coming every one second. and data i need to show in three format 2min , 2 hr and 20hr

                        so i need to load according to that.

                        means when 2 minute interval data i am showing at that time no need to do down sampling but when show 2 hr or 20 hr data at that time need to do down sampling.

                        though there is doubt that when i load 20 hr data into ram and show at that time also this issue may come ?

                        JonBJ 1 Reply Last reply
                        0
                        • Q Qt embedded developer

                          @JonB means the immediate data which i need to show on qcustomplot based graph.

                          need to get store into local file and when user click on graph button and want to see variation into graph at time i need to load that onto qcustom plot.

                          my data is coming every one second. and data i need to show in three format 2min , 2 hr and 20hr

                          so i need to load according to that.

                          means when 2 minute interval data i am showing at that time no need to do down sampling but when show 2 hr or 20 hr data at that time need to do down sampling.

                          though there is doubt that when i load 20 hr data into ram and show at that time also this issue may come ?

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

                          @Qt-embedded-developer said in Can anybody explain below statment ?:

                          means when 2 minute interval data i am showing at that time no need to do down sampling but when show 2 hr or 20 hr data at that time need to do down sampling

                          So go ahead and do that! 20 hours of data every one second is 72,000 points, which is quite a lot for the user to look at.

                          In any case first look to see whether when it crashes after 20 hours, or after loading that data into memory, you are or are not anywhere near running out of free memory.

                          Q 1 Reply Last reply
                          1
                          • JonBJ JonB

                            @Qt-embedded-developer said in Can anybody explain below statment ?:

                            means when 2 minute interval data i am showing at that time no need to do down sampling but when show 2 hr or 20 hr data at that time need to do down sampling

                            So go ahead and do that! 20 hours of data every one second is 72,000 points, which is quite a lot for the user to look at.

                            In any case first look to see whether when it crashes after 20 hours, or after loading that data into memory, you are or are not anywhere near running out of free memory.

                            Q Offline
                            Q Offline
                            Qt embedded developer
                            wrote on last edited by Qt embedded developer
                            #14

                            @JonB Sorry i forgot to mention that i am showing 96
                            sensor data,

                            means that data is 72000 * 96.

                            i am showing multi graph. so at a time need is 4 sensor data.

                            so it is 72000 * 4.

                            And our crash line is

                            switch(*errorcode)

                            1 Reply Last reply
                            0

                            • Login

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