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

Build-in Terminal does not flush output of terminating process

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 15.0.0
    • Qt Creator 13.0.0
    • Terminal
    • None
    • Windows
    • 05e052901 (15.0)

      Output to std::cout is not flushed correctly when using the built-in terminal. See attached example of a simple helloworld.

      Using std::endl or std::flush does NOT solve the problem. The process either has to waste some time (using _sleep() or calling system()) or getting some input from the user (e.g. by using getchar()).

       

      The behaviour is inconsistent. Sometimes, "Hello, world!" is printed after informing about the return value of the process, sometimes the terminal is cleared and only the "Hello, world!" remains.

       

      As far as I can tell, the behaviour was correct in QtCreator 12 and is correct on macOS QtCreator 13.

       

      Best regards,

      Herwig

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            madwinter Marcus Tillmanns
            herwighenseler Herwig Henseler
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes