frandallfarmer / neohabitat

Repository for the NeoClassical Habitat Server Project
http://neohabitat.org
MIT License
229 stars 41 forks source link

The program gets stuck at the [DO] command (token in hand, used on door) #431

Closed radius75 closed 1 year ago

radius75 commented 1 year ago

Vice3.7.1

frandallfarmer commented 1 year ago

OOh! This looks like a real bug! I'll look at it soon.

frandallfarmer commented 1 year ago

I'm having problems duplicating this bug. Are you certain you were pointing at the door instead of your avatar or the coin? I noticed that your hand is out... @radius75

radius75 commented 1 year ago

I've blocked myself a few times this way. Both on Windows 7 GTKVice3.7.1 and also on Vice in a web browser. Avatar holds this token/coin, door is closed, command DO.

radius75 commented 1 year ago

I used DO 3x on the door and got stuck. I just did this right now via GTKVice3.7.1 Looks like I've lost connection to the server. vice-screen-2023071510512029

However, no need to have the token in hand, I did 10 tries without the token and it blocked me too.

radius75 commented 1 year ago

I also checked on real C64 with Wi-FiStrikelink modem. There is the same problem.

Strikelink set: at$sb=1200, at&k0, at&w Habitat-Boot_v1.1-modemenabled.d64 atdthabitat.themade.org:1986 20230715_130243

radius75 commented 1 year ago

obraz after all these tests on Web, Vice and Real C64, I am duplicated 3x in Home :D

frandallfarmer commented 1 year ago

Thank you for the detailed duplication steps.

I did notice something unfamiliar: "atdthabitat.themade.org" - that URL the 'atdthabitat' is odd (I recall what ATDT was from modem days, but when did that subdomain become active. Certainly this isn't the source of the bug, but I'm curious...

frandallfarmer commented 1 year ago

Testing with my local server and following those exact steps the door is working normally. I do have one question though:

"I used DO 3x on the door and got stuck."

What exactly do you mean by "Do 3x"? are you issuing the commands fast or slow? Next up I'll try production (habitat.made.org).

frandallfarmer commented 1 year ago

I tried with app.neohabitat.org aka habitat.themade.org also functions properly for me. I spammed DO on the door in my turf while holding a token a dozen times, and they all worked.

We'll probably need to look at the logs when you are failing @radius75.

There are so many layers of performance emulation going on, I'm at a bit of a loss without seeing both ends in action.

frandallfarmer commented 1 year ago

Perhaps there's a LAG effect that I'm not seeing because I'm close to the server? Where are you pinging in from @radius75 ?

frandallfarmer commented 1 year ago

.... Maybe Poland (your profile here) ... I'm betting that has something to do with it. Any chance you could run a local server (Linux or WSL2) @radius75 ? That would eliminate that variable.

Lag is definitely an enemy of Habitat - back in the 1980s this was only used in the USA - and if connection-lag got real bad the low-level protocol was known for failing. Since you're getting the same issue repeatedly, I'm not 100% sure that is it. Or, perhaps, this particular sequence is sensitive to delays?

I'm keeping this open until we know if it's related to lag.

radius75 commented 1 year ago

Thank you for the detailed duplication steps.

I did notice something unfamiliar: "atdthabitat.themade.org" - that URL the 'atdthabitat' is odd (I recall what ATDT was from modem days, but when did that subdomain become active. Certainly this isn't the source of the bug, but I'm curious...

I am using atdt to connect to the server. (both in Vice +tcpser.exe as a UserPort modem and in a real C64 with a StrikelinkWiFi modem) I enter this command with the address in the terminal in the game. (F7) Habitat-Boot_v1.1-modemenabled.d64

Testing with my local server and following those exact steps the door is working normally. I do have one question though:

"I used DO 3x on the door and got stuck."

What exactly do you mean by "Do 3x"? are you issuing the commands fast or slow? Next up I'll try production (habitat.made.org).

I use DO and wait for the door to open or close, after a ball of tries the game locks up when trying to DO. The door does not open/close and DO is displayed all the time. Looks like a server connection error.

Perhaps there's a LAG effect that I'm not seeing because I'm close to the server? Where are you pinging in from @radius75 ?

Yes, Poland.

I only use Win7 and unfortunately I don't have the possibility to run such a server at my place. I am unable to PING or TRACERT to address 20.3.249.92. This is probably the current address of the Neohabitat server? Ping does not respond and tracert does not complete. It may be as you say, some packet with a response or a request to the server gets lost somewhere along the way and the game freezes in an infinite wait.

frandallfarmer commented 1 year ago

I presently don't have access to the server log at habitat.themade.org.

I don't understand "after a ball of tries the game locks up when trying to DO." - What happens the first time you try to DO the door after it opens/closes? I'm surprised you would even get another chance to try.

Note: When you are carrying a coin and you DO on yourself or the coin a coin-splitting text-prompt will appear in the chat-entry area - just in case that is happening.

Please try this - login and carry the coin. DO on the door and wait for the animation/sound to complete. Walk to another place in the room (does that work?) If that works, walk back to the door (don't point to the black space in an open door...) and DO it again. Please report the result.

Don't multi-try anything before getting confirmation from the server. That won't work for sure.

radius75 commented 1 year ago

I tried to record a video. But just today (in the morning) the error, despite several attempts, could not be reproduced. At some point it stopped on GO, I waited and then I started pressing F1-F7 but after a while it went on. Anyway, I'm providing the link. You will see how I proceed. (74MB .mkv video file) https://mega.nz/file/fJwSQJoL#KBdfydrv7WXbvLKT_0jQG8cH7UqRElE_7LOschY6JTE

frandallfarmer commented 1 year ago

Thank you for the video.

Though it doesn't fail, I can now see what is happening more clearly.

Habitat was never able to handle commands as rapidly as you are sending them. I was honestly surprised how robust the session your video shows actually was. :-) It's been a known problem about commands-in-quick-succession sometimes hanging. We think it's a client problem - and we didn't touch the operational code in the client at all for Neo Habitat.

It appears to be worse when there is a lot of lag, but that isn't for certain.

Thank you so much for going out of your way to try to reproduce this and sharing so much detail.

I'm marking this 'closed' as a known issue. If someone works on the client in the future this record should help.

radius75 commented 1 year ago

What you see as "DO" three times quickly on the door is not me. It's a bug because my character duplicated three times, a game bug. I only did "DO" once and the game did it three times. In the later part of the video, they go to an empty house and there you can see how it works normally. But yes, despite these errors, the connection was very very stable.

-- I am doubled in the game in many random places, it seems to me that when the connection is broken, these things happen. The game does not have a secure logoff.

-- If I encounter such a "clone" and point the pointer at it and press F7, the game is stuck. Pointer blinks and nothing happens, you can move the pointer, the F1-F8 keys only make a sound. You can only SHIFT+RUN/Stop which asks for disk with q-link.

-- After some time, however, F7 works again for me It's probably a distance issue again. vice-screen-2023071811480216

frandallfarmer commented 1 year ago

If you would, @radius75 - please open an issue with "multiple connections from the same avatar" as a bug issue.

THAT's a real problem. Also note that it may be related to issues #419 and #393 - we don't hang up some connections because of a work-around for a disconnect bug.

Please include that video record.