compujuckel / AssettoServer

Custom Assetto Corsa server with focus on freeroam
https://assettoserver.org
GNU Affero General Public License v3.0
282 stars 66 forks source link

Unable to join server slots >128 System.IndexOutOfRangeException #116

Open barf opened 1 month ago

barf commented 1 month ago

Hello, the AssettoServer is throwing System.IndexOutOfRangeException when clients join slots >128 for me

To reproduce configure a free roam server with more than 128 slots, join the slots >128, the client (AC) appears to connect but hangs after loading. image

After client loads the server logs the exception as shown:

[09:26:50 DBG] Live weather: LightRain, ambient 2.34°C
[09:36:50 DBG] Live weather: LightRain, ambient 2.55°C
[09:46:51 DBG] Live weather: LightRain, ambient 2.56°C
[09:56:51 DBG] Live weather: LightRain, ambient 2.56°C
[10:05:52 INF] barf (76561197966897063- 127.0.0.1:27633) is attempting to connect (ddm_toyota_mr2_sw20)
[10:05:52 DBG] barf supports extra CSP features: ["STEAM_TICKET", "CLIENT_MESSAGES", "SPECTATING_AWARE", "WEATHERFX_V1", "WEATHERFX_V2", "WEATHERFX_V3", "BATCH_FIX_V2", "CUSTOM_UPDATE", "CUSTOM_UPDATE_V2", "CLIENT_UDP_MESSAGES", "BATCH_MESSAGES", "EXPLICIT_ADMIN_STATE", "3117"]
[10:05:52 INF] Steam auth ticket verification succeeded for barf
[10:05:52 INF] barf (76561197966897063, 158 (ddm_toyota_mr2_sw20-itsdraik_04_black_202)) has connected
[10:06:51 DBG] Live weather: LightRain, ambient 3.15°C
Installing breakpad exception handler for appid(assettoserver)/version(1.0)/tid(56516)
Installing breakpad exception handler for appid(assettoserver)/version(1.0)/tid(56518)
[10:09:19 ERR] Error receiving TCP packet from barf
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at AssettoServer.Network.Tcp.ACTcpClient.OnSpectateCar(PacketReader reader) in AssettoServer/Network/Tcp/ACTcpClient.cs:line 531
   at AssettoServer.Network.Tcp.ACTcpClient.ReceiveLoopAsync() in AssettoServer/Network/Tcp/ACTcpClient.cs:line 482
[10:09:19 DBG] Disconnecting barf (127.0.0.1:27633)
[10:09:19 INF] barf has disconnected