Author Topic: Invalid zone number help  (Read 9684 times)

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Invalid zone number help
« on: December 13, 2017, 01:38:32 am »
So i´m playing 40k mod and at the beginning of the month after rating, the new month starts to spawns missions .. 1 mission site and other event site , and when i "think" is about to spawn another this error occurs anyone can shed some light (is it too many missions with same spawn?)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Invalid zone number help
« Reply #1 on: December 13, 2017, 02:01:22 am »
So i´m playing 40k mod and at the beginning of the month after rating, the new month starts to spawns missions .. 1 mission site and other event site , and when i "think" is about to spawn another this error occurs anyone can shed some light (is it too many missions with same spawn?)

I'm looking at your rulesets. In which regions are those new missions supposed to spawn?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Invalid zone number help
« Reply #2 on: December 13, 2017, 02:39:53 am »
it'll probably be a terror mission or something using spawnZone 3 (normal for actual countries and whatnot) in a region that's specifically for terror missions (typically only containing 1 set of zones)

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: Invalid zone number help
« Reply #3 on: December 13, 2017, 12:44:16 pm »
the zone is asia like pic in attachment both missions

  - type: STR_M_4MISSION #cathedral
    points: 10
    objective: 0
    waves:
      - ufo: STR_CAT
        count: 2
        trajectory: B0
        timer: 5000   

  - type: STR_ALIEN_ARTIFACT
    points: 10
    objective: 3
    spawnZone: 0
    waves:
      - ufo: STR_ARTIFACT_SITE_P1 # spawn this site directly
        count: 1
        trajectory: P10
        timer: 0
        objective: true   

i think the third one  that causes the crash must be war or terror

  - type: STR_ALIEN_WAR
    points: 10
    objective: 3
    retaliationOdds: 0
    spawnZone: 0
    waves:
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P1
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P1
        timer: 9600
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P0
        timer: 12000
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P7
        timer: 9000
        objective: true

  - type: STR_ALIEN_TERROR
    points: 10
    objective: 3
    spawnZone: 3 #Mission zone for terror missions
    waves:
      - ufo: STR_MEDIUM_SCOUT
        count: 1
        trajectory: P1
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P1
        timer: 9600
      - ufo: STR_TERROR_SHIP
        count: 1
        trajectory: P0
        timer: 12000
      - ufo: STR_TERROR_SHIP
        count: 1
        trajectory: P7
        timer: 9000
        objective: true

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Invalid zone number help
« Reply #4 on: December 13, 2017, 03:29:43 pm »
try changing alien terror to spawnzone 0 and see if the crash persists

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Invalid zone number help
« Reply #5 on: December 13, 2017, 08:01:13 pm »
try changing alien terror to spawnzone 0 and see if the crash persists

This results on the mission never being spawned

@bulletdesigner

Try rechecking the ufoTrajectories

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: Invalid zone number help
« Reply #6 on: December 14, 2017, 03:06:44 am »

try changing alien terror to spawnzone 0 and see if the crash persists, tried it but crash presist

Maybe abnormal ufoTrajectories in my part?:
ufoTrajectories:
the rest is the same vanila oxcom
  - id: P10
    groundTimer: 0
    waypoints:
      - [0, 0, 0]
  - id: B0
    groundTimer: 50000000
    waypoints:
      - [1, 1 , 100]
      - [1, 0 , 100]

also i got a mission 3 still in place because of that ground timer (but is not spawning because mission 4 research cancels it out) so i got to assume is the STR_ALIEN_WAR mission

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Invalid zone number help
« Reply #7 on: December 14, 2017, 04:37:57 am »
i know you're using oxce+ but i've added some more detailed crash info in the upstream nightly that should spit out the information you need to fix this.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Invalid zone number help
« Reply #8 on: December 14, 2017, 05:06:25 am »
i know you're using oxce+ but i've added some more detailed crash info in the upstream nightly that should spit out the information you need to fix this.

I've first tried using the 40k mod on nightly I had, since I figured that the 40k mission generation code should work in both the nightlies and OXCE+, and it did work, and I was able to reproduce the crash that bulletdesigner described.

Then I downloaded the nightly build you just uploaded, switched verbose to true in options.cfg, tried again the 40k but this time I'm getting a segmentation error the moment I click start game and Geoscape appears

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Invalid zone number help
« Reply #9 on: December 14, 2017, 05:43:54 am »
yeah looking at it i didn't cover all cases it seems, you shouldn't need verbose logging btw

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Invalid zone number help
« Reply #10 on: December 14, 2017, 08:57:23 pm »
yeah looking at it i didn't cover all cases it seems, you shouldn't need verbose logging btw

I think I nailed the error but it doesn't make much sense.

I started spawning each of the individual missions separately, and when I tried the STR_ALIEN_WAR I got this error message:

[14-12-2017_18-45-59]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_ALIEN_WAR in region: STR_NORTH_AMERICA, mission tried to find a waypoint in zone 6 but this region only has 6zone types defined.

And STR_ALIEN_TERROR seems to be also crashing for the same reason:

[14-12-2017_18-54-31]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_ALIEN_TERROR in region: STR_SOUTHERN_AFRICA, mission tried to find a waypoint in zone 6 but this region only has 6zone types defined.

@bulletdesigner

You should add an entry for month 0, on all settings where months are defined, like this:

Quote
    raceWeights:
      0:
        STR_WARWARPTALON: 30
        STR_ASSAULTCHAOS: 70
      12:
        STR_WARWARPTALON: 30
        STR_ASSAULTCHAOS: 70

This helps with testing - the segmentation error before was because of no month 0 defined
« Last Edit: December 14, 2017, 09:00:26 pm by Hobbes »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Invalid zone number help
« Reply #11 on: December 15, 2017, 07:23:18 am »
ah, i guess for reference i should point out that "mission tried to find a waypoint in zone 6" starts counting from 0 and "this region only has 6 zone types defined." starts counting from 1.
it's trying to spawn stuff in the seventh zone out of a set of six.
i've tried to clarify it a little in today's commit.
« Last Edit: December 15, 2017, 08:02:27 am by Warboy1982 »

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: Invalid zone number help
« Reply #12 on: December 15, 2017, 11:59:28 am »

You should add an entry for month 0, on all settings where months are defined, like this:

This helps with testing - the segmentation error before was because of no month 0 defined

ok done, i thought because mission only starts to appear at 13th month there was no worry about month 0  :P

so i should  add more zones to regions?
#NORTH AMERICA
        - [280, 280, -38.43, -38.43, -5]
        - [237, 237, -42.33, -42.33, -5]
        - [248, 248, -48.27, -48.27, -5]
        - [262, 262, -35.33, -35.33, -5]
        - [261.2, 261.2, -20, -20, -5]
        - [257.9, 257.9, -30.1, -30.1, -5]
        - [261, 261, -33.7, -33.7, -5]
        - [281.9, 281.9, -35.3, -35.3, -5]
        - [241.2, 241.2, -34.5, -34.5, -5]
        - [240.4, 240.4, -44, -44, -5]
        - [276.8, 276.8, -46.4, -46.4, -5]
        - [251, 251, -49.5, -49.5, -5]
ex: adding more locations to this?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Invalid zone number help
« Reply #13 on: December 15, 2017, 03:54:29 pm »
it's trying to spawn stuff in the seventh zone out of a set of six.

But the weird part is that I can't find where exactly where there's a reference to a seventh zone: the ufoTrajectories and regions are the same as vanilla, so it should work. Unless there's a reference to a 7th zone hidden elsewhere.

Also, this bug seems only to affect mission sites (objective 3) which use multiple UFOs - the other missions (Research at least) don't seem to suffer from this bug since the UFOs are spawned without crashes.

so i should  add more zones to regions?
#NORTH AMERICA
        - [280, 280, -38.43, -38.43, -5]
        - [237, 237, -42.33, -42.33, -5]
        - [248, 248, -48.27, -48.27, -5]
        - [262, 262, -35.33, -35.33, -5]
        - [261.2, 261.2, -20, -20, -5]
        - [257.9, 257.9, -30.1, -30.1, -5]
        - [261, 261, -33.7, -33.7, -5]
        - [281.9, 281.9, -35.3, -35.3, -5]
        - [241.2, 241.2, -34.5, -34.5, -5]
        - [240.4, 240.4, -44, -44, -5]
        - [276.8, 276.8, -46.4, -46.4, -5]
        - [251, 251, -49.5, -49.5, -5]
ex: adding more locations to this?

Already tried it by setting all the Terror and Alien War mission to only run in North America and adding a missionZone 6 to that region. I still get the same crash, but now it says that missionZone 7 is missing...

Quote
[15-12-2017_14-09-44]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_ALIEN_WAR in region: STR_NORTH_AMERICA, mission tried to find a waypoint in zone 7 but this region only has zones valid up to 6
« Last Edit: December 15, 2017, 04:13:06 pm by Hobbes »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Invalid zone number help
« Reply #14 on: December 16, 2017, 12:33:01 am »
@bulletdesigner

The issue wasn't with your rulesets but with a bug that was affecting all mods and that has been already fixed by Warboy on the nightlies