Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issues with the latest Linux build #848

Closed
escept opened this issue Oct 14, 2018 · 14 comments
Closed

Some issues with the latest Linux build #848

escept opened this issue Oct 14, 2018 · 14 comments
Labels
Bug Something isn't working Code Programming task Linux only Networking Issue related to multiplayer or networking

Comments

@escept
Copy link

escept commented Oct 14, 2018

On my server randomly at spawn people start receiving entity not found errors, then get disconnected for syncing with the server for too long. This only started happening when I switched to Linux. I downloaded the game from the UG mirror.
Edit: this was on 0.8.2.0,I didn't notice the new release. I'll see tomorrow if 0.8.2.1 has the same issue.

@escept escept closed this as completed Oct 14, 2018
@escept escept reopened this Oct 17, 2018
@escept
Copy link
Author

escept commented Oct 17, 2018

Reopening, the issue is still present on 0.8.2.1 for me.
scr
I think this issue only occurs for me. I've been trying to fix this for several days, but got nowhere. I figured this is the only place I could get help from.

@Regalis11
Copy link
Collaborator

Unfortunately I'm not sure what's causing this, but if you could provide some more info it might be easier to diagnose:

  1. Are you using the dedicated server or hosting from the normal game?
  2. Does it happen immediately after a round starts, or only when a client joins mid-round?
  3. Are you using any mods?
  4. If you were able to find out what the entity that's causing those errors is, it'd be extremely helpful. You can get a list of entities and their IDs using the console command "dumpids [count]", where the count parameter is the number of entities to list. In this case, you could enter "dumpids 1951" at the server's side and hopefully see the entity in question at the end of the list.

I'm sorry for the inconvenience! If you can find any more details about this (in particular what the entity is) it'd be a great help.

@escept
Copy link
Author

escept commented Oct 17, 2018

  1. Dedicated server. I'm running Ubuntu server (64 bit).
  2. I never saw it happen after a respawn shuttle, only at round starts occasionally.
  3. No mods.
  4. Now, that I've tested it, (now said entity 1777 not found), dumpids showed that ID 1777 is actually the player.

@Regalis11 Regalis11 added Bug Something isn't working Linux only Networking Issue related to multiplayer or networking labels Oct 17, 2018
@Regalis11
Copy link
Collaborator

Managed to reproduce it now. It seems that it has something to do with level generation, in some cases the ruins generate differently at the client's side, causing a different number of structures and items to be created which leads to a ton of entity ID mismatches. Not sure what's causing it yet - at first I suspected it was due to the recently added level mirroring, but it seems to happen in non-mirrored levels as well. I'll do some more debugging and try to fix this asap.

@Regalis11
Copy link
Collaborator

Floating point errors, my arch nemesis.
screenshot from 2018-10-17 23-32-01

Looks like a few of the floating point calculations done during the level generation may produce different results on different machines (and apparently even on the same machine), which causes the layouts of the levels to differ, leading to the number of items/structures in the level being different and IDs getting completely messed up.

I'm not quite sure why this seems to only happen (or at least be more common) on Linux, nor why this problem hasn't surfaced before, but in any case I need to rethink the level generation logic a bit to fix it.

@escept
Copy link
Author

escept commented Oct 17, 2018

I'm glad to hear that you figured it out! I'm confused how this error never surfaced for people I asked hosting on Linux, though.

Regalis11 added a commit that referenced this issue Oct 17, 2018
Regalis11 added a commit that referenced this issue Oct 18, 2018
… floating point indeterminism from causing the level to differ between players. Also changed the way tunnels are carved, now it doesn't require the LinesIntersect method which seemed to be the cause for #848.

This is not a 100% bulletproof way to get rid of the issue because doubles are not deterministic either, but I think it might be enough to make mismatches so unlikely that it never happens in practice. Need to do some automated testing to figure out if we need a more robust solution (switch to fixed point, make the server send some data that the client can use to ensure the level is generated correctly?)
@zackwhit
Copy link

zackwhit commented Nov 6, 2018

I've also had similar if not the exact same issue when using the wrong version of Mono to run the server. Figure out how to install 5.4 and it seems to work great.

@escept
Copy link
Author

escept commented Nov 13, 2018

Downgrading to mono 5.4.0 seems to be working as a temporary fix, thank you!

@Panzergrenadier
Copy link

How can i install mono 5.4 on Ubuntu 14.04?

@hubismal
Copy link

How can i install mono 5.4 on Ubuntu 14.04?

This was such a frequently asked issue I made a guide for it. You can find out how to install Mono 5.4 here

Note that this isn't/won't be necessary for the full release.

Regalis11 added a commit that referenced this issue Mar 19, 2019
commit 633e54b
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Tue Mar 19 18:02:21 2019 +0200

    Include level equality check value in round start messages, so clients immediately know if the level generated at their end doesn't match the one generated by the server (which will cause ID mismatches and more hard-to-diagnose desync kicks during the rounds). Related to #848

commit 68e4107
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Tue Mar 19 18:01:01 2019 +0200

    Readded client error handling from ef9afed. Not sure how it got removed, probably a messed up merge somewhere down the line when working on the client-server-separation branch or when merging the Steam version work from dev to master. In any case this should help diagnose desync kicks such as #1293.
@Regalis11 Regalis11 added the Code Programming task label Mar 27, 2019
@SaulApostle
Copy link

SaulApostle commented Jun 29, 2019

2UQ51NF9J`U5QS4JKMBHD~V
9.0.7 win10 I'm the host.

@Regalis11
Copy link
Collaborator

Created a new ticket with more info: #2723

@DarkDestiny21
Copy link

I had this happened to me when I want to join my friend modded lobbies I have to enable or disable some mods to fix it or just rejoin the lobbies.

@gosver
Copy link

gosver commented Dec 25, 2023

Looks like a few of the floating point calculations done during the level generation may produce different results on different machines (and apparently even on the same machine), which causes the layouts of the levels to differ, leading to the number of items/structures in the level being different and IDs getting completely messed up.

I'm not quite sure why this seems to only happen (or at least be more common) on Linux, nor why this problem hasn't surfaced before, but in any case I need to rethink the level generation logic a bit to fix it.

I get this problem on Winodws 10, server Player-Hosted with mods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Code Programming task Linux only Networking Issue related to multiplayer or networking
Projects
None yet
Development

No branches or pull requests

8 participants