BlindMindStudios / StarRuler2-Source

4X Space Strategy game Star Ruler 2's open source distribution.
http://starruler2.com
Other
1.45k stars 244 forks source link

[Scripts] Sandbox: random out-of-bounds errors on start #17

Open Houkime opened 5 years ago

Houkime commented 5 years ago

OS: Arch Linux (however it might not really matter)

You start the Design Sandbox and look at the console output. And with a chance >50% see sth like listed below. Seems completely random and irreproducable. Unlike Tutorial, Sandbox doesn't hang

Script Exception: Index out of bounds
/opt/starruler2/scripts/definitions/influence.as
  influence::void InfluenceVoteType::init() | Line 1472 | Col 4
  influence::void init() | Line 4091 | Col 3
Script Exception: Index out of bounds
 /opt/starruler2/scripts/definitions/random_events.as
  random_events::void OnBlock::init(RandomEvent@) | Line 113 | Col 4
  random_events::void EventResult::init(RandomEvent@) | Line 94 | Col 3
  random_events::void EventOption::init(RandomEvent@) | Line 58 | Col 3
  random_events::void RandomEvent::init() | Line 34 | Col 4
  random_events::void init() | Line 521 | Col 3
Script Exception: Index out of bounds
 /opt/starruler2/scripts/definitions/buildings.as
  buildings::void loadBuildings(const string&inout) | Line 552 | Col 5
  buildings::void preInit() | Line 607 | Col 3
...
Error: Could not find building type: 'Altar'
Could not instantiate hook: SpawnBuilding(Altar, (8, 4), Develop = True)
Could not instantiate hook [TriggerHomeworld at 0x7fc07b2265f0] on trait Devout
 Error: Could not find building type: 'MotherStalk'
Could not instantiate hook: SpawnBuilding(MotherStalk, (9, 5), Develop = True)
Could not instantiate hook [TriggerHomeworld at 0x7fc07b244940] on trait Verdant
 Error: Could not find building type: 'AncientCannon'
Could not instantiate hook: SpawnBuilding(AncientCannon, (4, 2))
TriggerCreate(): could not find inner hook:  SpawnBuilding(AncientCannon, (4, 2)) 
Could not instantiate hook: [TriggerCreate at 0x7fc07b89c840] in AncientCannon
 Error: Could not find building type: 'AncientRuins'
Could not instantiate hook: SpawnBuilding(AncientRuins, (2, 2))
TriggerCreate(): could not find inner hook:  SpawnBuilding(AncientRuins, (2, 2)) 
Could not instantiate hook: [TriggerCreate at 0x7fc07b89df80] in AncientRuins
 Error: Could not find building type: 'Factory'
Could not instantiate hook: SpawnBuilding(Factory, (4, 3), Develop = True)
OnEnable(): could not find inner hook: SpawnBuilding(Factory, (4, 3), Develop = True)
Could not instantiate hook: [OnEnable at 0x7fc07b7514e0] in PrivTwinned
 Error: Could not find building type: 'Factory'
Could not instantiate hook: SpawnBuilding(Factory, (4, 3), Develop = True)
 Invalid map hook: \t\t\tSpawnBuilding(Factory, (4, 3), Develop = True)
DaloLorn commented 5 years ago

This is a lot of errors that should not be happening at all...

The reason you're not experiencing any issues in the Sandbox is that, as far as I can tell, the breakdown is confined to things that do not naturally occur in there - Influence-related content, random events (which are disabled in the vanilla game anyway, because the devs never wrote enough of them to warrant turning them on), and buildings.

Houkime commented 5 years ago

Seems like these errors became unobservable since #20 Hangs still occur though ( #15 )