Output corruption in CLion

Console output corrupts (line beginning duplicated) sometimes. For example, following code:

#include <iostream>

int main() {
for (int i = 1; i <= 20; i++) {
for (int j = 1; j <= i; j++) {
std::cout << j << " ";
}
std::cout << std::endl;
}
return 0;
}

Can produce such output:

C:\Users\Makc\.CLion2016.1\system\cmake\generated\clion_cout-271bcde2\271bcde2\Debug\clion_cout.exe
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12 13
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Process finished with exit code 0

Note this is not rearranged output - this is partial copy of line.
Error often breaks formatted (aligned) log output. In standart windows console same executable output works fine.

Win 7 x64 (6.1.7601)
CLion 2016.1.3 build 145.1617
JRE: 1.8.0_91-b15 amd64

3 comments
Comment actions Permalink

Hi Maxim.

Sorry for the inconvenience! Could you please specify which tool you are using: MinGW or Cygwin? Also please check that "run.processes.with.pty" option in Registry (Help | Find Action..., type "Registry" there) is enabled. Did you try using CLion 2016.2 EAP? Will the problem occur there?

0
Comment actions Permalink

HI, Anna.

I'm using MinGW w64 (MSYS2), gcc 5.4

"run.processes.with.pty" is enabled, problem dissapears if option set to disable, but continious output hangs adter few seconds.

Problem doesn't occure in EAP, i'll try it or wait for 2016.2 release.

0
Comment actions Permalink

Maxim, thanks for the details! Please don't disable "run.processes.with.pty" iRegistry because it's not a recommended way. We only wanted to check the value.

0

Please sign in to leave a comment.