Author Topic: Vector Error.  (Read 3695 times)

wcho035

  • Guest
Vector Error.
« on: February 11, 2020, 01:27:23 pm »
Greetings,

I have finally completed the final version of my vanilla Hybrid Mod. During the testing of it, I have encounter a vector error. This error is constant and repeated.

It always occur in every game, during the cargo ship terror mission.

A fatal error has occurred: vector::_M_range_check: __n (which is 1816) >= this->size() (which is 1792)

It always happens in the start of the mission, just after the player has end his turn and switching to Alien's

This time, the mod, save game and error log will be included.

Not sure if it is a bug or error with the mod.

I have checked the mod's Aliendeployment, it is exactly the same as the one from TFTD, with the exception the weapon list for the aliens has changed.

I have also double checked that I had copied the original maps and routes from TFTD, only the terrains are not the same because they are converted from TFTD to ufo.

wcho035

  • Guest
Re: Vector Error.
« Reply #1 on: February 11, 2020, 01:33:47 pm »
I wish to amend the entry above that this error happened during the cargo terror mission in battlescape.

I have checked the aliendeployment details of the Cargo terror mission of my mod vs the one from TFTD.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Vector Error.
« Reply #2 on: February 11, 2020, 02:59:17 pm »
Your mod is using UFO LOFTemps: https://www.ufopaedia.org/index.php/LOFTEMPS.DAT
which have only 112 entries (= 1792 slices (112*16))

But your MCD files reference TFTD LOFTemps, which have 114 entries.
Thus you get a crash every time the 113th (id=112) or 114th (id=113) LOFTemp is accessed (and not found).

wcho035

  • Guest
Re: Vector Error.
« Reply #3 on: February 11, 2020, 03:29:48 pm »
If I tried replacing the LOFTEMPS.DAT from UFO with the one from TFTD. This vainly doesn't solved the problem.

Can you suggest a solution that will help? Should I trim the MCD file ref? Or Something?

This is a mod I want to release to the masses. I am sure they love to play Cargo Shipping terror mission in UFO from TFTD. It will be a shame to leave it out. I don't have much error in my testing so far with the exception of this.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Vector Error.
« Reply #4 on: February 11, 2020, 04:32:40 pm »
If I tried replacing the LOFTEMPS.DAT from UFO with the one from TFTD. This vainly doesn't solved the problem.

It works for me.

wcho035

  • Guest
Re: Vector Error.
« Reply #5 on: February 11, 2020, 04:52:42 pm »
I try again.. maybe there's something missing.

wcho035

  • Guest
Re: Vector Error.
« Reply #6 on: February 11, 2020, 05:02:02 pm »
Solve it, there are TWO loftemps.dat

One in terrain and the other in geodata

Beautiful. Now, just more testing and this mod will be ready in no time.

Hope there are people still interested in a full blown vanilla Hybrid mod.

Thank you Meridian as Always.

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Re: Vector Error.
« Reply #7 on: February 24, 2020, 11:08:02 pm »
I’m doing a simple mod (no global changes to the graphics) and encountered a similar (at first glance) error. Also, a crash occurs during the first alien turn. Can someone tell me where to look for a reason?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Vector Error.
« Reply #8 on: February 24, 2020, 11:13:54 pm »
I'd guess the armor of your new unit is missing a LOFTemp.

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Re: Vector Error.
« Reply #9 on: February 24, 2020, 11:33:35 pm »
I'd guess the armor of your new unit is missing a LOFTemp.

Yes, that’s the reason! Moved the armor to another place in the file, and its LOFTemp was lost somewhere. Thank you very much!