kaiusl / KLPlugins.DynLeaderboards

ACC leaderboard plugin for SimHub
https://kaiusl.github.io/KLPlugins.DynLeaderboards/
MIT License
13 stars 1 forks source link

after an acc 1.9.0 update position for each car is -1 #19

Closed serek4 closed 1 year ago

serek4 commented 1 year ago

this error is spamming logs

[2023-04-19 21:29:10,555] INFO - DynLeaderboards (ACCUdpRemoteClient.cs: ConnectAndRun,86)
    Couldn't connect to broadcast client. Err System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at KLPlugins.DynLeaderboards.Values.<>c__DisplayClass72_0.<OnBroadcastRealtimeUpdate>g__SetStartionOrder|5()
   at KLPlugins.DynLeaderboards.Values.OnBroadcastRealtimeUpdate(String sender, RealtimeUpdate update)
   at KLPlugins.DynLeaderboards.ksBroadcastingNetwork.BroadcastingNetworkProtocol.ProcessMessage(BinaryReader br)
   at KLPlugins.DynLeaderboards.ksBroadcastingNetwork.ACCUdpRemoteClient.<ConnectAndRun>d__29.MoveNext()

no errors in single player mode

kaiusl commented 1 year ago

I think it's an issue with new cars. They are not yet added to the enums and we don't know their class, which then causes this invalid access. Should be fixed in 5a95b3f3d5793c281661b76f202c1dee698806cb and released with next update once #16 is done.

kaiusl commented 1 year ago

Added a backup in 2d92a0cc27ce3c2e6c6cbbe32e587c98c372b315 so in the future when new cars are added this error shouldn't happen. The class positions for the class, which the new cars belong to, will be wrong until we get the update out but at least there won't be errors and the plugin remains somewhat usable.

kaiusl commented 1 year ago

I uploaded a pre-release 1.2.4_beta1 which fixes this (and few more), so the plugin can be used until proper release is up.

Mtrade commented 1 year ago

I think it's an issue with new cars. They are not yet added to the enums and we don't know their class, which then causes this invalid access. Should be fixed in 5a95b3f and released with next update once #16 is done.

Yes, can confirm this. Property data is null for GT3 cars but works correctly if you create a GT4 exclusive session for example.