Major bug - "Can't write reliable data"

Issues, news, and discussion specific to the PWMangband variant.
Post Reply
PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Major bug - "Can't write reliable data"

Post by PowerWyrm » Sun 15.02.2009, 20:44

It seems that nobody can play on my server except myself at this time with 1.1.1 build 13. Due to some changes in the socket code in the main MAngband source code (see https://mangband.org/developer/ticket/775) that were ported to 1.1.1 build 13, a major bug has been introduced that disconnects any client (other than one on the same computer as the server) after a few seconds with a "Can't write reliable data" message.
The faulty code has been reverted temporarily until the real cause of the bug has been found and fixed. An updated client can be downloaded at http://powerwyrm.fr.tc/PWMangband (the file is: mangband.exe). Please replace this executable to play on my server.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Major bug - "Can't write reliable data"

Post by PowerWyrm » Mon 16.02.2009, 22:07

Forget the previous post...
A beta version of the forthcoming build 14 is out. This fixes the bug and adds some new features mainly from vanilla Angband 3.0.8 (Sangband-style object handling, random name generator for character names, client options grouped more effectively, monster list display on main term using the new '[' command, autoroller for new characters)...
My test server has been updated as well as the client. Get it at the usual location.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Major bug - "Can't write reliable data"

Post by PowerWyrm » Sun 22.02.2009, 23:30

Seems that this bug still occurs with the beta release of build 14... now I'm really puzzled. It occurs much less often, but still occurs...
I tried to put some debugging code in packet_printf()... and then the bug disappeared! Really dunno what the exact cause is... some socket buffer overflow somewhere maybe? I'll try to investigate that this week...

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Major bug - "Can't write reliable data"

Post by PowerWyrm » Mon 23.02.2009, 12:49

It seems that I'm making some progress...
After a while, the server is spamming calls to rle_encode(). These calls combined to some lag COULD overflow the socket buffer...
I need to check the reason of this spamming and to fix it.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Major bug - "Can't write reliable data"

Post by PowerWyrm » Mon 23.02.2009, 20:48

Found it. YAY!
Copy/paste vanilla Angband code using static variables to implement monster recall in MAngband source code (trunk branch) was spamming the socket buffer with packets, making it overflow. This is fixed in the new beta release of build 14. Get the client (or the server) at the usual location.
This also adds some cool feature: Hengband's command menu, entered by pressing the new 'Enter' command. Described by the current Angband maintainer as the coolest feature for newbies.

Post Reply