ANSI colors not being displayed

chrio
Posts: 66
Joined: Mon Aug 22, 2016 11:34 am

ANSI colors not being displayed

Post by chrio » Mon Jul 23, 2018 11:14 pm

Hi All,

so I got the urge to try my old mud today and after updating mudlet from 3.0 to the current version I gave it a go.
Logging in with my old profile worked as it should, but the ansi colors were not displayed.

Checking with another mud client on the same accound did display the colors. I tested with a new profile from scratch with the same result.

Checking the traffic with wireshark I can see that color codes are being sent, but they all show up in the same color to me (no control codes being visible on client screen).

Here is an example of the output from one packet captured with wireshark:

Code: Select all

[36;1m[-Druids-] The trees whisper happily: MyName the historic druid of hazels is
           here.[38;40;0m
Ok.
[42;37;1mThe chambers of the Druids' Guild[38;40;0m[42;37m <out e w n s>[38;40;0m.
[44;36mThis is the main chamber of the Druids' Guild where the members come to
socialize. The smell of incense hangs in the air, making you feel relaxed and
slightly sleepy. To the north you can visit the pub if you need to refresh
yourself and to the south 
This worked fine a year ago, and as far as I know nothing has changed server-side since then.
I tried another mud from the basic profiles, and ansi colors there seemed to work at the login screen. I even tried to copy that profile and change host, but that didn't work either.

Any suggestions on what else I can check?

User avatar
Vadi
Posts: 4608
Joined: Sat Mar 14, 2009 3:13 pm

Re: ANSI colors not being displayed

Post by Vadi » Tue Jul 24, 2018 6:51 am

Can you record a Mudlet replay for us to look at? It's the casette bottom-right of the screen.

chrio
Posts: 66
Joined: Mon Aug 22, 2016 11:34 am

Re: ANSI colors not being displayed

Post by chrio » Tue Jul 24, 2018 7:41 am

Vadi wrote:
Tue Jul 24, 2018 6:51 am
Can you record a Mudlet replay for us to look at? It's the casette bottom-right of the screen.
Sure thing, here is a small one:
24-07-2018#09-31-16.dat
Mudlet replay
(3.79 KiB) Downloaded 47 times

User avatar
Vadi
Posts: 4608
Joined: Sat Mar 14, 2009 3:13 pm

Re: ANSI colors not being displayed

Post by Vadi » Tue Jul 24, 2018 4:28 pm

SlySven, would you have any idea?

chrio
Posts: 66
Joined: Mon Aug 22, 2016 11:34 am

Re: ANSI colors not being displayed

Post by chrio » Tue Jul 24, 2018 8:21 pm

Just a small update to my problem:
Not sure if this is useful, but I did some more testing with a new profile and noticed that the very first color sequence works, but then that color gets stuck for the remainder of the buffer, so no more ansi sequences have an effect.

chrio
Posts: 66
Joined: Mon Aug 22, 2016 11:34 am

Re: ANSI colors not being displayed

Post by chrio » Wed Jul 25, 2018 3:08 pm

So I tested the latest linux version of mudlet (v3.11.1) to see how that handled the problem and it behaved slightly different.

On Linux the ansi colours are not displayed at all. On the plus side I get warnings written to the console, hopefully they can provide some insight to the problem.

The warnings look like this:
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 37
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 1
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 40
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 0
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 32
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 40
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 0
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 37
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 1
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 40
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 0
Recording and all warnings for the short session:
25-07-2018#16-25-00.dat
recording
(4.58 KiB) Downloaded 24 times
warnings.txt
console warnings
(17.61 KiB) Downloaded 20 times

User avatar
Vadi
Posts: 4608
Joined: Sat Mar 14, 2009 3:13 pm

Re: ANSI colors not being displayed

Post by Vadi » Wed Jul 25, 2018 3:17 pm


chrio
Posts: 66
Joined: Mon Aug 22, 2016 11:34 am

Re: ANSI colors not being displayed

Post by chrio » Wed Jul 25, 2018 3:57 pm

Vadi wrote:
Wed Jul 25, 2018 3:17 pm
How do these test builds work for you:

https://ci.appveyor.com/api/buildjobs/f ... mudlet.zip (windows)
https://transfer.sh/rYwRp/Mudlet-3.11.1 ... pImage.tar (linux)
The linux version still has the problem. I'll reboot and try the windows one aswell.
Also getting some new INFO records during mouse movements:
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 31
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 40
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 0
TTextEdit::paintEvent(...) INFO paint rectangle is: QRect(0,0 848x902) on: "main" (upper pane)
TBuffer::translateToPlainText(...) Warning unknown ANSI SGR 38/48 type color code encountered, first parameter is: 40
TBuffer::translateToPlainText(...) Warning unhandled ANSI SGR 38/48 type color code encountered, first parameter is: 0
TTextEdit::paintEvent(...) INFO paint rectangle is: QRect(0,0 848x902) on: "main" (upper pane)
TTextEdit::paintEvent(...) INFO paint rectangle is: QRect(0,0 848x902) on: "main" (upper pane)
TTextEdit::paintEvent(...) INFO paint rectangle is: QRect(0,0 848x902) on: "main" (upper pane)

chrio
Posts: 66
Joined: Mon Aug 22, 2016 11:34 am

Re: ANSI colors not being displayed

Post by chrio » Wed Jul 25, 2018 4:06 pm

Still the same behaviour in windows aswell i'm afraid.

User avatar
SlySven
Posts: 892
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: ANSI colors not being displayed

Post by SlySven » Thu Jul 26, 2018 11:59 am

Those `TTextEdit::paintEvent` are some debug lines that got left in accidentally - they are not important for this. I am just taking a look at this and will see what I can find - I expect some recent improvement I made to the ANSI SGR code handling has made things much better except for a corner case that is now being hit...

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests