chaosvolt / cdda-arcana-mod

Arcana and Magic Items mod for Cataclysm: Dark Days Ahead
Other
157 stars 62 forks source link

Randomly getting a Bad Allocation Error when trying to create a character, with a Seg Fault error upon closing the game. #350

Closed Celepito closed 1 year ago

Celepito commented 1 year ago

I've run into a weird issue, and I am getting conniptions trying to pinpoint it.

I havent played in nearly two years, but I've downloaded the latest launcher (the not-catapult one, as thats the one I'm familiar with), and updated, downloaded the latest release of Arcana, put the right version into my CDDA folder (so the not-BN version).

First test world (with all my mods), worked.

2nd didnt, 3rd didnt, etc. I keep getting:

 DEBUG    : Error: bad allocation

 FUNCTION : new_character_tab
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\main_menu.cpp
 LINE     : 983
 VERSION  : 602e9a2

which stops me from getting into the character creation screen. And after closing the game:

The program has crashed.
See the log file for a stack trace.
CRASH LOG FILE: ./config/crash.log
VERSION: 602e9a2
TYPE: Signal
MESSAGE: SIGSEGV: Segmentation fault

I've tested in a completely new install on multiple hard drives, the old but updated one, and finally wiped the old install and made a new install on that hard drive too. All the tests were done with only Arcana and the initially enabled standard mods installed (No Rail Stations, Disable NPC Needs, Portal Storms Ignore NPCs, No Fungal Growth, Bionic Professions).

I see no rhyme or reason to it, randomly a world will work and get me into the CC screen, but most simply stop with the above errors.

Terrace Heights.zip is a world that works, continuously.

Dunnville.zip spits out the above error combination. with this crashlog crashlog Dunnville.zip, same for Ironside.zip, crashlog Ironside.zip, which has a somewhat different crashlog.

All three of those are on a completely fresh install on the same hard drive.

Worlds without Arcana work on every install, including the old one before I wiped it.

Help?

chaosvolt commented 1 year ago

That's...weird, and nothing immediately comes to mind that could cause that. I would usually assume wrong version, especially if you're using a release of Arcana with experimental DDA (since the releases are for stable builds), but that would cause errors with any world you try to start up.

I'll try to look into this later today but not really sure what to make of that.

Celepito commented 1 year ago

Thanks in advanced.

Also, it seems I was wrong about the worlds working continuously, Terrace Heights has stopped working. crashlog Terrace Heights.zip

Found that after creating a working world on an install from a different hard drive (I thought maybe I could hardforce it, just create a working world and play that). I created a character, saved and quit, then tried loading the character and got the issue. Upon wanting to test Terrace Heights, it also threw out the error before getting into the character creation screen.

EDIT: Restarting the PC didnt fix the issue either.

chaosvolt commented 1 year ago

Hmm, haven't yet made any progress on it, asked about it elsewhere and monster or monstergroup changes are suspected, unsure how that'd cause it.

Celepito commented 1 year ago

Okay, so Arcana has a few errors that I didnt mention yet because I thought you were already aware of them and I didnt want to double report, but it seems they might be relevant. I hadnt made that connection in my head, which is stupid on my part, sorry. I was really tired yesterday before making the report.:

 DEBUG    : (json-error)
Json error: data/mods/Arcana/techniques.json:149:22: Invalid or misplaced field name "stunned_target" in JSON data

    "unarmed_weapons_allowed": false,
    "required_buffs_all": [ "buff_shrike_oncrit" ],
    "stunned_target":
                     ^
                      true,
    "crit_ok": true,
    "weighting": 3,

 FUNCTION : error_skipped_members
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\flexbuffer_json.cpp
 LINE     : 333
 VERSION  : 602e9a2
 DEBUG    : (json-error)
Json error: data/mods/Arcana/vehicleparts.json:7:14: Invalid or misplaced field name "symbol" in JSON data

    "location": "engine_block",
    "name": { "str": "distortion amplifier motor" },
    "symbol":
             ^
              "*",
    "looks_like": "vgen2",
    "color": "light_red",

 FUNCTION : error_skipped_members
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\flexbuffer_json.cpp
 LINE     : 333
 VERSION  : 602e9a2
  DEBUG    : (json-error)

Json error: data/mods/Arcana/vehicleparts.json:53:21: Invalid or misplaced field name "broken_symbol" in JSON data

    "symbol": "O",
    "color": "light_blue",
    "broken_symbol":
                    ^
                     "#",
    "broken_color": "dark_gray",
    "damage_modifier": 60,

 FUNCTION : error_skipped_members
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\flexbuffer_json.cpp
 LINE     : 333
 VERSION  : 602e9a2
 DEBUG    : (json-error)
Json error: data/mods/Arcana/vehicleparts.json:51:14: Invalid or misplaced field name "symbol" in JSON data

    "abstract": "essence_surge_generator_abstract",
    "type": "vehicle_part",
    "symbol":
             ^
              "O",
    "color": "light_blue",
    "broken_symbol": "#",

 FUNCTION : error_skipped_members
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\flexbuffer_json.cpp
 LINE     : 333
 VERSION  : 602e9a2

 DEBUG    : (json-error)
Json error: data/mods/Arcana/vehicleparts.json:136:21: Invalid or misplaced field name "broken_symbol" in JSON data

    "symbol": "*",
    "color": "magenta",
    "broken_symbol":
                    ^
                     "#",
    "broken_color": "dark_gray",
    "damage_modifier": 60,

 FUNCTION : error_skipped_members
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\flexbuffer_json.cpp
 LINE     : 333
 VERSION  : 602e9a2
 DEBUG    : (json-error)
Json error: data/mods/Arcana/vehicleparts.json:134:14: Invalid or misplaced field name "symbol" in JSON data

    "id": "surge_generator_part",
    "name": { "str": "displacement surge motor" },
    "symbol":
             ^
              "*",
    "color": "magenta",
    "broken_symbol": "#",

 FUNCTION : error_skipped_members
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\flexbuffer_json.cpp
 LINE     : 333
 VERSION  : 602e9a2

And the following dont always get shown, randomly, so they might be the biggest part of it randomly not working?:

DEBUG    : vehicle part distorion_amp_motor_part defines no variants

 FUNCTION : check
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\veh_type.cpp
 LINE     : 786
 VERSION  : 602e9a2
 DEBUG    : vehicle part essence_surge_generator_part defines no variants

 FUNCTION : check
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\veh_type.cpp
 LINE     : 786
 VERSION  : 602e9a2
DEBUG    : vehicle part essence_blood_surge_generator_part defines no variants

 FUNCTION : check
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\veh_type.cpp
 LINE     : 786
 VERSION  : 602e9a2
DEBUG    : vehicle part essence_dull_surge_generator_part defines no variants

 FUNCTION : check
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\veh_type.cpp
 LINE     : 786
 VERSION  : 602e9a2
 DEBUG    : vehicle part essence_pure_surge_generator_part defines no variants

 FUNCTION : check
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\veh_type.cpp
 LINE     : 786
 VERSION  : 602e9a2
 DEBUG    : vehicle part surge_generator_part defines no variants

 FUNCTION : check
 FILE     : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\veh_type.cpp
 LINE     : 786
 VERSION  : 602e9a2

EDIT: Upon further testing, yeah, it seems to be happening in the Verifying stage, when it reaches the Vehicle parts section. I didnt notice before, because its so fast.

chaosvolt commented 1 year ago

Ah, that helps. That appears to be due to https://github.com/CleverRaven/Cataclysm-DDA/pull/65871 from the looks of it.

chaosvolt commented 1 year ago

Okay, committed fixes in https://github.com/chaosvolt/cdda-arcana-mod/commit/6529662afd7bbfc1d2b8d3673ffaf42a52bd1138 but let me know if it still randomly fails afterward.

Celepito commented 1 year ago

All worlds I have tested so far have worked, so it seems that that indeed solved the issue.