codelite icon indicating copy to clipboard operation
codelite copied to clipboard

[Bug]: incomplete output in console

Open blockchaindevel opened this issue 2 years ago • 4 comments

What happened?

Eran, I started seeing discrepancies in output when running programs from within CodeLite in the Windows Command Prompt window (cmd.exe). I have been able to duplicate this with the following simple code:

#include <iostream>
using namespace std;
int main () {
	for (int i=0;i<80;i++) {
		cout << "Test " << i << endl;
	}
	return 0;
}

This program builds and runs. However, the display is very erratic. Rarely it will display the expected output. More often, the display is incomplete and there are chunks of expected display that are not there. The issue seems to happen when we overflow the number of visible rows in the Command Prompt terminal.

I am using CodeLite 17.3.0 on Windows 11 Note that this issue ONLY seems to happen when running the program from within CodeLite.

I do NOT see the issue when running the same executable from the command line. Also, I am not seeing the issue on MacOSX or Ubuntu 22.04, both with 17.3.0. I've ruled out any configuration issue with cmd.exe since it also happens with alacrity and it does not happen from other IDEs.

Attached are 2 GIFs that show the issue clearly. Please let me know if you need any more information. P.S. I've already had several reports from users experiencing the same issue on Windows with CodeLite 17.3.0

Thanks! I hope you find the issue since this is a show stopper.

Note that when I redirect program output to a file from within CodeLite by adding >> outfile.txt in the 'Program Arguments' field in the Project Settings, everything is displayed correctly, with CRLF after each line.

run_1

run_2

Version

Other

Operating system

Windows 11

Steps to reproduce

No response

Relevant log output

No response

blockchaindevel avatar Jun 10 '23 02:06 blockchaindevel

I am using Windows 10, with classic CMD.EXE -> I don't see this. Did you change any configuration so that your CMD.EXE is opened within your Terminal app?

eranif avatar Jun 10 '23 04:06 eranif

Hi Eranif, I changed nothing. I'm teaching a C++ course using CodeLite and everyone upgraded to 17.3.0 and the Windows reports started coming in.
Thanks

blockchaindevel avatar Jun 10 '23 04:06 blockchaindevel

If you run that for loop with 10 or 20 iterations then no issues. The issue shows when the iterations exceed the number of rows in the terminal window.

blockchaindevel avatar Jun 10 '23 04:06 blockchaindevel