Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Segmentation fault on dummy app
QtWS25 Last Chance

Segmentation fault on dummy app

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
imx6yocto
14 Posts 4 Posters 6.0k 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.
  • VincentBV Offline
    VincentBV Offline
    VincentB
    wrote on last edited by
    #4

    No I did a mistake when I copy/paste

    1 Reply Last reply
    0
    • raven-worxR raven-worx

      @VincentB
      did you compile Qt yourself?
      Please also post the stack trace of the crash

      VincentBV Offline
      VincentBV Offline
      VincentB
      wrote on last edited by
      #5

      @raven-worx ,

      Qt has been compiled by yocto.

      What steps I have to follow to have a stack trace ?

      raven-worxR 1 Reply Last reply
      0
      • miclandM Offline
        miclandM Offline
        micland
        wrote on last edited by
        #6

        @VincentB
        As I see you use QApplication which is designed for GUI apps. I don't think that this is the reason but can you try to replace QApplication with QCoreApplication and repeat the test?

        Footnote: I can't reproduce the error with Qt 5.5 on Ubuntu (no crash).

        VincentBV 1 Reply Last reply
        0
        • miclandM micland

          @VincentB
          As I see you use QApplication which is designed for GUI apps. I don't think that this is the reason but can you try to replace QApplication with QCoreApplication and repeat the test?

          Footnote: I can't reproduce the error with Qt 5.5 on Ubuntu (no crash).

          VincentBV Offline
          VincentBV Offline
          VincentB
          wrote on last edited by
          #7

          @micland ,

          With QCoreApplication, there is no problem. What could we conclude ?

          miclandM kshegunovK 2 Replies Last reply
          0
          • VincentBV VincentB

            @micland ,

            With QCoreApplication, there is no problem. What could we conclude ?

            miclandM Offline
            miclandM Offline
            micland
            wrote on last edited by
            #8

            @VincentB said:

            With QCoreApplication, there is no problem. What could we conclude ?

            Fine - we found a solution :) But I have no idea what the problem is. QApplication inherits QGuiApplication which inherits QCoreApplication. In my opinion the child classes just add additional GUI related functionality but should not have different behaviour (and shall not have following the Liskov substitution principle).
            The documentation only says that QCoreApplication should be used for non-GUI applications because it has no dependencies to QWidgets. But there is no note that you have to use only QCoreApplication.
            Perhaps someone else here knows more about the internas of the three classes?

            1 Reply Last reply
            0
            • VincentBV VincentB

              @micland ,

              With QCoreApplication, there is no problem. What could we conclude ?

              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by
              #9

              @VincentB @micland
              Well,
              QCoreApplication does almost nothing - it starts an event loop, while QApplication is fat and heavy and loads plugins and platform integrations and widgety things, so it may simply be a bug. But in any case @raven-worx's request is relevant, you should obtain a stack trace from the crash (how depends on the IDE and its setup).

              Kind regards.

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              0
              • VincentBV Offline
                VincentBV Offline
                VincentB
                wrote on last edited by VincentB
                #10

                Ok,

                I''ve done this test cause on my main gui application I've got the same problem. Now, I'll search how to get a good stack trace to poste here (Unless you can advice me on how to do that).

                1 Reply Last reply
                0
                • VincentBV VincentB

                  @raven-worx ,

                  Qt has been compiled by yocto.

                  What steps I have to follow to have a stack trace ?

                  raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #11

                  @VincentB
                  from where do you have the console output? From your IDE?
                  If so there should also be a window which shows the stack trace at the time of the crash.

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  VincentBV 1 Reply Last reply
                  0
                  • raven-worxR raven-worx

                    @VincentB
                    from where do you have the console output? From your IDE?
                    If so there should also be a window which shows the stack trace at the time of the crash.

                    VincentBV Offline
                    VincentBV Offline
                    VincentB
                    wrote on last edited by
                    #12

                    @raven-worx ,

                    Hi, ok, I'll check this

                    1 Reply Last reply
                    0
                    • VincentBV Offline
                      VincentBV Offline
                      VincentB
                      wrote on last edited by
                      #13

                      Sorry but I'm not sure to find where to find this stack window .. (I'm using qtcreator 3.6.0)

                      raven-worxR 1 Reply Last reply
                      0
                      • VincentBV VincentB

                        Sorry but I'm not sure to find where to find this stack window .. (I'm using qtcreator 3.6.0)

                        raven-worxR Offline
                        raven-worxR Offline
                        raven-worx
                        Moderators
                        wrote on last edited by raven-worx
                        #14

                        @VincentB said:

                        Sorry but I'm not sure to find where to find this stack window .. (I'm using qtcreator 3.6.0)

                        see this.

                        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                        If you have a question please use the forum so others can benefit from the solution in the future

                        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