Author Topic: OpenXcom has crashed: std::bad_array_new_length  (Read 415 times)

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
OpenXcom has crashed: std::bad_array_new_length
« on: March 29, 2025, 12:43:53 am »
How I can fix it?
OpenXcom has crashed: std::bad_array_new_length
I have newest version, updated automatically.
What should I do?
I have spend a year in-game time, this is my mod list from log:

Active mods:
[29-03-2025_01-18-05]   [INFO]   - x-com-files v3.6
[29-03-2025_01-18-05]   [INFO]   - amiga-psx-fonts v1.1
[29-03-2025_01-18-05]   [INFO]   - dark-geoscape v1.0
[29-03-2025_01-18-05]   [INFO]   - expanded-markers-x-com-files v0.1.2
[29-03-2025_01-18-05]   [INFO]   - weapon_ranges_shown v0.1
[29-03-2025_01-18-05]   [INFO]   - x-com-files-alternative-art v1.2
[29-03-2025_01-18-05]   [INFO]   - x-com-resound v2.91
[29-03-2025_01-18-05]   [INFO]   - xcf-remusic v0.8
[29-03-2025_01-18-05]   [INFO]   - x-com-names v3.1
[29-03-2025_01-18-05]   [INFO]   - XCF-CyrNames vCamio
[29-03-2025_01-18-05]   [INFO]   - XCF-units-to-BOXCE v1.0.0
[29-03-2025_01-18-05]   [INFO]   - x-com-files-arsenal-additions v0.8.1
[29-03-2025_01-18-05]   [INFO]   - x-com-files-scav v1.6.7
[29-03-2025_01-18-05]   [INFO]   - Chemlasers v2.2
[29-03-2025_01-18-05]   [INFO]   - LightningWeapons v2.1.3
[29-03-2025_01-18-05]   [INFO]   - fiveseven v1.0
[29-03-2025_01-18-05]   [INFO]   - XCF_more-ufos v1.1.0
[29-03-2025_01-18-05]   [INFO]   - Interceptions v0.3.41B
[29-03-2025_01-18-05]   [INFO]   - XCF_Facility_Expansion_Pack v0.9.0
[29-03-2025_01-18-05]   [INFO]   - XCF-empty v1.0
[29-03-2025_01-18-05]   [INFO]   - Recruitment_Office_XCF v1.04
[29-03-2025_01-18-05]   [INFO]   - XCF_elite-commendations v2.1.0
[29-03-2025_01-18-05]   [INFO]   - medical-medals-memorative-glas v0.2.0
[29-03-2025_01-18-05]   [INFO]   - nomobloodpouringfrommyveins v3.2
[29-03-2025_01-18-05]   [INFO]   - natalie_morozoff_join v3.6
[29-03-2025_01-18-05]   [INFO]   - XCF_MAPS_AND_SCRAPS v1.1
[29-03-2025_01-18-05]   [INFO]   - Yautja v0.11
[29-03-2025_01-18-05]   [INFO]   - OMM v1.0
[29-03-2025_01-18-05]   [INFO]   - XCF_assasin_not_warrior v1.1
[29-03-2025_01-18-05]   [INFO]   - liberation v1.0
[29-03-2025_01-18-05]   [INFO]   - Begin_in_1994 v3.42
[29-03-2025_01-18-05]   [INFO]   - bughunt_turn30 v1.0
[29-03-2025_01-18-05]   [INFO]   - First turn TU tweak v0.8
[29-03-2025_01-18-05]   [INFO]   - SFW-Files v1.0
[29-03-2025_01-18-05]   [INFO]   - everyone-surrender v0.1

I have closed all researches but that error appears again and again, in the same time.

Need HELP !)   

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #1 on: March 29, 2025, 08:50:16 am »
What should I do?

I'd recommend not enabling every half-baked unmaintained amateur submod in existence.

Need HELP !)

Then provide at least the whole log, so that we can actually see the error.

And if the crash was during gameplay, then also a saved game just before the crash.

Offline Othvez

  • Squaddie
  • *
  • Posts: 1
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #2 on: March 30, 2025, 05:53:38 pm »
How I can fix it?
OpenXcom has crashed: std::bad_array_new_length
I have newest version, updated automatically.
What should I do?
I have spend a year in-game time, this is my mod list from log:

Active mods:
[29-03-2025_01-18-05]   [INFO]   - x-com-files v3.6
[29-03-2025_01-18-05]   [INFO]   - amiga-psx-fonts v1.1
[29-03-2025_01-18-05]   [INFO]   - dark-geoscape v1.0
[29-03-2025_01-18-05]   [INFO]   - expanded-markers-x-com-files v0.1.2
[29-03-2025_01-18-05]   [INFO]   - weapon_ranges_shown v0.1
[29-03-2025_01-18-05]   [INFO]   - x-com-files-alternative-art v1.2
[29-03-2025_01-18-05]   [INFO]   - x-com-resound v2.91
[29-03-2025_01-18-05]   [INFO]   - xcf-remusic v0.8
[29-03-2025_01-18-05]   [INFO]   - x-com-names v3.1
[29-03-2025_01-18-05]   [INFO]   - XCF-CyrNames vCamio
[29-03-2025_01-18-05]   [INFO]   - XCF-units-to-BOXCE v1.0.0
[29-03-2025_01-18-05]   [INFO]   - x-com-files-arsenal-additions v0.8.1
[29-03-2025_01-18-05]   [INFO]   - x-com-files-scav v1.6.7
[29-03-2025_01-18-05]   [INFO]   - Chemlasers v2.2
[29-03-2025_01-18-05]   [INFO]   - LightningWeapons v2.1.3
[29-03-2025_01-18-05]   [INFO]   - fiveseven v1.0
[29-03-2025_01-18-05]   [INFO]   - XCF_more-ufos v1.1.0
[29-03-2025_01-18-05]   [INFO]   - Interceptions v0.3.41B
[29-03-2025_01-18-05]   [INFO]   - XCF_Facility_Expansion_Pack v0.9.0
[29-03-2025_01-18-05]   [INFO]   - XCF-empty v1.0
[29-03-2025_01-18-05]   [INFO]   - Recruitment_Office_XCF v1.04
[29-03-2025_01-18-05]   [INFO]   - XCF_elite-commendations v2.1.0
[29-03-2025_01-18-05]   [INFO]   - medical-medals-memorative-glas v0.2.0
[29-03-2025_01-18-05]   [INFO]   - nomobloodpouringfrommyveins v3.2
[29-03-2025_01-18-05]   [INFO]   - natalie_morozoff_join v3.6
[29-03-2025_01-18-05]   [INFO]   - XCF_MAPS_AND_SCRAPS v1.1
[29-03-2025_01-18-05]   [INFO]   - Yautja v0.11
[29-03-2025_01-18-05]   [INFO]   - OMM v1.0
[29-03-2025_01-18-05]   [INFO]   - XCF_assasin_not_warrior v1.1
[29-03-2025_01-18-05]   [INFO]   - liberation v1.0
[29-03-2025_01-18-05]   [INFO]   - Begin_in_1994 v3.42
[29-03-2025_01-18-05]   [INFO]   - bughunt_turn30 v1.0
[29-03-2025_01-18-05]   [INFO]   - First turn TU tweak v0.8
[29-03-2025_01-18-05]   [INFO]   - SFW-Files v1.0
[29-03-2025_01-18-05]   [INFO]   - everyone-surrender v0.1

I have closed all researches but that error appears again and again, in the same time.

Need HELP !)
Some mods might not be fully compatible with each other or with the version of OpenXcom you're using. Try disabling a few mods and see if the crash persists. Mods that significantly alter game mechanics (like XCF mods) might be causing the issue.


Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #3 on: March 31, 2025, 09:34:06 pm »
thanks a lot for answering!
this my saved game --- ! ups I can't put link here... how I can send my saved game to you?)
I have "OpenXcom has crashed: std::bad_array_new_length
Log file: E:/Games/UFO-XCF/user/openxcom.log" again.

The is crashing in 31 june 1995, about 30 sec after load a saved game.

This is my log-file --- ! ups I can't put link here... how I can send my log to you?)

Best wishes!

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #4 on: March 31, 2025, 09:38:57 pm »
attach the save file and the log file as an attachment to your post

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #5 on: March 31, 2025, 10:01:41 pm »
Here it is)

And I follow the advise to switch some mods off and... the game does not run any more((

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #6 on: March 31, 2025, 10:24:02 pm »
I was interested in a log where the "OpenXcom has crashed: std::bad_array_new_length" error message can be seen.
The attached log does not contain it.

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #7 on: March 31, 2025, 10:38:02 pm »
Oh, yeah) here it is)

I found the "std::bad_array_new_length" in there before sending, to be sure!)

And the first log-file was after mods switching off, when game finally broke up.

Well, would you be so kind to explain how I can turn mods back, with out running the game, and game menu?)
 

Offline R1dO

  • Colonel
  • ****
  • Posts: 443
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #8 on: March 31, 2025, 10:50:47 pm »
You want to look at the file "options.cfg".

At the start there is a section called "mods", which lists all known mods (by "id:")  and whether they are enabled (e.g. "active: true").

For instance, here is an excerpt of one of mine:
Code: [Select]
mods:                                                                                               
  - active: true                                                                                   
    id: x-com-files                                                                                 
  - active: false                                                                                   
    id: piratez                                                                                     
  - active: false                                                                                   
    id: xcom1                                                                                       
  - active: false                                                                                   
    id: xcom2                                                                                       
  - active: false                                                                                   
    id: Aliens_Pick_Up_Weapons                                                                     
  - active: false                                                                                   
    id: Aliens_Pick_Up_Weapons_TFTD   

You want to set "active: true" for those you want enabled.
Be sure to backup this file first though.

If the game crashes at startup it is actually better to delete that file and then startup the game. This ensures a default start (which should work) so you can start activating each mod (and restart the game after each activation) which enables tracking down the mod that is causing problems.

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #9 on: March 31, 2025, 11:03:19 pm »
I'll try!

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9484
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #10 on: Today at 12:12:08 am »
How I can fix it?
OpenXcom has crashed: std::bad_array_new_length
What should I do?
Need HELP !)

The crash is caused by the mod "Maps and scraps".
Turn off (or fix) the mod to prevent the crash.

Edit: ...more precisely it is caused by a mission "STR_SCHOOL_SHOOTING_MISSION" from "Maps and scraps", which is missing a spawn zone.

PS: turning off "Yautja Hunter" mod would (accidentally) work too (because the RNG would work out differently end of month), but the real problem is the "Maps and scraps" mod

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #11 on: Today at 01:08:11 am »
It works ! It works !

Thanks to all !!!

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #12 on: Today at 01:08:59 am »
It works! It works!
Yes, I switch off "yautja hunter" - and game walk through)
Before that, I deleted Options.cfg, and game get started.

Thank you, @Meridian, and you, @R1dO !!!

Offline DG85

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: OpenXcom has crashed: std::bad_array_new_length
« Reply #13 on: Today at 01:10:02 am »
Maps & Scraps, I see.