[Tizen] Handle exception in System.Console.SetCursorPosition in some environments#3635
[Tizen] Handle exception in System.Console.SetCursorPosition in some environments#3635gbalykov wants to merge 1 commit intodotnet:mainfrom
Conversation
…environments System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top') Actual value was -1. at System.Console.SetCursorPosition(Int32 left, Int32 top) at Microsoft.Internal.Common.Utils.LineRewriter.SystemConsoleLineRewriter() at Microsoft.Internal.Common.Utils.LineRewriter.RewriteConsoleLine() at Microsoft.Diagnostics.Tools.Trace.CollectCommandHandler.<>c__DisplayClass6_2.b__4() at Microsoft.Diagnostics.Tools.Trace.CollectCommandHandler.Collect(CancellationToken ct, IConsole console, Int32 processId, FileInfo output, UInt32 buffersize, String providers, String profile, TraceFileFormat format, TimeSpan duration, String clrevents, String clreventlevel, String name, String diagnosticPort, Boolean showchildio, Boolean resumeRuntime
|
Thanks @gbalykov! What does the new console output look like after your change in the failure case? I'm trying to figure out if we should be writing that error message you added, failing silently, or perhaps output something else. |
|
Output before looks like this: Output after will look smth like this: |
|
Normally we'd see something like this: Are you saying all that output is gone now? I was expecting the 'Recording trace ...' to be the first line of output that was impacted by the problem. Higher level my worry is that 'Console.SetCursorPosition() is not supported in this env.' isn't going to be very meaningful to users. They might understand literally what the message is telling them, but they won't know why it matters or to what degree the functioning of dotnet-trace has been impacted. Ideally I hope we could write some alternate output like this when we can't do in-place updates: |
|
@gbalykov Please close this one. |
For some environments that do not support some terminal interactions next exception happens:
Is there a better fix for this?
cc @HJLeee @alpencolt