Visual C++ 2022 cout bug?
-
Latest update: the bug is gone after I run cmd console, instead of the new Terminal console. Case closed. Thanks everybody for checking and testing. I found a
cout
bug with Visual C++ 2022 on Windows 11. VC++ 2019 does not have this bug. When I try to debug, the problem goes away. I have produced a small repo that reproduces the issue. Please help me check so that I can report this bug to Microsoft. Thanks. -
Latest update: the bug is gone after I run cmd console, instead of the new Terminal console. Case closed. Thanks everybody for checking and testing. I found a
cout
bug with Visual C++ 2022 on Windows 11. VC++ 2019 does not have this bug. When I try to debug, the problem goes away. I have produced a small repo that reproduces the issue. Please help me check so that I can report this bug to Microsoft. Thanks.I cannot confirm the bug. Everything works in the order expected. Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x86 on Windows 11 Pro Version 22H2 (OS Build 22621.1555)
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
I cannot confirm the bug. Everything works in the order expected. Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x86 on Windows 11 Pro Version 22H2 (OS Build 22621.1555)
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakThanks. Your Visual C++ and Windows edition is the same as mine. Did you run it a few times? The bug has 50% chance of reproducing when run normally (meaning not debugging).
-
Latest update: the bug is gone after I run cmd console, instead of the new Terminal console. Case closed. Thanks everybody for checking and testing. I found a
cout
bug with Visual C++ 2022 on Windows 11. VC++ 2019 does not have this bug. When I try to debug, the problem goes away. I have produced a small repo that reproduces the issue. Please help me check so that I can report this bug to Microsoft. Thanks.Its working fine here on Windows 10, VS 17.5.5, so I would suspect the Windows 11 terminal - can you try running it in a cmd.exe window instead?
-
Its working fine here on Windows 10, VS 17.5.5, so I would suspect the Windows 11 terminal - can you try running it in a cmd.exe window instead?
My c:\windows\system32\cmd.exe is already the new Windows 11 terminal. I am not sure where the old cmd.exe is.
-
My c:\windows\system32\cmd.exe is already the new Windows 11 terminal. I am not sure where the old cmd.exe is.
-
If the Terminal in Windows 11 is the same as the one in 10 then you can configure it to run cmd, Powershell, Linux shell etc.
Thanks for your suggestion. I have configured it to run the normal cmd window by right-clicking the tab area and choosing "Settings" in the pop-up menu and selecting accordingly. The bug is gone.
-
I cannot confirm the bug. Everything works in the order expected. Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x86 on Windows 11 Pro Version 22H2 (OS Build 22621.1555)
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakThe bug is gone after I followed Richard's suggestion to run the old cmd console. Thanks for testing.
-
Its working fine here on Windows 10, VS 17.5.5, so I would suspect the Windows 11 terminal - can you try running it in a cmd.exe window instead?
Using the cmd.exe window, the bug is gone.
-
Thanks for your suggestion. I have configured it to run the normal cmd window by right-clicking the tab area and choosing "Settings" in the pop-up menu and selecting accordingly. The bug is gone.
-
Before my change to the old normal cmd, the new Terminal console has a tabbed interface and was slower than cmd window. I did not change my code. Now it is running fine.
-
Before my change to the old normal cmd, the new Terminal console has a tabbed interface and was slower than cmd window. I did not change my code. Now it is running fine.
Mine also has a tabbed interface, so I have three tabs:
cmd
,PowerShell
andLinux
under WSL. It seems just as fast as anything else. I can only assume there is another interface that is the default in the 11 version. Unfortunately (or maybe not) my PC does not support Windows 11. -
Thanks. Your Visual C++ and Windows edition is the same as mine. Did you run it a few times? The bug has 50% chance of reproducing when run normally (meaning not debugging).
Only about 30 times, and it never happened even once.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
If the Terminal in Windows 11 is the same as the one in 10 then you can configure it to run cmd, Powershell, Linux shell etc.
Richard MacCutchan wrote:
Terminal in Windows
I am not familiar with that. Presumably it is the following which one must install specifically, at least in Windows 10? An overview on Windows Terminal | Microsoft Learn[^] So you use that normally? I am curious why do you consider that ideal rather than going directly to either cmd or a linux shell?
-
The bug is gone after I followed Richard's suggestion to run the old cmd console. Thanks for testing.
I was using CMD Prompt and Powershell in Terminal with no issues at all, in both Debug and Release builds.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Richard MacCutchan wrote:
Terminal in Windows
I am not familiar with that. Presumably it is the following which one must install specifically, at least in Windows 10? An overview on Windows Terminal | Microsoft Learn[^] So you use that normally? I am curious why do you consider that ideal rather than going directly to either cmd or a linux shell?
-
I was using CMD Prompt and Powershell in Terminal with no issues at all, in both Debug and Release builds.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakIt looks like nobody is encountering this issue except me. Thanks again. You can stop testing.