CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.33k stars 4.14k forks source link

Crash when approaching Refugee Center. #14298

Closed etmoonshade closed 8 years ago

etmoonshade commented 8 years ago

Save is here: https://dl.dropboxusercontent.com/u/22571912/Goodsprings.7z - fail to Github for not accepting a 7z file type for upload.

A refugee center to the ENE (of where the save starts) reliably causes a crash when I approach it.

Of note is that I had a similar problem with a vault earlier in the game - as soon as a particular portion of the vault came into view, crashy-crashy-boom.

Version is 0.C-3985, Windows x64, Tiles.

remyroy commented 8 years ago

Here is the backtrace for this error:

#0  std::string::assign (this=this@entry=0x8df97a0, 
    __str=<error reading variable: Cannot access memory at address 0x70>)
    at /usr/include/c++/4.9/bits/basic_string.tcc:245
#1  0x0000000000d0fbbb in operator= (__str=..., this=0x8df97a0)
    at /usr/include/c++/4.9/bits/basic_string.h:555
#2  npc::set_fac (this=this@entry=0x8df82f0, fac_name="free_merchants")
    at src/npc.cpp:795
#3  0x0000000000d20963 in npc::load_npc_template (this=this@entry=0x8df82f0, 
    ident="evac_broker") at src/npc.cpp:159
#4  0x00000000006c4def in map::place_npc (this=this@entry=0x7ffffffe9f50, x=2, 
    y=y@entry=20, type="evac_broker") at src/mapgen.cpp:11334
#5  0x0000000000753b68 in jmapgen_npc::apply (this=<optimized out>, m=..., 
    x=..., y=...) at src/mapgen.cpp:644
#6  0x00000000006bbcdf in jmapgen_objects::apply (this=this@entry=0x7002ea0, 
    m=m@entry=0x7ffffffe9f50, density=density@entry=0.5) at src/mapgen.cpp:1577
#7  0x00000000006e0df2 in mapgen_function_json::generate (this=0x7002e30, 
    m=0x7ffffffe9f50, terrain_type=..., md=..., t=238849, d=<optimized out>)
    at src/mapgen.cpp:1559
#8  0x00000000006e1e33 in map::draw_map (this=this@entry=0x7ffffffe9f50, 
    terrain_type=..., t_north=..., t_east=..., t_south=..., t_west=..., 
    t_neast=..., t_seast=..., t_nwest=..., t_swest=..., t_above=..., 
    turn=238849, density=0.5, density@entry=0.49999997, zlevel=0, 
    rsettings=0x5ca2638) at src/mapgen.cpp:1677
#9  0x000000000072a53f in map::generate (this=this@entry=0x7ffffffe9f50, 
    x=x@entry=698, y=y@entry=564, z=z@entry=0, turn=238849)
    at src/mapgen.cpp:159
#10 0x00000000009ac6c0 in map::loadn (this=this@entry=0x57ca510, 
    gridx=gridx@entry=10, gridy=gridy@entry=3, gridz=gridz@entry=0, 
    update_vehicles=update_vehicles@entry=true) at src/map.cpp:6565
#11 0x00000000009ad6e2 in map::shift (this=0x57ca510, sx=sx@entry=1, 
    sy=sy@entry=0) at src/map.cpp:6367
#12 0x00000000007b381a in game::update_map (this=this@entry=0x57b9100, 
    x=@0x7fffffffb910: 60, y=@0x7fffffffb914: 67) at src/game.cpp:13485
#13 0x00000000007b4143 in game::update_map (this=this@entry=0x57b9100, p=
    0x60de200) at src/game.cpp:13450
#14 0x00000000007e80db in game::place_player (this=this@entry=0x57b9100, 
    dest_loc=...) at src/game.cpp:12318
#15 0x00000000007eb0ee in game::walk_move (this=this@entry=0x57b9100, 
    dest_loc=...) at src/game.cpp:12200
#16 0x00000000007ec1fc in game::plmove (this=this@entry=0x57b9100, 
    dx=dx@entry=1, dy=dy@entry=0, dz=dz@entry=0) at src/game.cpp:11964
#17 0x00000000007f822f in game::handle_action (this=this@entry=0x57b9100)
    at src/game.cpp:2488
#18 0x00000000007fbc3f in game::do_turn (this=0x57b9100) at src/game.cpp:1326
#19 0x0000000000a4a501 in main (argc=<optimized out>, argv=0x7fffffffe050)
    at src/main.cpp:434

In npc::set_fac, g->faction_by_ident returns a null faction for fac_name = "free_merchants".

remyroy commented 8 years ago

It seems something or someone tempered with your master.gsav file located in save/Goodsprings/. Replace the content of that file with this and you should be fine:

# version 24

{

    "next_mission_id" : 1,

    "next_faction_id" : 1,

    "next_npc_id" : 1,

    "active_missions" : [

    ],

    "factions" : [
        {
            "id" : "your_followers",
            "name" : "Your Followers",
            "desc" : "The survivors who have entrusted you with their well-being.  If morale drops, poor performance and mutiny may become issues.",
            "values" : 4608,
            "goal" : 3,
            "job1" : 1,
            "job2" : 13,
            "likes_u" : 60,
            "respects_u" : 60,
            "known_by_u" : true,
            "strength" : 1,
            "sneak" : 0,
            "crime" : -1,
            "cult" : -1,
            "good" : 0,
            "mapx" : 46,
            "mapy" : 42,
            "size" : 1,
            "power" : 100,
            "combat_ability" : 100,
            "food_supply" : 0,
            "wealth" : 0,
            "opinion_of" : [

            ]
        },
        {
            "id" : "wasteland_scavengers",
            "name" : "The Wasteland Scavengers",
            "desc" : "Autonomous bands or individuals who make their living raiding the ruins of the old-world for gear and provisions.",
            "values" : 656,
            "goal" : 8,
            "job1" : 7,
            "job2" : 9,
            "likes_u" : 0,
            "respects_u" : 0,
            "known_by_u" : false,
            "strength" : 0,
            "sneak" : 0,
            "crime" : -1,
            "cult" : 0,
            "good" : 0,
            "mapx" : 99,
            "mapy" : 47,
            "size" : 100,
            "power" : 100,
            "combat_ability" : 100,
            "food_supply" : 172800,
            "wealth" : 25000000,
            "opinion_of" : [

            ]
        },
        {
            "id" : "tacoma_commune",
            "name" : "The Tacoma Commune",
            "desc" : "An outpost started by the Free Merchants to provide a source of food and raw materials.",
            "values" : 2304,
            "goal" : 10,
            "job1" : 5,
            "job2" : 13,
            "likes_u" : 30,
            "respects_u" : 30,
            "known_by_u" : false,
            "strength" : 0,
            "sneak" : 0,
            "crime" : -1,
            "cult" : 0,
            "good" : 1,
            "mapx" : 96,
            "mapy" : 149,
            "size" : 100,
            "power" : 100,
            "combat_ability" : 85,
            "food_supply" : 115200,
            "wealth" : 10000000,
            "opinion_of" : [

            ]
        },
        {
            "id" : "old_guard",
            "name" : "The Old Guard",
            "desc" : "The remains of the federal government.  The extent of their strength is unknown but squads of patrolling soldiers have been seen under their banner.",
            "values" : 1160,
            "goal" : 1,
            "job1" : 10,
            "job2" : 1,
            "likes_u" : 15,
            "respects_u" : 15,
            "known_by_u" : false,
            "strength" : 1,
            "sneak" : 0,
            "crime" : -1,
            "cult" : -1,
            "good" : 1,
            "mapx" : 139,
            "mapy" : 130,
            "size" : 100,
            "power" : 100,
            "combat_ability" : 120,
            "food_supply" : 201600,
            "wealth" : 100000000,
            "opinion_of" : [

            ]
        },
        {
            "id" : "hells_raiders",
            "name" : "Hell's Raiders",
            "desc" : "The largest gang of hooligans and bandits that preys upon other survivors.  Even if you have no gear, there is always a need for slaves and fresh meat.",
            "values" : 1028,
            "goal" : 11,
            "job1" : 11,
            "job2" : 14,
            "likes_u" : -25,
            "respects_u" : -25,
            "known_by_u" : false,
            "strength" : 1,
            "sneak" : 0,
            "crime" : 1,
            "cult" : -1,
            "good" : -1,
            "mapx" : 100,
            "mapy" : 90,
            "size" : 100,
            "power" : 100,
            "combat_ability" : 100,
            "food_supply" : 230400,
            "wealth" : 45000000,
            "opinion_of" : [

            ]
        },
        {
            "id" : "free_merchants",
            "name" : "The Free Merchants",
            "desc" : "A conglomeration of entrepreneurs and businessmen that stand together to hammer-out an existence through trade and industry.",
            "values" : 34,
            "goal" : 10,
            "job1" : 12,
            "job2" : 13,
            "likes_u" : 30,
            "respects_u" : 30,
            "known_by_u" : false,
            "strength" : 0,
            "sneak" : 0,
            "crime" : -1,
            "cult" : 0,
            "good" : 1,
            "mapx" : 50,
            "mapy" : 24,
            "size" : 100,
            "power" : 100,
            "combat_ability" : 85,
            "food_supply" : 115200,
            "wealth" : 75000000,
            "opinion_of" : [

            ]
        }
    ]

}

You might get some debug messages while near the Refugee Center but it should at least run.

etmoonshade commented 8 years ago

Based on that, I suspect I was bringing the portion of the vault onto the screen that had some military NPCs in it. That would explain things, at least.

Either way, fix worked perfectly. Much appreciated.

I'm not sure of the proper etiquette on it, so I'm going to leave this open for someone in charge to close if it should be closed before the actual bug is fixed.