Cosmos: Text problem.

Created on 21 Apr 2017  路  20Comments  路  Source: CosmosOS/Cosmos

I think this is a bug, but why when the new Console.WriteLine("Test"); appears, there is sometimes some text in addition:
capture

Bug Low Medium Up for Grabs

Most helpful comment

@Lercher The problem is not scrolling but yes how log the string is. I tested

All 20 comments

does this happen every time

@zarlo not every time :/

In Windows .net console programs such effects are common, when you use the console in multiple threads concurrently. Here it seems to be a problem with scrolling the console contents in parallel with outputting some text to it.

And how can I solve it @Lercher ?

why do you need to do console.writeline("test") anyway

@DjAlEx234 to do commands, here in the screenshot "help" to see all other commands !

@Lercher The problem is not scrolling but yes how log the string is. I tested

That is does it happens when you do Console.WriteLine() in a for loop?

@fanoI it happens when a string is superior than 40 characters.
Edit: I modified public override UInt16 Cols { get { return 80; } } to public override UInt16 Cols { get { return 40; } } in TextScreen.cs and I can see it is really at the half of columns (80 col by default) that console bug...
captrure

Good catch!
So it seems that in some part of the Console.Write() code there is a wrong Cols / 2...

The problem should be here:
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System/Console.cs#L72

or more probably here (why there is multiplication by 2?):
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.HAL/TextScreen.cs#L71

well try to "play" with it, I think you are closer to find the bug!

Anyone got any solutions for this?

@Arawn-Davies no :/

dang :/ what could it be? is it like when the WriteLine string is more than 80? or 40? or what :/

The bug happens when the string is longer than the half of the "console" columns (80 columns).

ah, whats the current console size? 80x25?

I've seen this on my Linux distribution. This seems to be a default problem with OSes.

Did you fix this ?

I pushed a fix for this bug to the netcore branch, it should be working now.

It is working ! :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

365Tito picture 365Tito  路  10Comments

ArtyIF picture ArtyIF  路  9Comments

jpmac26 picture jpmac26  路  8Comments

seba4316 picture seba4316  路  8Comments

fanoI picture fanoI  路  8Comments