Kurukuru icon indicating copy to clipboard operation
Kurukuru copied to clipboard

Throws an exception under certain conditions when using multiple spinners.

Open ghost opened this issue 3 years ago • 0 comments

Although the conditions under which this occurs have not been identified, it is more likely to occur when the console is shrunk while displaying long text containing characters of different byte counts.

environment

  • Windows10
  • .NET 6.0
  • Visual Studio 2022
Console.OutputEncoding = Encoding.UTF8;
var spinner1 = new Spinner("あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめも");
var spinner2 = new Spinner("aあいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめも");
spinner1.Start();
spinner2.Start();

Thread.Sleep(100_000);
spinner1.Succeed();
spinner2.Succeed();

System.AggregateException: 'One or more errors occurred. (パイプの他端にプロセスがありません。)' 内部例外 IOException: パイプの他端にプロセスがありません。

この例外は、最初にこの呼び出し履歴 System.ConsolePal.GetBufferInfo(bool, out bool) System.ConsolePal.GetCursorPosition() Kurukuru.Spinner.Render(string) 場所: Spinner.cs Kurukuru.Spinner.Start.AnonymousMethod__0() 場所: Spinner.cs でスローされました

ghost avatar Aug 04 '22 12:08 ghost