Players Cant join modded lobby (Failed to find the end of the bit field after 100 reads)
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [X] My issue happened while using mods.
What happened?
Players attempting to join get error ( Error while reading a message from server. {Failed to find the end of the bit field after 100 reads. Terminating to prevent the game from freezing.} at Barotrauma.ReadOnlyBitField..ctor(IReadMessage inc) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\NetStructBitField.cs:line 122 at Barotrauma.INetSerializableStruct.Read[T](IReadMessage inc) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Networking\INetSerializableStruct.cs:line 693 at Barotrauma.Networking.ClientPeer.ReadConnectionInitializationStep(IncomingInitializationMessage inc) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Networking\Primitives\Peers\ClientPeer.cs:line 118 at Barotrauma.Networking.SteamP2PClientPeer.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Networking\Primitives\Peers\SteamP2PClientPeer.cs:line 251 at Barotrauma.Networking.GameClient.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Networking\GameClient.cs:line 477 )
Reproduction steps
- loaded mods
- Selected Host server
- selected (Lua For Barotrauma- Dedicatedserver)
- wait.
- players Cannot join. will report to Lua For Barotrauma as well.
Bug prevalence
Happens every time I play
Version
0.19.10.0
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No Crashlog Due to the game not Crashing on Error.
Error while reading a message from server. {Failed to find the end of the bit field after 100 reads. Terminating to prevent the game from freezing.}
at Barotrauma.ReadOnlyBitField..ctor(IReadMessage inc) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\NetStructBitField.cs:line 122
at Barotrauma.INetSerializableStruct.Read[T](IReadMessage inc) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Networking\INetSerializableStruct.cs:line 693
at Barotrauma.Networking.ClientPeer.ReadConnectionInitializationStep(IncomingInitializationMessage inc) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Networking\Primitives\Peers\ClientPeer.cs:line 118
at Barotrauma.Networking.SteamP2PClientPeer.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Networking\Primitives\Peers\SteamP2PClientPeer.cs:line 251
at Barotrauma.Networking.GameClient.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Networking\GameClient.cs:line 477
TEST Fear the deep_2022-10-05_1446.txt server log.
Fear the deep.zip campaign save used.
Fixed in https://github.com/Regalis11/Barotrauma-development/commit/c8d64177ff0f3e99a4da6806e97392125131cf11
Tested against bitfield-size-limit-fix commit https://github.com/Regalis11/Barotrauma-development/commit/057d32efc184648d4eaf6dfb58593dfc86ae5948
Fix did not work for approximately 34 +- 1 mods (All content mods for the most part).
Reproduced without the fix first (failed to find the end of the bit field after 100 reads. Terminating to prevent the game from freezing.) then tested with the fix and had this error occur:

Mods used (its probably quantity not specific mods, but just noting how they are by majority not submarine mods):

Can confirm, issue is still occurring for me
Up
Can confirm, issue is still occurring for me
The fix is still not out in the latest unstable version, it turned out to be more tricky to solve than we initially though. We have a new fix in testing atm though, and it'll hopefully be included in the next unstable.
Tested against bitfield-size-limit-fix commit https://github.com/Regalis11/Barotrauma-development/commit/4def2e8624b4f4b39146b1d51e7d4c3c038e81d7
Tested against the same mod list as previously used (with 34 +- 1 mods) and found no issues, unless there are further things to test than too many mods I believe this issue is fixed now and likely ready for merging.
Also did a quick multiplayer campaign test, and was fine too.