Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Process killed by signal
Qt 6.12 LTS is out! See what's new in the release blog

Process killed by signal

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
14 Posts 2 Posters 7.8k 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.
  • S Offline
    S Offline
    saurabh162
    wrote on last edited by
    #3

    Hello Hilk

    Thank you very much for your fast reply.

    Following you will get my OS (debian) detail

    PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
    NAME="Debian GNU/Linux"
    VERSION_ID="9"
    VERSION="9 (stretch)"
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    

    I am using QT 5.7.1 version.

    Actually I do not know how to debug a crash. What I noticed is that everytime my application get crashed after running for 10 minutes.

    Thank you !!

    J.HilkJ 1 Reply Last reply
    0
    • S saurabh162

      Hello Hilk

      Thank you very much for your fast reply.

      Following you will get my OS (debian) detail

      PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
      NAME="Debian GNU/Linux"
      VERSION_ID="9"
      VERSION="9 (stretch)"
      ID=debian
      HOME_URL="https://www.debian.org/"
      SUPPORT_URL="https://www.debian.org/support"
      BUG_REPORT_URL="https://bugs.debian.org/"
      

      I am using QT 5.7.1 version.

      Actually I do not know how to debug a crash. What I noticed is that everytime my application get crashed after running for 10 minutes.

      Thank you !!

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #4

      @saurabh162

      I'm afraid I won't be much help, my Linux knowledge is very limited - if that's were the problem is.

      • Why such an old qt-version? Are you limited to that or could you upgrade ?
      • is it constantly 10 minutes ? Or can it differ vastly ?
      • What do you use to develop, QtCreator?

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        saurabh162
        wrote on last edited by
        #5

        Hello Hilk,

        following are answers to your questions

        Q) Why such an old qt-version? Are you limited to that or could you upgrade ?

        Ans) I am using this version of qt because in my embedded hardware I have pre-installed library for qt5.7.1 and it has all components I needed to develop my application.

        Q) is it constantly 10 minutes ? Or can it differ vastly ?

        Ans) It is crashing after 10 minutes (+- 2 minutes).

        Q) What do you use to develop, QtCreator?
        Ans ) Yes I use Qt creator 4.4.1

        and many thanks for your time

        J.HilkJ 1 Reply Last reply
        0
        • S saurabh162

          Hello Hilk,

          following are answers to your questions

          Q) Why such an old qt-version? Are you limited to that or could you upgrade ?

          Ans) I am using this version of qt because in my embedded hardware I have pre-installed library for qt5.7.1 and it has all components I needed to develop my application.

          Q) is it constantly 10 minutes ? Or can it differ vastly ?

          Ans) It is crashing after 10 minutes (+- 2 minutes).

          Q) What do you use to develop, QtCreator?
          Ans ) Yes I use Qt creator 4.4.1

          and many thanks for your time

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #6

          @saurabh162
          alright,

          if it's predictably crashing after a certain amount of time, it could be memory leak issue, or some object that gets destroyed and you try to still access it.

          Without a proper debug and code shown it's near impossible to say.

          Since you're using QtCreator.
          Use that to debug your application.
          Set your project to debug build and run it. Its the play button with the "bug" on it.
          Let it run until it crashes and than you should be able to see exactly where the issue is

          You can post the stack trace and/or screenshots if you're having problem at that stage, I'm sure someone can and will help ;-).


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          3
          • S Offline
            S Offline
            saurabh162
            wrote on last edited by
            #7

            Hello Hilk,

            Thank you and I will do it and will update you :)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              saurabh162
              wrote on last edited by
              #8

              Hello Hilk,

              I am testing my application from last 5-6 days but could not able to generate crash again.

              One thing I have changed in my code, is ensuring that I handle all bytes generated by Hardware on serial port.

              Previously I was missing handling some bytes received by Beaglebone black (BBB) from Hardware. May be above change has solved QT application crash problem. But I am not sure.

              But many thanks for your help.

              Regards
              Saurabh

              J.HilkJ 1 Reply Last reply
              0
              • S saurabh162

                Hello Hilk,

                I am testing my application from last 5-6 days but could not able to generate crash again.

                One thing I have changed in my code, is ensuring that I handle all bytes generated by Hardware on serial port.

                Previously I was missing handling some bytes received by Beaglebone black (BBB) from Hardware. May be above change has solved QT application crash problem. But I am not sure.

                But many thanks for your help.

                Regards
                Saurabh

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #9

                hi @saurabh162
                if it now doesn't crash, now that you're using a Debug build, make sure you initialize all pointers (with null ptr) and all your variables.

                That's 99% of the time why a program crashes in release, but does not in debug mode.


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                S 1 Reply Last reply
                3
                • J.HilkJ J.Hilk

                  hi @saurabh162
                  if it now doesn't crash, now that you're using a Debug build, make sure you initialize all pointers (with null ptr) and all your variables.

                  That's 99% of the time why a program crashes in release, but does not in debug mode.

                  S Offline
                  S Offline
                  saurabh162
                  wrote on last edited by
                  #10

                  Hello Hilk,

                  Thank you, yes I will take care of it.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    saurabh162
                    wrote on last edited by
                    #11

                    Hello @J-Hilk,

                    One more question I am sending and receiving data using serial port both from Qt main application and Qt timer slot (triggered at interval of 1 second).

                    Whether this can also cause crash in application. May be when I try to access Serial port buffer both in Main application and slot of Qt Timer at same time.

                    Please note: Both my Main application and timer slot is running in same thread.

                    thank you ..:)

                    J.HilkJ 1 Reply Last reply
                    0
                    • S saurabh162

                      Hello @J-Hilk,

                      One more question I am sending and receiving data using serial port both from Qt main application and Qt timer slot (triggered at interval of 1 second).

                      Whether this can also cause crash in application. May be when I try to access Serial port buffer both in Main application and slot of Qt Timer at same time.

                      Please note: Both my Main application and timer slot is running in same thread.

                      thank you ..:)

                      J.HilkJ Offline
                      J.HilkJ Offline
                      J.Hilk
                      Moderators
                      wrote on last edited by
                      #12

                      @saurabh162 said in Process killed by signal:

                      Hello @J-Hilk,

                      One more question I am sending and receiving data using serial port both from Qt main application and Qt timer slot (triggered at interval of 1 second).

                      Whether this can also cause crash in application. May be when I try to access Serial port buffer both in Main application and slot of Qt Timer at same time.

                      Please note: Both my Main application and timer slot is running in same thread.

                      Hi,
                      as long as you don't manually spin the event loop, you're fine. The main application and the timer run in the same thread. That means the Slot evoked by the timer will be executed once the event loop returns, so all functions in your application should have returned as well.
                      IF you don't manually spin the event loop somewhere.


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        saurabh162
                        wrote on last edited by
                        #13

                        Hello @J-Hilk

                        Q) Can you please explain me what do you mean by manually spinning the event loop ?
                        Whether it means exiting from event loop, for example by calling exit() member function ?

                        Thank you ..!!

                        J.HilkJ 1 Reply Last reply
                        0
                        • S saurabh162

                          Hello @J-Hilk

                          Q) Can you please explain me what do you mean by manually spinning the event loop ?
                          Whether it means exiting from event loop, for example by calling exit() member function ?

                          Thank you ..!!

                          J.HilkJ Offline
                          J.HilkJ Offline
                          J.Hilk
                          Moderators
                          wrote on last edited by
                          #14

                          @saurabh162 I rather not :P it's bad design to do it, and way to many people do it.

                          But, there are 2 common ways to do it in Qt, I'm going to list them, so you may not use them, if possible.
                          a) Calling QCoreApplication::processEvents() and b) creating a new QEventLoop and calling start() on it.

                          If you're doing neither, then should be fine.


                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                          Q: What's that?
                          A: It's blue light.
                          Q: What does it do?
                          A: It turns blue.

                          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
                          • Unsolved