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. Console app gets segfault running in qt creator. But, it works fine running from terminal.

Console app gets segfault running in qt creator. But, it works fine running from terminal.

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.1k 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.
  • D Offline
    D Offline
    dwilliams
    wrote on last edited by
    #1

    I have a Qt console application that has been running fine for serveral months. Recently, I've added some new classes and processing. Now, when I run the code with the run or debug buttons in Qt, I get a segfault error. If I run it from the command line directly, it runs fine.

    I've traced it down to a call to a third-party sdk. If I take that call out, it runs fine in both the terminal and in Qt.

    Any suggestions what I can look at to try to understand why it crashes running in Qt creator but not in a terminal window?

    Thanks,
    Daniel

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What does the crash stack trace tell you ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dwilliams
        wrote on last edited by
        #3

        The application window has the following:

        IPSdevice: kApi/Utils/kUtils.cpp:963: kStatus xkDefaultAssert(const kChar*, k32u): Assertion `0' failed.
        16:28:02: The program has unexpectedly finished.
        16:28:02: The process was ended forcefully.
        16:28:02: /home/inplant/scannerRD/builds/debug/InPlantScanner/IPSdevice/IPSdevice crashed.

        I'm not sure how to get more stack trace than that in Qt Creator when running interactively.

        Note: kApi is a third-party library. And it works fine if I run the application in a terminal window.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you also running a debug build from the command line ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            Are you also running a debug build from the command line ?

            D Offline
            D Offline
            dwilliams
            wrote on last edited by
            #5

            @SGaist Yes. I run the exact same binary on the command line as in Qt creator.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Did you modify your PATH environment variable at some point ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              D 1 Reply Last reply
              1
              • SGaistS SGaist

                Did you modify your PATH environment variable at some point ?

                D Offline
                D Offline
                dwilliams
                wrote on last edited by
                #7

                @SGaist I found a call into the sdk on which the error was happening. I re-wrote that section and it seems to be working. I'm not sure what it was, but I have been able to resolve it. Thank you!

                A 1 Reply Last reply
                2
                • D dwilliams

                  @SGaist I found a call into the sdk on which the error was happening. I re-wrote that section and it seems to be working. I'm not sure what it was, but I have been able to resolve it. Thank you!

                  A Offline
                  A Offline
                  alexltz
                  wrote on last edited by
                  #8

                  @dwilliams Hi, i have the same problem, how did you re-write it to solve the problem?

                  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