Hello and welcome to StarMade,
as you can see this version does only increase the build number. That means that old clients from the same version can join updated servers, and updated clients can join old servers.
The main thing for this version is a critical fix for the server I've been hunting a long time for. It's symptoms are lags, and complete server freezes (disconnects via ping timeouts, and unable to join again). It seemed to be caused by some clients with bad connection and/or high ping.
Technical:
Some people suggested that I should put each connection into its own thread, so let me start by assuring: It was never done any other way. The game wouldn't be able to run at all in multiplayer had I every connection handled in one thread. The thing about threads is, that they need to synchronize in certain parts. This is done by locking certain objects so only one thread at a time can access. You cant have multiple threads accessing the same list for example as that would cause unpredictable behavior and crashes. However using locks can lead to something called a deadlock. In it's simplest form: Thread X waits for Object A and locked Object B already while Thread Y waits for Object B and locked Object A already. In this case it was much more complicated. Bottom line is that there was a possible never returning method (flush for client with certain type of connection not answering) in a locked part of a thread making all other threads and the main thread itself wait for that method to return and unlock that part. I moved that method out of that locked part, and while the method can still be stuck, it will no no longer block the other threads.
Other fixes:
- fixed spawning point mess up when rejoining a game
- fixed critical (especially on servers with many players) bug where possibly an update could be skipped for players when another player joined the game
- added external thread to check if the server has frozen. It will produce a threaddump every 5 seconds of freeze to really help with debugging
Thanks for playing StarMade,
- schema
as you can see this version does only increase the build number. That means that old clients from the same version can join updated servers, and updated clients can join old servers.
The main thing for this version is a critical fix for the server I've been hunting a long time for. It's symptoms are lags, and complete server freezes (disconnects via ping timeouts, and unable to join again). It seemed to be caused by some clients with bad connection and/or high ping.
Technical:
Some people suggested that I should put each connection into its own thread, so let me start by assuring: It was never done any other way. The game wouldn't be able to run at all in multiplayer had I every connection handled in one thread. The thing about threads is, that they need to synchronize in certain parts. This is done by locking certain objects so only one thread at a time can access. You cant have multiple threads accessing the same list for example as that would cause unpredictable behavior and crashes. However using locks can lead to something called a deadlock. In it's simplest form: Thread X waits for Object A and locked Object B already while Thread Y waits for Object B and locked Object A already. In this case it was much more complicated. Bottom line is that there was a possible never returning method (flush for client with certain type of connection not answering) in a locked part of a thread making all other threads and the main thread itself wait for that method to return and unlock that part. I moved that method out of that locked part, and while the method can still be stuck, it will no no longer block the other threads.
Other fixes:
- fixed spawning point mess up when rejoining a game
- fixed critical (especially on servers with many players) bug where possibly an update could be skipped for players when another player joined the game
- added external thread to check if the server has frozen. It will produce a threaddump every 5 seconds of freeze to really help with debugging
Thanks for playing StarMade,
- schema