aliens

Author Topic: OpenXcom crashed: vector::_M_range_check: __n (63) >= this->size() (34) ?  (Read 4676 times)

Offline robin

  • Commander
  • *****
  • Posts: 1216
  • ULTIMATE ROOKIE
    • View Profile
Full error log:
[01-11-2016_17-42-17]   [FATAL]   A fatal error has occurred: vector::_M_range_check: __n (which is 63) >= this->size() (which is 34)
[01-11-2016_17-42-19]   [FATAL]   OpenXcom has crashed: vector::_M_range_check: __n (which is 63) >= this->size() (which is 34)

It only happens on Alien Base Assault type of missions (including cydonia).
Now: I deleted some vanilla ufo items (ufo power source, so on..) and I'm still using the vanilla alien base; so the MCDs in the maps that are linked (by specialType) to an item, won't find that item (the only item directly placed in the maps is Elerium, which I didn't delete). I guess this could cause an error.
I tried to re-enable the deleted items but I still get the error. I can't quickly try a more proper fixing approach (alien base stuff is not ready) so I'd like at least to know if I'm looking in the right direction, or if it is something else entirely.
Thanks.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: OpenXcom crashed: vector::_M_range_check: __n (63) >= this->size() (34) ?
« Reply #1 on: November 01, 2016, 07:39:32 pm »
Try checking if the DieMCD (byte 44) settings are correct. Also, check the LOFs to see if you have a wrong value in any of them. Or it can be also a bad route node that doesn't exist. The vector::_M_range_check error happens when the engine is expecting a certain value from the game's data files and it gets a wrong one instead.

When do you get the crash (loading, ingame, any specific action)?
« Last Edit: November 01, 2016, 07:44:56 pm by Hobbes »

Offline robin

  • Commander
  • *****
  • Posts: 1216
  • ULTIMATE ROOKIE
    • View Profile
Re: OpenXcom crashed: vector::_M_range_check: __n (63) >= this->size() (34) ?
« Reply #2 on: November 01, 2016, 10:02:45 pm »
Try checking if the DieMCD (byte 44) settings are correct. Also, check the LOFs to see if you have a wrong value in any of them. Or it can be also a bad route node that doesn't exist. The vector::_M_range_check error happens when the engine is expecting a certain value from the game's data files and it gets a wrong one instead.

When do you get the crash (loading, ingame, any specific action)?
Crash hits as soon as I hit 'OK' in the generate mission menu of the quick battle.
And I should be still using vanilla maps and vanilla terrains for the alien base.. so it can't (shouldn't) be a dieMCD or LOFs error...
I guess it really is the target_type/specialType thing... (though it should disappear when i re-enable the deleted items.. dunno).
« Last Edit: November 01, 2016, 10:06:37 pm by robin »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: OpenXcom crashed: vector::_M_range_check: __n (63) >= this->size() (34) ?
« Reply #3 on: November 02, 2016, 01:14:18 am »
Crash hits as soon as I hit 'OK' in the generate mission menu of the quick battle.
And I should be still using vanilla maps and vanilla terrains for the alien base.. so it can't (shouldn't) be a dieMCD or LOFs error...
I guess it really is the target_type/specialType thing... (though it should disappear when i re-enable the deleted items.. dunno).

AlienDeployment? Trying to assign a weapon that has been deleted? The issue is that there's something that the engine finds the wrong value assigned, and it can be either on vanilla or your additions.

Offline Grober Nitho

  • Sergeant
  • **
  • Posts: 18
    • View Profile
OpenXcom has crashed: vector::_M_range_check: __n (which is 1919) >= this->size() (which is 1824)
This is the only bug I can't handle. It appears at completely random intervals. It is completely independent of any activity and I have no idea what could be causing it. The mode I work is hybrid mode. It appeared more often during the underwater missions than the land missions, but now it also occurs during the land missions, but the problem is not present with the Geoscape, it only occurs during the missions. Aliendeployments.rul, on the other hand, does not contain anything that could be a problem.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8627
    • View Profile
Incorrect loftemps index. Tftd has only 114, you're trying to access the 119th or 120th.

Offline Grober Nitho

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Incorrect loftemps index. Tftd has only 114, you're trying to access the 119th or 120th.
Success found what made the problem. Deletted loftemps.dat from terrains folder and problem was solved, not occures again _M_range error. Have some other problem, which not can solving. The enemy tanks are vanilla tanks, but not show turrets, those complettly missing. Not know how can fix it. Not caus fatal eror, and not caus error, but not looks normally. If using an player tank, everything is fine.