Printing to console at the same time as selecting text causes deadlock #269

Closed
opened 2026-01-30 21:47:22 +00:00 by claunia · 6 comments
Owner

Originally created by @LunarLambda on GitHub (May 19, 2018).

Microsoft Windows [Version 10.0.16299.431]
2018-05-19_23-34-36
Attempting to print text to the console and selecting text at the same time causes a deadlock.

Originally created by @LunarLambda on GitHub (May 19, 2018). Microsoft Windows [Version 10.0.16299.431] ![2018-05-19_23-34-36](https://user-images.githubusercontent.com/38919842/40273263-622713d8-5bbd-11e8-900b-fe0162f94a15.gif) Attempting to print text to the console and selecting text at the same time causes a deadlock.
claunia added the Work-Item label 2026-01-30 21:47:22 +00:00
Author
Owner

@miniksa commented on GitHub (Jun 6, 2018):

What is b? Which API is it calling?

@miniksa commented on GitHub (Jun 6, 2018): What is b? Which API is it calling?
Author
Owner

@LunarLambda commented on GitHub (Jun 6, 2018):

@miniksa basically while (true) puts("hi");

I also tested it with std::cout, and also WriteConsole directly.

@LunarLambda commented on GitHub (Jun 6, 2018): @miniksa basically while (true) puts("hi"); I also tested it with std::cout, and also WriteConsole directly.
Author
Owner

@miniksa commented on GitHub (Jun 6, 2018):

OK. Sometimes they back-end on different functions on our side. I'll whip up a little utility and try this out. Thanks.

@miniksa commented on GitHub (Jun 6, 2018): OK. Sometimes they back-end on different functions on our side. I'll whip up a little utility and try this out. Thanks.
Author
Owner

@miniksa commented on GitHub (Jun 6, 2018):

Hmmm, not happening for me on 17686. Let me go stand up a 16299 image and see if it happens.

@miniksa commented on GitHub (Jun 6, 2018): Hmmm, not happening for me on 17686. Let me go stand up a 16299 image and see if it happens.
Author
Owner

@miniksa commented on GitHub (Jul 16, 2018):

Not repro on 17718 (RS5 Insiders Build).
Not repro on 17134.1 (RS4 release).
Not repro on 16299.431 (RS3 release).

Please reactivate if you can provide the actual source code for "b" that makes this repro.

@miniksa commented on GitHub (Jul 16, 2018): Not repro on 17718 (RS5 Insiders Build). Not repro on 17134.1 (RS4 release). Not repro on 16299.431 (RS3 release). Please reactivate if you can provide the actual source code for "b" that makes this repro.
Author
Owner

@LunarLambda commented on GitHub (Jul 20, 2018):

Doesn't repro on my machine anymore (10.0.17134.112)

The code was

#include <stdio.h>

int main()
{
    while (1)
    {
        printf("hi");
    }
}
@LunarLambda commented on GitHub (Jul 20, 2018): Doesn't repro on my machine anymore (10.0.17134.112) The code was ```c #include <stdio.h> int main() { while (1) { printf("hi"); } } ```
Sign in to join this conversation.
No Label Work-Item
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#269