Rebuilding the inventory bar (example, equipping a backpack) after exiting a boat prints a Stale Component Reference.
Because OpenBoat of screens/playerhud does
self.controls.inv.boatwidget = self.controls.inv.root:AddChild(ContainerWidget(self.owner))
which is then closed when exiting a boat, but not detached from inventorybar class.
So, when doing this in Rebuild of widgets/inventorybar
if self.boatwidget then self.boatwidget:SetPosition(Vector3(700, do_integrated_backpack and 105 or 65, 0)) end
the widget isn't actually valid, but the reference exists, and so, SetPosition is called.
if self.boatwidget then if self.boatwidget.inst:IsValid() then self.boatwidget:SetPosition(Vector3(700, do_integrated_backpack and 105 or 65, 0)) else self.boatwidget = nil end end
stops the error and cleans the reference.
The clean way would be to make a CloseBoat method in the HUD and plug it into the Close of the container component, like how Open from container works with OpenBoat.
Steps to Reproduce
1) Spawn a row boat 2) Enter it 3) Exit it 4) Spawn backpack 5) Equip backpack 6) Check log
This issue has been fixed in either a future version or updated in a previous version.