Openapoc: [Cityscape] No Vehicle object matching ID "VEHICLE_19"

Created on 4 Aug 2020  ·  10Comments  ·  Source: OpenApoc/OpenApoc

image

Anytime I load a save in the cityscape, vehicle_19 crashes the party - so to speak.

I mentioned it in another thread but it keeps re-occuring every time so here's a fresh one. New save/log on the latest build.

VehicleID-CTD.zip

!BUG! HIGH PRIORITY Verified / Replicated

Most helpful comment

gdb backtrace

Thread 1 "OpenApoc" received signal SIGSEGV, Segmentation fault.
OpenApoc::GameState::updateEndOfSecond (this=0x18250e0) at /home/atrosha/OpenApoc/game/state/gamestate.cpp:1063
1063                for (auto &e : v->equipment)
(gdb) bt
#0  OpenApoc::GameState::updateEndOfSecond (this=0x18250e0)
    at /home/atrosha/OpenApoc/game/state/gamestate.cpp:1063
#1  0x000000000080ebf8 in OpenApoc::GameState::update (this=0x18250e0, ticks=6)
    at /home/atrosha/OpenApoc/game/state/gamestate.cpp:1029
#2  0x000000000080ec5f in OpenApoc::GameState::update (this=<optimized out>, 
    ticks=ticks@entry=6) at /home/atrosha/OpenApoc/game/state/gamestate.cpp:987
#3  0x00000000005ac31f in OpenApoc::CityView::update (this=0x281b300)
    at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#4  0x000000000049655e in OpenApoc::Framework::run (this=this@entry=0xca2270, 
    initialStage=std::shared_ptr<OpenApoc::Stage> (use count 1, weak count 1) = {...}) at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#5  0x0000000000469f03 in main (argc=-9440, argv=0x7fffffffde58)
    at /usr/include/c++/10/bits/shared_ptr_base.h:759

All 10 comments

gdb backtrace

Thread 1 "OpenApoc" received signal SIGSEGV, Segmentation fault.
OpenApoc::GameState::updateEndOfSecond (this=0x18250e0) at /home/atrosha/OpenApoc/game/state/gamestate.cpp:1063
1063                for (auto &e : v->equipment)
(gdb) bt
#0  OpenApoc::GameState::updateEndOfSecond (this=0x18250e0)
    at /home/atrosha/OpenApoc/game/state/gamestate.cpp:1063
#1  0x000000000080ebf8 in OpenApoc::GameState::update (this=0x18250e0, ticks=6)
    at /home/atrosha/OpenApoc/game/state/gamestate.cpp:1029
#2  0x000000000080ec5f in OpenApoc::GameState::update (this=<optimized out>, 
    ticks=ticks@entry=6) at /home/atrosha/OpenApoc/game/state/gamestate.cpp:987
#3  0x00000000005ac31f in OpenApoc::CityView::update (this=0x281b300)
    at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#4  0x000000000049655e in OpenApoc::Framework::run (this=this@entry=0xca2270, 
    initialStage=std::shared_ptr<OpenApoc::Stage> (use count 1, weak count 1) = {...}) at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#5  0x0000000000469f03 in main (argc=-9440, argv=0x7fffffffde58)
    at /usr/include/c++/10/bits/shared_ptr_base.h:759

Here's one at the ending of a tactical mission, same deal.

CTD VehicleID Tact.zip

full gdb log

gdb_log.txt

Hi, I'm getting this Vehicle 19 CTD as well.

Attached is my save game. I love this mod!

save_Medium Start.zip

Added in log file. Its awesome you responded!

log.txt

Thx @99Scienctist for report =] log file also would be good

Hello, im getting what seems to be the same error message as Beorn.

I tried to replicate the error by saving and loading a new file in the cityscape but i couldn't do it(i barely spent any time doing it so i dont know if it counts as even trying).

The save that im sending is the one where i got the error, passing time should allow you to trigger the error.

The save is a fresh campaign where i sold my vehicles' engines and bought but never deployed them(also the error appears before superdynamics gets them to my base), hired more agents, built a living quarters facility, started some research, sold the starting ground vehicles and their gear except the APC's cargo module, bought 4 hoverbikes and a phoenix hovercar, sold the hoverbikes' 40mm cannons plus their ammo and bought some bolter lasers to replace them and bought more agent armor and varied agent weapons.

I am entirely new to github so if you need another file tell me.

save_I still dont understand research.zip

Please see also Issue #940

This issue is definitely related to the sale of the starting vehicles

The destructor is not being triggered correctly and the game believes that they still exist

It is possible this is also linked to the issues we've seen with fired agents/scientists also not being correctly removed (although in the case of those there are other things to consider regarding workforce and return to the hire/fire screen)

Vehicles sold should add +1 to the manufacturer stock in the economy (to allow them to be bought back later in the week, if no other organisation does it first) but otherwise be removed from the game

This issue is definitely related to the sale of the starting vehicles

The destructor is not being triggered correctly and the game believes that they still exist

It is possible this is also linked to the issues we've seen with fired agents/scientists also not being correctly removed (although in the case of those there are other things to consider regarding workforce and return to the hire/fire screen)

Vehicles sold should add +1 to the manufacturer stock in the economy (to allow them to be bought back later in the week, if no other organisation does it first) but otherwise be removed from the game

Not sure it is only with the starting vehicles.
Had a game where i had sold my vehicles and everything worked so i saved. worked fine after that aswell.

untill i did a save when i had bought some items.
When i entered the game again i got the error.
So think it can even happen when the transports should be removed.

where can i find the save and log on my comp? did a search in both game folder and my documents but couldnt find it
i can attach those if wanted

Edit: After more testing i belive it is only with your own vehicles. doesnt have to be your starter one though.
Only thing that is a bit strange is that sometimes it happens right after you sell and other times it happens after you have saved and loaded again.
Did a save and ran the game a bit after i had sold my vehicles and saved again later on a new save. when i loaded both saves got the error.

Love apoc so would love to help. keep up the good work

I can confirm that the the save game in original bug indeed contains a corrupted state: the base ("BUILDING_WAREHOUSE_TEN") references a non-existing vehicle (""VEHICLE_19") which most likely was a starting Stormdog (I always get stormdog named VEHICLE_19 when I start on Superhuman map). However after numerous attempts to reproproduce the issue (using the same map, base and various scenarios to sell/move/transfer/destroy a vehicle and reading a code I can not find a scenario which will allow game to arrive at his broken state. Might it have been fixed already, or do we have a recent cases of this bug?

I can, in theory, add some checks and avoid the crash by auto-fixing the game state, but this has a potential to mask the original issue if it still exists, even if I add some warnings. WDYT?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muton-commander picture muton-commander  ·  3Comments

FilmBoy84 picture FilmBoy84  ·  3Comments

makus82 picture makus82  ·  3Comments

FilmBoy84 picture FilmBoy84  ·  3Comments

emc2 picture emc2  ·  3Comments