Coder Social home page Coder Social logo

Comments (7)

rpwjanzen avatar rpwjanzen commented on August 30, 2024 1

This issue does occur when there is some drawing space visible. It appears to happen when the Console.SetCursorPosition(_, 0) is called. v1.2.2 appears to have fixed the issue.

from c-sharp-console-gui-framework.

TomaszRewak avatar TomaszRewak commented on August 30, 2024

I wasn't able to reproduce it on my side.
What OS/terminal are you using?

But nevertheless, adding a SafeConsole.SetCursorPosition seems like a good idea regardless. Those console APIs are bit wonky.

from c-sharp-console-gui-framework.

TomaszRewak avatar TomaszRewak commented on August 30, 2024

Should be fixed in v1.2.1 by 1863c5c
Please let me know if you can reproduce this issue with the new version of the package.

from c-sharp-console-gui-framework.

rpwjanzen avatar rpwjanzen commented on August 30, 2024

I am using the "Command Prompt" (cmd.exe) terminal on Windows 10 version 1903 (Build 18362.1139).

Below is an example of code that will reproduce the issue.

    // while running, resize the window to be really small
    class Program
    {
        static void Main(string[] args)
        {
            ConsoleManager.Setup();
            ConsoleManager.Content = new TextBlock
            {
                Text = "Text Block"
            };

            while (true)
            {
                ConsoleManager.AdjustWindowSize();
                System.Threading.Thread.Yield();
            }
        }
    }

The stack trace

   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at ConsoleGUI.Api.SimplifiedConsole.Write(Position position, Character& character) in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\Api\SimplifiedConsole.cs:line 24
   at ConsoleGUI.ConsoleManager.Update(Rect rect) in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at ConsoleGUI.Api.SimplifiedConsole.Write(Position position, Character& character) in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\Api\SimplifiedConsole.cs:line 24
   at ConsoleGUI.ConsoleManager.Update(Rect rect) in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\ConsoleManager.cs:line 148
   at ConsoleGUI.ConsoleManager.Redraw() in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\ConsoleManager.cs:line 126
   at ConsoleGUI.ConsoleManager.Initialize() in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\ConsoleManager.cs:line 121
   at ConsoleGUI.ConsoleManager.Resize(Size& size) in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\ConsoleManager.cs:line 168
   at ConsoleGUI.ConsoleManager.AdjustWindowSize() in C:\Users\...\C-sharp-console-gui-framework\ConsoleGUI\ConsoleManager.cs:line 180
   at Repro.Program.Main(String[] args) in C:\Users\...\Repro\Program.cs:line 25

from c-sharp-console-gui-framework.

TomaszRewak avatar TomaszRewak commented on August 30, 2024

I think I was able to reproduce it on my end as well.
Can you please confirm that it only happens when the window is resized to a point where it's completely collapsed?
image
Or does it happen also where there is some drawind space visible?

from c-sharp-console-gui-framework.

TomaszRewak avatar TomaszRewak commented on August 30, 2024

Should be fixed in v1.2.2 by 42fd2f8

from c-sharp-console-gui-framework.

TomaszRewak avatar TomaszRewak commented on August 30, 2024

Interesting, on my side it was only happening when the window was 0px tall.
But v1.2.2 should take care of that and all other edge cases.

I'm closing the ticket.

Thanks for reporting and the help in investigating :)

from c-sharp-console-gui-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.