This is a core bug, but it manifests in VotG.

  • There is engine code that creates docking ports based on whether the station has a dock screen. That is, if a station defines a dock screen, but doesn't have docking ports, then we automatically create docking ports. This is particularly useful for extensions adding dock screens to ship classes (most of which do not define docking ports).
  • If a station had a docking screen but later lost it, then we destroy any auto-created docking ports (and undock any ships that might be currently docked).
  • There is a B-nine station in VotG that does not have docking ports, but that inherits from a base-class that adds an introductory dock screen. The dock screen only appears if the player has not yet encountered B-nine.
  • The game auto-generates docking ports for that station because when we first create the station, the player has not yet met B-nine.
  • At some point, a ship might even dock with those auto-generated ports.
  • Later, once the player meets B-nine, the screen disappears (which means we will destroy the auto-generated ports).
  • When we load a system, we run the code to create/destroy auto-generated ports. At this point, we realize that the B-nine station doesn't have dock screens and destroy any auto-generated ports.
  • Unfortunately, we're doing the above in the middle of load, and the entire system has not yet been loaded. In particular, a ship docked with the station might not yet have been loaded. In that case, the pointer from the docking port is NULL.
  • When we destroy the docking ports, we try to tell any docked ships to undock. But because the pointer is NULL (because the ship hasn't been loaded) we crash.

Fix

We need a couple of fixes for this:

  1. The code that creates/destroys ports should not fire in the middle of load; it should be deferred until the entire system is loaded.
  2. We need to create the introductory dock screens with the overrideOnly=true flag, and we need to check the flag to make sure we don't auto-create ports if this is the only dock screen.
atmel 8 Oct 2022:

Hello,

possibly I encountered this, thought not sure it is this by the Debug.log. I met B-nine, then, when backtracking through their systems I get "endless loading" when entering the gate on the way back but I can return to the other system. This is the end of the debug log:

2022-10-08 20:10:09 Loading user collection.
2022-10-08 20:10:10 Loading news.
2022-10-08 20:10:10 All resources downloaded.
2022-10-08 20:10:16 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:20 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:21 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:22 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:23 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:24 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:25 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:26 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:27 [Reenu zealot segment of Reenu zealot armor Invoke]: Unknown function [objCanDetect] ### (and (setq candidateObj (objGetTarget gSource)) (leq (objGetDistance gSource candidateObj) maxRange) (objCanDetect gSource candidateObj)) ###
2022-10-08 20:10:32 Loaded game file version: 1.9.2 (1.9.402.0)
2022-10-08 20:10:32 Extension: Ancient Races Vol 1 [1.0 Alpha 8]
2022-10-08 20:10:32 Extension: Domina & Oracus II: The Vault of the Galaxy [1.0 Alpha 8]
2022-10-08 20:10:32 Using API version: 44
2022-10-08 20:11:10 GamesAtmel-7101.sav: System 3f: Unable to load object.
State: Loading object subclass
ObjectClassID: 100007
[Malachron (144df)]