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. Good practice to debug an application

Good practice to debug an application

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 410 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.
  • T Offline
    T Offline
    Thombou
    wrote on last edited by aha_1980
    #1

    Hi all,
    I have been given a code using qwt and one other library. The code has been provided as examples by the developer of the second library (which you have to buy).
    When I try to recompile the code, I do not get any error (only some warnings) but when I try to run the application from QtCreator, I have the following error:
    The program has unexpectedly finished. The process was ended forcefully.

    The awarning are about deprecated use of QtFlags or something similar, could it matter?
    I have nothing more than that.

    To find out what is the problem I have been compiling examples from the qwt library and it worked well. So I suppose that the qwt installation is not the problem. When I try to run the executable of the example I want to compile (the .exe files are also provided) it also work.
    I coped all libraries and dll in the folder where I build the application, but I suppose I would have another kind of problem if it was due to a missing library.

    Any idea on how to approach this problem and debug that? How to start?

    Thanks for your advices,
    Thombou

    jsulmJ B 2 Replies Last reply
    0
    • T Thombou

      Hi all,
      I have been given a code using qwt and one other library. The code has been provided as examples by the developer of the second library (which you have to buy).
      When I try to recompile the code, I do not get any error (only some warnings) but when I try to run the application from QtCreator, I have the following error:
      The program has unexpectedly finished. The process was ended forcefully.

      The awarning are about deprecated use of QtFlags or something similar, could it matter?
      I have nothing more than that.

      To find out what is the problem I have been compiling examples from the qwt library and it worked well. So I suppose that the qwt installation is not the problem. When I try to run the executable of the example I want to compile (the .exe files are also provided) it also work.
      I coped all libraries and dll in the folder where I build the application, but I suppose I would have another kind of problem if it was due to a missing library.

      Any idea on how to approach this problem and debug that? How to start?

      Thanks for your advices,
      Thombou

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Thombou said in Good practice to dedug an application:

      Any idea on how to approach this problem and debug that?

      Start the app (debug build) in QtCreator and check the stack trace when it is terminated.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      3
      • T Thombou

        Hi all,
        I have been given a code using qwt and one other library. The code has been provided as examples by the developer of the second library (which you have to buy).
        When I try to recompile the code, I do not get any error (only some warnings) but when I try to run the application from QtCreator, I have the following error:
        The program has unexpectedly finished. The process was ended forcefully.

        The awarning are about deprecated use of QtFlags or something similar, could it matter?
        I have nothing more than that.

        To find out what is the problem I have been compiling examples from the qwt library and it worked well. So I suppose that the qwt installation is not the problem. When I try to run the executable of the example I want to compile (the .exe files are also provided) it also work.
        I coped all libraries and dll in the folder where I build the application, but I suppose I would have another kind of problem if it was due to a missing library.

        Any idea on how to approach this problem and debug that? How to start?

        Thanks for your advices,
        Thombou

        B Offline
        B Offline
        Bonnie
        wrote on last edited by Bonnie
        #3

        @Thombou said in Good practice to dedug an application:

        I coped all libraries and dll in the folder where I build the application, but I suppose I would have another kind of problem if it was due to a missing library.

        Are you running in windows?
        If yes, this is exactly what will happen when missing any dynamic library (dll).
        Double clicking the exe will tell you which ones are missing.

        1 Reply Last reply
        4
        • jsulmJ jsulm

          @Thombou said in Good practice to dedug an application:

          Any idea on how to approach this problem and debug that?

          Start the app (debug build) in QtCreator and check the stack trace when it is terminated.

          T Offline
          T Offline
          Thombou
          wrote on last edited by
          #4

          @jsulm I did so but even with a breakpoint on the first line of the main, the debugger does not stop and the application crashes before.

          jsulmJ 1 Reply Last reply
          0
          • T Thombou

            @jsulm I did so but even with a breakpoint on the first line of the main, the debugger does not stop and the application crashes before.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Thombou Then follow @Bonnie advice.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Thombou
              wrote on last edited by
              #6

              Hi,
              It was indeed a missing DLL plus some conflicts with the DLL I copied from the example directory. The DLL copied from the example provided with the code were not compatible with the version of qwt I was using.
              Using the dependency walker helped me to figure it out.
              Thanks everybody!

              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