Bug 139 - Character Can't Enter World
: Character Can't Enter World
Status: RESOLVED FIXED
Product: Salem
Classification: Unclassified
Component: Client
: unspecified
: PC Windows
: --- normal
Assigned To: loftar
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-08 19:23 CET by Chim Brouer
Modified: 2014-03-14 08:04 CET (History)
1 user (show)

See Also:


Attachments
IP Traffic protocols from Wireshark (ZIP File) (824.99 KB, application/octet-stream)
2013-03-16 20:33 CET, Chim Brouer
Details
Wireshack protocol (.pcapng) (725.51 KB, application/octet-stream)
2013-03-16 20:48 CET, Chim Brouer
Details
First OK, but second login with error (zip) (384.60 KB, application/x-zip-compressed)
2013-03-19 18:05 CET, Chim Brouer
Details
Just one login error (Salem.jnlp) (245.05 KB, application/octet-stream)
2013-03-19 18:06 CET, Chim Brouer
Details
Just one more login error (Salem.jnlp) (274.91 KB, application/octet-stream)
2013-03-19 18:07 CET, Chim Brouer
Details
at the end successful login (157.02 KB, application/octet-stream)
2013-03-19 18:08 CET, Chim Brouer
Details
Clean login error (Salem.jnlp) (247.50 KB, application/octet-stream)
2013-03-19 18:12 CET, Chim Brouer
Details
First success then login error (394.15 KB, application/octet-stream)
2013-03-19 18:13 CET, Chim Brouer
Details
The erroneous exchange, as seen from the client (19.98 KB, application/octet-stream)
2013-04-08 20:28 CEST, loftar
Details
The erroneous exchange, as seen from the server (9.39 KB, application/octet-stream)
2013-04-08 20:29 CEST, loftar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chim Brouer 2013-03-08 19:23:50 CET
See also http://forum.salemthegame.com/viewtopic.php?f=10&t=4720. I added to that thread, because I have exactly the same problem. So we are now at least 3 people with this issue.

My system:
- Windows 7
- Tried both Java Version 6 and 7
- Tried Ender Client and Paradox Client

Problem Description:
Day 1:
My client logged itself out for no reason, and the particular character I was playing with cannot log back in. I made a new character to check if the problem persisted, but that one is fine.
At the moment of logout, I was climbing out of a mine in a deserted and not claimed (or no longer claimed) camp.
-I did not enable trespassing.   
-I did not receive a message before the character was logged out.  

The character is still in the Login Screen (so it is not dead). When I try to login again, then I see a split second a UI building up, but then I return to the Login Screen. There is no error message.

I have like 5 characters on that account. I was able to login with all the other characters. It just effects the one character.

I tried to clear cache (via Java console and manually at my harddrive "C:\Users\userId\AppData\LocalLow\Sun\Java\Deployment\cache") and both Java Version 6 and 7 and Ender client and Paradox client in all combinations.

Day 2:
Tried again every couple of hours with no effect, till (24 hours later??) I was able for ONE TIME to login with that certain character. He was not "K.O.ed" and I quickly moved the character away from the position, because in the forum thread it was mentioned it could be a special problem with the terrain at that place. Then I logged out via ":lo". When I tried to login again I can't and the same problem as described above persists again. I tried at least 20-30 times to login during day 2.

Side note:
From my 5 characters, I played another on day 2 and now this character has the same problem. He can also no longer login. The other 3 are still OK and I can use them.
Comment 1 Chim Brouer 2013-03-08 20:51:02 CET
I am willing to send my account credentials to the assigned developer for this bug, so he/she can recreate the error in their programming/debugging enviroment. It is simply a beta-try account and no money is spent on it.

I am also willing to run any client with debugging options here on my PC if you can send me such a client.
Comment 2 loftar 2013-03-08 20:55:14 CET
(In reply to comment #1)
> I am willing to send my account credentials to the assigned developer for
> this bug
You should never send your password to anyone whatsoever; if I want to log in on your account, I can do so without the password. ;)

However, if you tell me the name of the account and character, I'll see if I can reproduce the problem.
Comment 3 Chim Brouer 2013-03-08 21:02:34 CET
The account is Chimm, the character with the problem is also called Chimm.
There is another character called Chim, which is still OK.
But now today also character Tarin on that account has the same login 
problem (it has never interacted with character Chimm and is on a 
totally different world position).

Love to hear from you what happens on your system, if you try to login.

How are the tasks devided between client and server. Could this still be 
a client issue, if I correctly deinstalled Java, cleared all cashes and 
reinstall all Java stuff. Is there some other place with information 
stored on my client? Windows registry or something else?

Best regards and good luck. I really like the game. Simple old school 
graphics but wonderful complex gameplay!

Berend (Chimm)
Comment 4 Chim Brouer 2013-03-08 21:12:00 CET
Update: As I am trying every now and then again, now I was also able to login with the second character with problems once (so there is not an 24 hour issue here, because problems with this character started only a few hours ago today).

I walked a short distance with the character (Tarin) and logged out (via ":lo"). As with the first problematic character (Chimm) I am again not able to login with Tarin now. So it was only a "one time success" to login.
Comment 5 loftar 2013-03-08 21:19:48 CET
I tried logging in on your account, and none to my surprise, I had no problems playing any of the characters on it.

(In reply to comment #3)
> Could this still be a client issue, if I correctly deinstalled Java,
> cleared all cashes and reinstall all Java stuff.

Doubtful. I'm fairly sure it's some kind of problem with the Internet connection between you and the server. I know several people have the problem, but I've never found any location on the Internet myself where I have been able to reproduce the problem, so it's hard to debug.

(In reply to comment #1)
> I am also willing to run any client with debugging options here on my PC if
> you can send me such a client.

I don't think there are any client options that would help debugging, but if you could produce a packet dump of the communication with the server when you try to play one of the affected characters (and it properly fails), that might help. If you can do that, please make sure it's a tcpdump-formatted file. Wireshark (<http://www.wireshark.org/download.html>) should be able to help.
Comment 6 loftar 2013-03-08 21:56:07 CET
*** Bug 134 has been marked as a duplicate of this bug. ***
Comment 7 lorcast95 2013-03-14 14:52:59 CET
i'm redirected from problem #134 (the 1 i posted) to this

i'm pretty sure to have found the problem :D not 100% but near 70%


i ancountered the same problem (back to login screen) in varius other client-based games like minecraft and firefall

in firefall simply i will go to login screen and be unable to log, in minecraft the game says "end of stream" (i think it's the problem, salem is made with java like minecraft)
i'm encountering a lot of connection problems just now when this problem (back to login screen) happen... simply an overload of connection or low-gap from the internet provider (i have like 5mb with 4 PC using)


i assure it's right if the connection (peer to peer i think) with the server will be "downed" for some reason the server (or the client) will shut-down the comunication process
then if you try again to login you need to wait when the "free space" in connection traffic to engage a stable communication process... if that don't happen you can still enter




that's what i supposed (WARNING!! merely suppositions) to be my problem as i found it in other games from different engines and developers
Comment 8 Chim Brouer 2013-03-16 20:33:22 CET
Created attachment 14 [details]
IP Traffic protocols from Wireshark (ZIP File)

I was able to play with Chimm for a couple of days, but now the error appeared again. I did some more IP Traffic protocols from unsuccessful logins and also one successful login with another Character from the same account (The situation is the same as described above. One character can not login any more, but other characters from that account can. I have also tried to clear Java cache). 

My IP address at the moment is 87.169.231.130
Comment 9 Chim Brouer 2013-03-16 20:48:11 CET
Created attachment 15 [details]
Wireshack protocol (.pcapng)

... and another try with new IP Address after resetting the Router. Now with IP address 87.169.231.130.

So if you try logging on server you should probably catch the 87.169.231.xxx range. It will change every day, because I shut down the router during the night and get a new IP the next day.

This time a Wireshack log including the startup of the Salem client (Ender client).
Comment 10 loftar 2013-03-19 16:52:32 CET
(In reply to comment #9)
> ... and another try with new IP Address after resetting the Router. Now with
> IP address 87.169.231.130.
> 
> So if you try logging on server you should probably catch the 87.169.231.xxx
> range. It will change every day, because I shut down the router during the
> night and get a new IP the next day.

I see. In that case, I'll have to ask you to redo your side of the logging, since I was still listening to the previous IP address.
Comment 11 Chim Brouer 2013-03-19 17:00:06 CET
Hi, I can redo some logins for this bug, because at the moment I can not login again. Same situtation as described in this bug. 

My IP address has changed again (every night I get a new one):

91.61.83.70

Please mail me / comment here, when you have configured the server logs on your side. Then I do my logins and IP log with Wireshack.

I am online the next hours.
Comment 12 Chim Brouer 2013-03-19 17:02:15 CET
Btw. which client should I use? salem.jnlp or updater.jnlp (Enders)?
Comment 13 loftar 2013-03-19 17:28:37 CET
(In reply to comment #11)
> My IP address has changed again (every night I get a new one):
> 
> 91.61.83.70

OK, I'm listening for that now. :)

(In reply to comment #12)
> Btw. which client should I use? salem.jnlp or updater.jnlp (Enders)?

I don't think it should matter a lot, but for the sake of reliable results it might be best if you use the default client.
Comment 14 Chim Brouer 2013-03-19 17:54:54 CET
This is the most complex run, because first everything was ok. The login error is at the end. 

But just before this Wireshack run, I did a login with an error at about 17:30 without Wireshack running.

This run was with this action when I remember correctly:
- Login OK (Chimm) at homestead/claim
- Port to Boston
- Automatic logoff, back to login screen
- Login OK
- Did pick some Autumn grass at Boston
- Port back to homestead
- Automatic logoff, back to login screen
- Login with ERROR (at about 17:34 probably)

Log to long. I send it per email.
Comment 15 Chim Brouer 2013-03-19 18:05:02 CET
Created attachment 17 [details]
First OK, but second login with error (zip)

17:42 (end of run)

- First login is OK
- Logout
- Second login with error
Comment 16 Chim Brouer 2013-03-19 18:06:35 CET
Created attachment 18 [details]
Just one login error (Salem.jnlp)

17:43

Just one login error (Salem.jnlp)
Comment 17 Chim Brouer 2013-03-19 18:07:15 CET
Created attachment 19 [details]
Just one more login error (Salem.jnlp)

17:44

Just one login error (Salem.jnlp)
Comment 18 Chim Brouer 2013-03-19 18:08:15 CET
Created attachment 20 [details]
at the end successful login

17:45

at the end successful login
Comment 19 loftar 2013-03-19 18:08:32 CET
I turned off the server-side capture right after you sent the first log by e-mail, but I've turned it back on now, so if you can create another non-complex error while it's listening again now, that would be great.
Comment 20 Chim Brouer 2013-03-19 18:12:21 CET
Created attachment 21 [details]
Clean login error (Salem.jnlp)

18:10

Just a login error
Comment 21 loftar 2013-03-19 18:13:03 CET
Thanks. I'll have to take some time to analyze the logs, though.
Comment 22 Chim Brouer 2013-03-19 18:13:26 CET
Created attachment 22 [details]
First success then login error

18:11

- Login OK
- logout (:lo)
- Login error
Comment 23 Chim Brouer 2013-03-20 11:20:34 CET
New IP same problems:

91.61.65.175
Comment 24 loftar 2013-04-08 20:27:46 CEST
I finally managed to spot what's wrong in the exchange. I'll attach the relevant parts of the packet dumps for the record as cli.dump and srv.dump, containing, respectively, the relevant exchange as seen from the client and as seen from the server.

The root cause of the problem can be seen to be your NAT router, which is buggy and doesn't handle fragmented packets properly. Note how your client sends a UDP packet that needs to be fragmented with the correct source port 62675, the same as has been used for all other packets, but when the server receives the same problem, the source port has changed to 62676.

What has happened, in all likelihood, is that your NAT router didn't handle fragmentation correctly and therefore couldn't properly associate the fragmented packet with the previous established session, so instead of allocated a new session slot for this new, to it unknown, packet.

When the server sees the packet with the wrong source port, it (appropriately) does not associate it with any existing connection, and sends a CLOSE message back, to port 62676. The NAT router recognizes that in its session table and NATs it back to port 62675, however, which is what your client sees when the packet returns, so it thinks the server has decided to close its connection.

While the root cause is a bug in your NAT router, then, it is also true that the problem can, and therefore probably should, be worked around. To do so, the client should avoid packing so many OBJACKs together in one packet, and instead split them up between two packets, so that fragmentation doesn't have to occur.

Until such a workaround can be implemented, however, you can most likely fix the problem by getting a NAT router that isn't buggy.
Comment 25 loftar 2013-04-08 20:28:43 CEST
Created attachment 25 [details]
The erroneous exchange, as seen from the client
Comment 26 loftar 2013-04-08 20:29:13 CEST
Created attachment 26 [details]
The erroneous exchange, as seen from the server
Comment 27 loftar 2013-04-16 04:50:31 CEST
I have now implemented what I think is a fix for this bug in the default client. Please try it out and tell me if it seems to be working.
Comment 28 Chim Brouer 2013-04-17 09:00:02 CEST
I actually stopped playing, because it was unbearable. 

Just tried to login today, but it is still not working for me. But you are right about the fragmentatation. I am no network expert, but when I try 

ping "some website" -f -l 1500 

on my Windows system, then it starts fragmentation because of the size 1500 and all  the packages get lost.
Comment 29 Chim Brouer 2013-04-17 09:05:58 CEST
NO SORRY!

It works on the "offical" beta client. I had tried the "community" client.

Yes, and it also fixed the annoying logout whenever I travelled to Boston or my home. So good work on your side.
Comment 30 loftar 2014-03-14 08:04:12 CET
Sounds like fixed, then.