aliens

Author Topic: [Solved] vector::_M_range_check after alien spots all the player units at once  (Read 2334 times)

Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
Howdy!

I'm asking here because my mod uses OXCE, so I think it would be the right place.

One of my players is experiencing a vector::_M_range_check issue on the latest UNEXCOM update. Link here to the GitHub repo. The crash happens on the Alien turn. Attaching screenshots as support. As soon as the Sectoid looks in the direction of the player's craft, it has clear view of all the units. And it crashes. I made tests by removing several xcom units from the LOS of the Sectoid and the CTD was prevented.

I suppose the game cannot handle the alien unit having more than ten targets at the same time in this particular case? I made changes on the map routes and on the armor of the Sectoid to see if that solves the issue, but I cannot find a way to solve it. I suspect maybe one tile on the IDT_RED_FARM may be the reason of the CTD, but haven't found anything so far.

Made tests with OXCE v7.5.3 and v7.4.4, the issue was recurrent on both.

Any help is appreciated!  ;D
« Last Edit: February 12, 2023, 12:45:48 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
terrain IDT_BARN_RED_2
tile at position [35,18,0]
part 3 (i.e. object on the tile)
loftemps array = {6, 6, 6, 130, 130, 130, 130, 130, 6, 6, 6, 130}

value 130 is invalid... UFO has only 112 loftemps (from 0 to 111)

Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
terrain IDT_BARN_RED_2
tile at position [35,18,0]
part 3 (i.e. object on the tile)
loftemps array = {6, 6, 6, 130, 130, 130, 130, 130, 6, 6, 6, 130}

value 130 is invalid... UFO has only 112 loftemps (from 0 to 111)

Thanks a lot for your help, Meridian! I didn't noticed the thing until you pointed out it.  ;D