GRIP icon indicating copy to clipboard operation
GRIP copied to clipboard

Valve and switch operations are flaky in saves

Open SamCarlberg opened this issue 6 years ago • 1 comments
trafficstars

Pipeline connections are saved in a HashSet, which gives nondeterministic ordering of connections. XStream saves them in encounter order - which is a problem for the valve and switch operations whose output types rely on the input type.

When loading a save file, the output connection may be deserialized first, before the input, which causes an exception to be thrown if the output connection is connected to an input socket that takes anything but Object (i.e. any socket except one on another valve or switch)

SamCarlberg avatar Jan 31 '19 20:01 SamCarlberg

Fascinating. Good find!

JLLeitschuh avatar Jan 31 '19 23:01 JLLeitschuh