Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
157 stars 51 forks source link

assert easily triggered - causing crash calling RailroadTrackConnection:getConnection(2) #156

Closed duppypro closed 3 years ago

duppypro commented 3 years ago

Low priority because this is easy to avoid. But it still shouldn't crash.

100% repro - call :getConnection(2) on a RailroadTrackConnection class. TODO: test calling getConnection(1) on a connection that only has a valid getConnection(0) - I think this is possible on stub tracks?

sample crash dump: I think this is pretty clear that the intentional assert(offset == 0 || offset == 1) is the cause?

Version: 159365, IsEditor: No, IsPerforceBuild: No, BuildConfiguration: Shipping, Launcher: Steam, NetMode: Listen Server, IsUsingMods: Yes

Assertion failed: offset == 0 || offset == 1 [File:G:\Projects\Satisfactory\SatisfactoryModLoader\Source\FactoryGame\Public\Buildables/FGBuildableRailroadTrack.h] [Line: 140]

FactoryGame_Core_Win64_Shipping!AssertFailedImplV() [d:\ws\sb-lowprio\ue4\engine\source\runtime\core\private\misc\assertionmacros.cpp:100]
FactoryGame_Core_Win64_Shipping!FDebug::CheckVerifyFailedImpl() [d:\ws\sb-lowprio\ue4\engine\source\runtime\core\private\misc\assertionmacros.cpp:450]
FactoryGame_FicsItNetworks_Win64_Shipping!FIN_StaticRef_AFGBuildableRailroadTrack::FIN_StaticRefFunc_Member_getConnection::Execute() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Reflection\FINStaticReflectionSource.cpp:1755]

...