Jump to content
Eternal Lands Official Forums
Quesar

chat bug in console

Recommended Posts

Hi devs,

 

There is a bug in console mode where old chat can show up in the bottom.

 

With the resolution I run (1280x680) I normally have 3 blank lines in the bottom of the console. After the client has been running for a while, and the entire chat buffer gets filled and starts to loop around, I get old chat from the beginning of the buffer showing up on the bottom 3 lines. I've had it happen on another system in a different resolution (sorry can't recall details) where it had 2 blank lines instead of 3. This is what it looks like on my machine atm:

 

chat-bug.jpg

 

 

As you can see from the mini-map, I'm clearly in neither PL sto nor C1 portals, lol.

 

If I #cls, the problem goes away, but will come back if I leave the client running long enough again.

Edited by Quesar

Share this post


Link to post
Share on other sites

Fixed now. I rewrote the code to be a lot simpler. Instead of using a circular buffer, the oldest few lines are now deleted and the remainder moved up the buffer. I set it to delete 100 of the 5000 lines. Potentially more work (each time 100 lines are deleted) but still insignificant compared to everything else.

Share this post


Link to post
Share on other sites

Fixed now. I rewrote the code to be a lot simpler. Instead of using a circular buffer, the oldest few lines are now deleted and the remainder moved up the buffer. I set it to delete 100 of the 5000 lines. Potentially more work (each time 100 lines are deleted) but still insignificant compared to everything else.

 

A circular buffer might be "more complex", but the way you implemented it is rather slow and not recommended at all. Although, I appreciate your work ofcourse ;)

Share this post


Link to post
Share on other sites

"rather slow" is not a useful measure nor perhaps is my "insignificant" assessment. However, I timed the new code and, even on my ancient laptop (1.6MHz Intel mobile) which is too slow to play EL, it took less than a millisecond to execute. As I said, I'm fully aware that the new code will be slower than the old, its just insignificantly slower. Also, it will only run once in 100 new lines for an already full buffer. I spent a significant amount of time attempting to find the real bug and no one else came forward with a fix in all the time since this was reported. Perhaps those that don't "recommend" this method could have a ago. I appreciate your comments of course ;)

Edited by bluap

Share this post


Link to post
Share on other sites

I haven't looked at the new code, but as the author of the original circular buffer, I'm glad to see it's gone :) The thing has always been more trouble than it was worth, and, as bluap found, too complicated to easily understand. I still think the idea was nice, but the code as it stood was unmaintainable.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×