Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27010

Application output when running through debugger is sometimes truncated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • Qt Creator 7.0.0
    • Qt Creator 6.0.2
    • Debugger
    • None
    • Arch Linux
    • 035b8aa5f76b65a105bf4b311339fd43d35a7537

    Description

      When running an application through the debugger, the output displayed in "Application Output" can become truncated. This seems to be related to outputting a large amount of output very quickly.

       

      For example, take the following trivial program:

      #include <stdio.h>
      
      int main()
      {
          for (int i = 0; i < 10000; ++i)
              printf("%d\n", i);
          return 0;
      }
      

       

      This will very often truncate the output. For example, the last several lines may be the following:

      2674
      2675
      2676
      2677
      2678
      26718:33:27: Debugging of <program> has finished with exit code 0.
      

       

      This truncation is also visible when viewing the Global Debugger Log:

       2675
       2676
       2677
       2678
       267
      
      
      >~"[Inferior 1 (process 79120) exited normally]\n"
      >=thread-exited,id="1",group-id="i1"
       Thread 1 in group i1 exited.
      

       

      When attempting to run the gdb command directly (with the -i mi option) I haven't seen the output to the terminal truncated. From what I can tell the output isn't truncated when running the application without the debugger. I set stderr and stdout to be merged, but toggling this option doesn't seem to affect the behavior.

       

      I've seen this bug to some extent for quite a while, at least the last few versions. In practice it seemed to randomly occur every once in a while, but it upon investigation it's likely a combination of application behavior (of amount of output sent quickly) and timing of when the output is actually read by the IDE.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-27010
        # Subject Branch Project Status CR V

        Activity

          People

            hjk hjk
            akb825 Aaron Barany
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes