In Drop Vines Anyway you are registering a behavior inside the StartServerSide() method. This causes occasional crashes including CMEs, because game engine code in ServerMain proceeds on the assumption that everything will have been registered by, at the very latest, the AssetsFinalize stage, and can be multi-threaded after that time. StartServerSide() is run after AssetsFinalize, it runs when the game is finally ready and running.
Please can I suggest register the behavior in the Start() method, with a check whether the api side is serverside if you need to. See also, the XML comment on the StartServerSide() method indicating do not add new behaviors at this stage, it actually means do not add (already registered) behaviors to blocks, but nothing should be registered here either.
I don't know whether a similar potential issue applies to any of your other mods? Nothing should be registered and no assets should be modified in StartServerSide().
Hi Cral
In Drop Vines Anyway you are registering a behavior inside the
StartServerSide()
method. This causes occasional crashes including CMEs, because game engine code in ServerMain proceeds on the assumption that everything will have been registered by, at the very latest, theAssetsFinalize
stage, and can be multi-threaded after that time. StartServerSide() is run after AssetsFinalize, it runs when the game is finally ready and running.Please can I suggest register the behavior in the
Start()
method, with a check whether the api side is serverside if you need to. See also, the XML comment on theStartServerSide()
method indicating do not add new behaviors at this stage, it actually means do not add (already registered) behaviors to blocks, but nothing should be registered here either.I don't know whether a similar potential issue applies to any of your other mods? Nothing should be registered and no assets should be modified in
StartServerSide()
.