space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.13k stars 2.81k forks source link

BatteryRampPegSolver throws exception DebugAssertException #22612

Open IlyaBokovenko opened 6 months ago

IlyaBokovenko commented 6 months ago

2023-12-16T12:37:56.8557266+01:00 [FATL] unhandled: Robust.Shared.Utility.DebugAssertException: Exception of type 'Robust.Shared.Utility.DebugAssertException' was thrown. at Robust.Shared.Utility.DebugTools.Assert(Boolean condition) in C:\Projects\space-station-14\RobustToolbox\Robust.Shared\Utility\DebugTools.cs:line 37 at Content.Server.Power.Pow3r.BatteryRampPegSolver.UpdateNetwork(Network network, PowerState state, Single frameTime) in C:\Projects\space-station-14\Content.Server\Power\Pow3r\BatteryRampPegSolver.cs:line 278 at Content.Server.Power.Pow3r.BatteryRampPegSolver.UpdateNetworkJob.Execute(Int32 index) in C:\Projects\space-station-14\Content.Server\Power\Pow3r\BatteryRampPegSolver.cs:line 371 at Robust.Shared.Threading.ParallelManager.InternalParallelJob.Execute() in C:\Projects\space-station-14\RobustToolbox\Robust.Shared\Threading\ParallelManager.cs:line 231 at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

While debugging I have noticed that battery.SupplyRampTarget have some reasonable amount (assigned from unmet) but battery.LoadingNetworkDemand is 0 The only place where battery.LoadingNetworkDemand get zero is ClearBatteries which is called at the end of Tick So this is probably multihreading issue in parallel.ProcessNow(_networkJob, group.Count);

wafehling commented 3 months ago

Hate this thing. Makes debugging a huge pain.

deltanedas commented 3 months ago

recently had this happen again

Tayrtahn commented 3 months ago

Shortcut for investigating: https://github.com/space-wizards/space-station-14/blob/master/Content.Server%2FPower%2FPow3r%2FBatteryRampPegSolver.cs#L278

slarticodefast commented 3 months ago

This keeps happening to me after 2-3 minutes on the dev map. Debugging is almost impossible for me.

diamondhorne commented 3 months ago

same

Just-a-Unity-Dev commented 2 months ago

Still having this on Across The Veil, which last pulled upstream from commit ce0a51fc29675b3b0afb90296b6a8ce90c3f9cd3.

ShadowCommander commented 1 month ago

Still happening randomly.

Happened twice on Core.

rider64_UJS6mx7G1s