[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  MUSHclient may disconnect before all output has been received

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: MUSHclient may disconnect before all output has been received
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1  2  3 

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Tue 09 Feb 2010 01:58 AM (UTC)  quote  ]
Message
That sounds very plausible. Thanks again, Nick!

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 09 Feb 2010 01:55 AM (UTC)  quote  ]

Amended on Tue 09 Feb 2010 01:56 AM (UTC) by Nick Gammon

Message
Well I carefully stepped through it with the debugger. Although the problem point is around when compression is turned on, I don't believe MUSHclient is faulty here.

I confirmed we were in compressed mode by the time it asked for the name (and waited for a reply) (as you can see from the packet debug, where it asks for the name after sending <IAC><SB><MCCP><IAC><SE>), so it is not as if the transition from uncompressed to compressed is causing the problem per se.

This seems to me to relate to the other problem with Achaea, where you don't see the final "goodbye" message after disconnecting. I speculated at the time they might not be flushing the compressed data, and this seems to me to be the same thing. Note what happens in decompressed mode:


What is your password? <IAC><GA>
<IAC><WILL><1>


So that final 3 bytes could still be in the compressed buffer at the server end. The zLib documentation recommends *against* flushing the buffer all the time, as that would cause a performance hit.

OTOH, they must flush the buffer when prompting for input, or you would probably miss every 2nd prompt.

My guess is, they flush the buffer after <IAC> <GA>, to make sure the player sees the prompt. So it would look like this:


What is your password? <IAC><GA> <flush>
<IAC><WILL><1>


In other words, they didn't flush after the <IAC><WILL><1>.

Also, the bug (see page 1 of this thread) where you don't see:


You feel your insides clench as your soul is frozen.
You have played 4095 games.

Goodbye for now!


... could be explained the same way. They aren't sending <IAC><GA> so they aren't flushing that final message.

I suggest a polite message to the Achaea admins along the lines of:


  • Please flush the zlib buffer after sending <IAC><WILL><1> after requesting the password.

  • Please flush the buffer after the final "Goodbye for now!" message.


That should fix your problems.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 09 Feb 2010 01:18 AM (UTC)  quote  ]

Amended on Tue 09 Feb 2010 01:27 AM (UTC) by Nick Gammon

Message
OK, I think I have worked it out.

Version 4.48:


Enter an option or enter your character's name. <IAC><GA>
<IAC><DONT><EOR><IAC><DONT><200><IAC><DONT><MCCP>
1
<IAC><WONT><EOR><IAC><WONT><200><IAC><WONT><MCCP>
What is the name you are known by in Achaea? > <IAC><GA>
<IAC><DONT><EOR><IAC><DONT><200><IAC><DONT><MCCP>
name
What is your password? <IAC><GA>
<IAC><WILL><1>
password
<IAC><WONT><1>Password correct. Welcome to Achaea.



That works with Achaea, note that it sends <IAC><WILL><1> after asking for the password, so it isn't echoed.


Version 4.49:


Enter an option or enter your character's name. <IAC><GA>
<IAC><DONT><EOR><IAC><DONT><200><IAC><DO><MCCP>
<IAC><WONT><EOR><IAC><WONT><200><IAC><SB><MCCP><IAC><SE>
1
What is the name you are known by in Achaea? > <IAC><GA>
name
What is your password? <IAC><GA>
password
<IAC><WILL><1><IAC><WONT><1>Password correct. Welcome to Achaea.


This one doesn't work, it turns echo off too late.

However spot the difference? Version 4.48 doesn't turn on MCCP (because of the bug someone noted). So it is all done uncompressed.

Try this, turn compression off, and the password is suppressed correctly.

Try an earlier version of MUSHclient (before all the telnet negotiation changes) and see what happens if compression is on.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 09 Feb 2010 12:22 AM (UTC)  quote  ]

Amended on Tue 09 Feb 2010 12:26 AM (UTC) by Nick Gammon

Message
Well I can reproduce your problem, not quite sure why:


MUD: Enter an option or enter your character's name. \ff\f9\ff\fe\19\ff\fd\c8\ff\fdV\ff\fc\19\ff\faV\ff\f0

Me: 1

MUD: What is the name you are known by in Achaea? > \ff\f9 

Me: name deleted

MUD: What is your password? \ff\f9 

Me: password deleted

MUD: \ff\fb\01\ff\fc\01Password correct. Welcome to Achaea.


Notice the sequence of events: It asks the password followed by IAC GA.

I reply (echoed).

It then sends IAC WILL 01 (turn echo off).
Then in the same packet it sends IAC WONT 01 (turn echo on).
It then sends "Password correct."

So in that packet sequence, it is turning echo off at the wrong moment.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 09 Feb 2010 (UTC)  quote  ]

Amended on Tue 09 Feb 2010 12:01 AM (UTC) by Nick Gammon

Message
Well, it is to do with telnet echo option, so the first place I would breakpoint is here:


    case TELOPT_ECHO:    // line 297 in telnet_phases.cpp
          if (!m_bNoEchoOff)  // put breakpoint here
              {
              m_bNoEcho = true;
              TRACE ("Echo turned off\n");
              }
          break; // end of TELOPT_ECHO


That at least confirms you get the IAC WILL 1 (which I saw in your packet debug). And then you should see the line "m_bNoEcho = true;" executed.

Then, once you see the password prompt, but before typing it in, put a breakpoint in doc.cpp:


void CMUSHclientDoc::SendMsg(CString strText,   // line 1101 in doc.cpp
                             const bool bEchoIt,
                             const bool bQueueIt,
                             const bool bLogIt)
  {

  // cannot change what we are sending in OnPluginSent
  if (m_bPluginProcessingSent)
    return;

  bool bEcho = bEchoIt;

  // test to see if world has suppressed echoing
 
  if (m_bNoEcho)   // put breakpoint here 
     bEcho = false;


Now when you hit <enter> to send the password you should see the "bEcho = false;" executed.

A little further down in doc.cpp the bEcho is tested:


  if (bEchoIt)  // line 1272 in doc.cpp
    DisplayMsg (str, str.GetLength (), USER_INPUT | (bLogIt ? LOG_LINE : 0));


These line numbers are valid as at the current commit as I am writing this: 9ac78a6b548da633a78adeb25ca9e3887736d31b

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Mon 08 Feb 2010 11:27 PM (UTC)  quote  ]
Message
Nick Gammon said:

Well it doesn't do it for me. Look:


Enter your character's name, or type new: nick
Password: 
Reconnecting.
Limbo


Note password not echoed.


The fact remains that it does, inexplicably, echo for me.

Nick Gammon said:

Twisol said:

I finally got the source to behave, and when I tested, the original problem still remains. So much for that! =/


What changes did you have to make, if any?

Just compilation/linker changes, nothing that would affect the behavior of the program directly.

Nick Gammon said:

If it still does it try putting a breakpoint in on the relevant line.

I wouldn't know what the "relevant lines" are, unfortunately. I just have the symptoms and a general idea of what's going on, and I didn't change the source behaviorally.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 08 Feb 2010 09:12 PM (UTC)  quote  ]
Message
If it still does it try putting a breakpoint in on the relevant lines.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 08 Feb 2010 08:43 PM (UTC)  quote  ]
Message
Twisol said:

I finally got the source to behave, and when I tested, the original problem still remains. So much for that! =/


What changes did you have to make, if any?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 08 Feb 2010 08:42 PM (UTC)  quote  ]
Message
Well it doesn't do it for me. Look:


Enter your character's name, or type new: nick
Password: 
Reconnecting.
Limbo


Note password not echoed.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Mon 08 Feb 2010 08:05 PM (UTC)  quote  ]

Amended on Mon 08 Feb 2010 08:20 PM (UTC) by Twisol

Message
No, I mean... I had local echo enabled both times. The password entry is protected by ECHO OFF or whatever. On 4.48, the password is correctly hidden, whereas on my compiled 4.49, the password is still echoed visibly. I -want- it to be hidden, since it's a password entry, but the unreleased version seems to disregard the echo-off message (again, under the same settings as my standard 4.48, I copied the compiled EXE into my MUSHclient folder and ran it there)

Packet debug on 4.48 (correct version)
What is your pas   57 68 61 74 20 69 73 20 79 6f 75 72 20 70 61 73
sword? ÿùÿû.       73 77 6f 72 64 3f 20 ff f9 ff fb 01

Sent  packet: removed bytecount at Monday, February 08, 2010, 1:06:34 PM

removed password for post

Incoming packet: 5 (719 bytes) at Monday, February 08, 2010, 1:06:34 PM

ÿü.Password corr   ff fc 01 50 61 73 73 77 6f 72 64 20 63 6f 72 72
ect. Welcome to    65 63 74 2e 20 57 65 6c 63 6f 6d 65 20 74 6f 20
Achaea...Your la   41 63 68 61 65 61 2e 0d 0a 59 6f 75 72 20 6c 61

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 08 Feb 2010 07:52 PM (UTC)  quote  ]
Message
First, you mean echoed in the output window? Second, there is an option to disable that in Commands configuration (Ignore "echo off" messages).

It worked OK for me when I tried it with Smaug. If you still think it is wrong please do a packet debug and check what arrived.

I got:


50 61 73 73 77 6f 72 64 3a 20 ff fb 01
P  a  s  s  w  o  r  d  :     IAC WILL 01


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Mon 08 Feb 2010 06:21 PM (UTC)  quote  ]

Amended on Mon 08 Feb 2010 06:23 PM (UTC) by Twisol

Message
I finally got the source to behave, and when I tested, the original problem still remains. So much for that! =/

EDIT: A new problem I just noticed is that when entering my password, the input was echoed, rather than suppressed as it normally is during the same password entry. Something up with the ECHO subnegotiation?

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Sun 07 Feb 2010 08:39 PM (UTC)  quote  ]
Message
Excellent! I only brought it up because it seems that these are more preview versions than releases intended for general use, and releasing a new version every time a few features are added didn't seem terribly optimal.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sun 07 Feb 2010 07:39 PM (UTC)  quote  ]
Message
I was going to push a version for you to test shortly.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Sun 07 Feb 2010 07:28 PM (UTC)  quote  ]
Message
Nick, if I could make a suggestion, perhaps instead "officially" releasing these preview versions, you could tag them on GitHub so interested parties can download from there?

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


8,603 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]