Openapoc: No vehicle matching ID "VEHICLE_794" CTD

Created on 23 Nov 2017  ·  33Comments  ·  Source: OpenApoc/OpenApoc

From the Log following a CTD...

W 52740355833 bool __cdecl OpenApoc::Vehicle::popFinishedMissions(class OpenApoc::GameState &): No next vehicle mission, going idle
E 52741482678 class std::shared_ptr __cdecl OpenApoc::Vehicle::get(const class OpenApoc::GameState &,const class OpenApoc::UString &): No vehicle matching ID "VEHICLE_794"
0x00000001402F9D30 PHYSFS_writeSLE16+0x15f400
0x000000014020208A PHYSFS_writeSLE16+0x6775a
0x00000001401FFD3A PHYSFS_writeSLE16+0x6540a
0x00000001400A784C PHYSFS_swapULE64+0x6600c
0x000000013FFA3D32 PHYSFS_swapULE64+0xfffffffffff624f2
0x000000013FF7F210 PHYSFS_swapULE64+0xfffffffffff3d9d0
0x000000014017E015 PHYSFS_swapULE64+0x13c7d5
0x0000000077A159CD BaseThreadInitThunk+0xd
0x0000000077C4A561 RtlUserThreadStart+0x21

image

image

Most helpful comment

This error will persist in saves - so if the original cause of a bad StateRef has already happened, and you save, it'll embed that "badness" in the save, so it may not be surprising that reloading a "broken" save will cause the same error.

The error message above is shown when the game tries to use that "broken" object and realises something's wrong, not an error in itself. The failure may have happened some time ago, just the broken object not yet used.

So if you're testing this with the same save and haven't created a new game since the fix it likely doesn't tell us much.

All 33 comments

Just a heads up
This CTD has now bugged two games.
Both on the "Easy Map"
Both with vehicle ID 794~
Clicking "Limp Along" takes you straight back to desktop.

That backtrace looks incorrect, like it can't find the debug symbols (so it's just using the closest symbol it can find, which happens to be physfs).

If you're using the appveyor builds - can you extract the 'debug' package over the top? So the .pdb files are in the same directory as the .exe?

And "try to limp along" simply won't work for some errors (like this), as the error is effectively saying "We're just about to crash, and here is why:", so trying to continue just crashes :)

As a longer term goal, it may be possible to dump the current 'save' state on error, it might give us useful info about what's wrong... But that may fall into exactly the same problem (if the internal data can't be trusted, we may just crash trying to write the save)

@JonnyH No problem, will aim to get on testing with the debug package over the top when i get back from work on Monday...

Currently up to my eyeballs in young Gymnasts :D

how young? ) hope its legal XD

@makus82 sadly, this weekend and last all but the last few were too young. But uni events when i do them are always fun - hot women, all legal 💃

As to the CTD, please find log, save, etc. attached. Just start time and the game will crash...

I've done as @JonnyH said and put the debug install over things before generating these...

openapoc_log.txt

save_Easy 1.zip

And a different variation on the same save file...

image

openapoc_log.txt

Again in 0.1-117
Even doing a clean install (wipe all existing apoc data except saves, extract from zip again)

image

I can provide some details.
Steps to reproduce:

  1. start game on medium (maybe any) difficulty
  2. sell ground (maybe any) vehicle
  3. save game
  4. load game
  5. unpause game

@OverDrone

Ah, yes, in all games where i get this CTD i sell my wolfhound APC and Stormdog to get a few extra thousand in cash for vehicles i never use.

Ill do a test on a game when i DONT sell any vehicles and see if this error occurs.
Currently any game ive sold any vehicle it crashes...

Hmmmm, just got this crash on a game where ive sold NO ground units... Seems remarkably similar...

image
image
image

Same problem here.... i can't selling veicle and debug option going me to desktop...
any idea x solving?

The code of the transaction screen looks like a mess. Hard to fix this issue without refactoring.

Still present on 0.1-167 ( OpenApoc-x64-v0.1-167-gf31d8b8b ) which is a little annoying... The vehicle dieing bug is reported sorted. Wonder why this bug is refusing to be crushed?

image
image
image

Did you load a game or started a new one?
Try to test on new game.

Just started a fresh game on a fresh install to check. Will confirm if still a problem.

OK, game crashed apparently due to issue #255 before i can confirm this issue is fixed.

That said, i was able to sell Stormdog and Wolfhound APC and no 794 CTD yet but also haven't got through to the end of the first day without game breaking :(

Please see most recent comment on #255 for the log and screens of the crash that ended my new game

@redv The vehicle crash seems fixed, however, the problem seems to have extended to Agents too, this bug still occurs...

image
image

Is it crash when quit game?

It happens when quitting the game OR entering the Base screen (case above was quitting)

@redv Sadly i've just had the Agent 45 error again on a fresh, clean install, and new game of OpenApoc. Occured on quitting the game as follows...

Game version is latest build (0.1-172 at time of writing)

image
image
image

Clicking "Limp Along" produces this variant...
image
image

When application destruct the GameState class, firstly destroys the agents list, secondly bases, facilities, labs etc. The Lab class contains own agents list (scientists), but agents classes already destroyed. Thus the bug happens.
The PR #337 fix this bug.
As workaround possible to remove scientists form the lab before quitting the game.

@redv
Sadly still getting a variant of this issue in version OpenApoc-debug-x64-v0.1-169-g921de2a3

This time i am moving agents (on foot through the people tubes) to an alien incident in the slums. I'm also preparing to raid a CoS temple, the error occurs with the building and agents selected.

image
image
image

Attach please the last save before CTD.

@redv here you go. To repeat the error, send the Valkyrie to the CoS temple just NE of the base and send the two android agents off to the slums incident that appears after a minute or two ON FOOT.

Error occurs when the Valkyrie arrives at CoS temple and you select the agents within to raid the building.

save_Medium Test 1.zip

Savegame was a new one created today on a clean install of OpenApoc. The game is in its first few minutes of play...

The bug happens when the game tries to load resources for the battlemap. The map contains several blocks which selects randomly from a set. Looks like one of them leads to bug during resource loading.
I.e. if you repeat the same actions several times, sooner or later the CoS battlemap will be loaded sucessfully. This map will be without the bad block.

  1. Bug. Need to figure out why the game cannot load some map blocks.

The AGENT_35 is the quantum phisist Peter Jones.
When the bug of map loading happens, the game during crash calls destructors. Destructros of agents runs before destructors of labs. The destructor of lab tries to free agents, but agents disappeared already from memory. Thus second bug happens in the StateRef class which contains agent in the Lab class.

  1. Bug. I think the StateRef class is a big architectural mistake. Better to use regular C-pointers. I think the "observer" pattern can resolve most issues. At least I will try to find a good solution.

Thanks redv ; let me know when you have an idea of what solution may work

As to maps, could this be related to issue #284 ? I notice quite a number of CoS maps and a few others seem to generate errors when items are dropped by killed/stunned/panic units.

Another crash on 0.1-200 , this time when opening the agent screen... Having already sold the Stormdog.
image
image
image

Selecting "Limp Along" does this

image
image

Equipment this time :(
Create, please, a new issue. Because this one is too deep in the queue of issues.

Confirming this is still an issue, selling any vehicle causes this to pop up when anything associated with it gets called.

I 417929443733 void __cdeclanonymous-namespace'::SDLRawBackend::setTrack(class std::shared_ptr): Setting track to 0,000,019,B87,324,D20
I 422315537514 void __cdecl anonymous-namespace'::SDLRawBackend::playSample(class std::shared_ptr<class OpenApoc::Sample>,float): Placed sound 0,000,019,BFD,B86,6B0 on queue I 422432359150 void __cdecl OpenApoc::VEquipScreen::setSelectedVehicle(class std::shared_ptr<class OpenApoc::Vehicle>): Selecting vehicle "Valkyrie Interceptor 90" I 422432639858 void __cdecl OpenApoc::VEquipScreen::setSelectedVehicle(class std::shared_ptr<class OpenApoc::Vehicle>): Selecting vehicle "Valkyrie Interceptor 90" I 424865493463 void __cdeclanonymous-namespace'::SDLRawBackend::playSample(class std::shared_ptr,float): Placed sound 0,000,019,BFD,B86,6B0 on queue
I 427732686087 class std::shared_ptr __cdecl OpenApoc::Vehicle::addEquipment(class OpenApoc::GameState &,struct glm::tvec2,class OpenApoc::StateRef): Equipped "Valkyrie Interceptor 90" with general equipment "Passenger Module"
I 430232009610 void __cdecl anonymous-namespace'::SDLRawBackend::playSample(class std::shared_ptr<class OpenApoc::Sample>,float): Placed sound 0,000,019,BFD,B86,6B0 on queue I 432298883338 void __cdeclanonymous-namespace'::SDLRawBackend::playSample(class std::shared_ptr,float): Placed sound 0,000,019,BFD,B86,6B0 on queue
W 432416803536 void __cdecl OpenApoc::StateRef::resolve(void) const: AEquipmentType object has invalid prefix - expected "AEQUIPMENTTYPE_" ID "VEHICLE_794"
E 432419555645 class std::shared_ptr __cdecl OpenApoc::AEquipmentType::get(const class OpenApoc::GameState &,const class OpenApoc::UString &): No aequipement type matching ID "VEHICLE_794"
0x00007FF712CA8C70 PHYSFS_writeSLE16+0x917d0
0x00007FF712AF1F6C PHYSFS_swapULE64+0xef91c
0x00007FF712B5D944 PHYSFS_swapULE64+0x15b2f4
0x00007FF712B5FA0A PHYSFS_swapULE64+0x15d3ba
0x00007FF712B63967 PHYSFS_swapULE64+0x161317
0x00007FF712B61F0E PHYSFS_swapULE64+0x15f8be
0x00007FF712B56B98 PHYSFS_swapULE64+0x154548
0x00007FF712A79F49 PHYSFS_swapULE64+0x778f9
0x00007FF712A233D8 PHYSFS_swapULE64+0x20d88
0x00007FF7129FF6A0 PHYSFS_swapULE64+0xffffffffffffd050
0x00007FF712BFAE25 PHYSFS_swapULE64+0x1f87d5
0x00007FFF402C3034 BaseThreadInitThunk+0x14
0x00007FFF41181431 `RtlUserThreadStart+0x21``

Several days of extensive play-testing, and I've not seen this bug since
Closing issue.

Many thanks Jarskih, RedV and JonnyH

Bug still active July 2019. Restore saved game and then continue. Immediate error. Close the error window and it repeats.
Image1
save_Shot down UFO.zip

This error will persist in saves - so if the original cause of a bad StateRef has already happened, and you save, it'll embed that "badness" in the save, so it may not be surprising that reloading a "broken" save will cause the same error.

The error message above is shown when the game tries to use that "broken" object and realises something's wrong, not an error in itself. The failure may have happened some time ago, just the broken object not yet used.

So if you're testing this with the same save and haven't created a new game since the fix it likely doesn't tell us much.

Yes, the previous 3 saves also bug out. I can go back to earlier saves if it will help.

Was this page helpful?
0 / 5 - 0 ratings