Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when a downed alien ship falls, game crash #1486

Open
kayort opened this issue Jul 16, 2024 · 6 comments
Open

when a downed alien ship falls, game crash #1486

kayort opened this issue Jul 16, 2024 · 6 comments
Labels
Agent ID Error A label for tracking all issues relating to this long standing Agents/Scientists related crash !BUG! HIGH PRIORITY Crashes the game! A serious issue stopping game progress or losing data. Needs a fix finding ASAP! Cityscape An issue relating to something in the City overview part of Apocalypse Code Query Something doesn't seem right in the code. It may not be a bug, but it probably needs fixing! Pathfinding An issue relating to pathfinding of units Vehicle ID Error A label for tracking all issues relating to this long standing Vehicle/UFO related crash Verified / Replicated This issue has been verified or replicated by a developer

Comments

@kayort
Copy link

kayort commented Jul 16, 2024

save.zip
log.txt

Windows 10 x64
OpenApoc-x64-20240331

W void __cdecl OpenApoc::GameState::validate(void) Validating GameState
W void __cdecl OpenApoc::GameState::validate(void) Validated GameState
W void __cdecl OpenApoc::Scenery::collapse(class OpenApoc::GameState &) Scenery at {100,76,3} type CITYTILE_CITYMAP_87 now falling
W void __cdecl OpenApoc::Scenery::collapse(class OpenApoc::GameState &) Scenery at {101,76,4} type CITYTILE_CITYMAP_88 now falling
W void __cdecl OpenApoc::Scenery::collapse(class OpenApoc::GameState &) Scenery at {102,76,3} type CITYTILE_CITYMAP_87 now falling
W void __cdecl OpenApoc::Scenery::collapse(class OpenApoc::GameState &) Scenery at {98,76,3} type CITYTILE_CITYMAP_87 now falling
W void __cdecl OpenApoc::Scenery::collapse(class OpenApoc::GameState &) Scenery at {99,76,4} type CITYTILE_CITYMAP_88 now falling
W void __cdecl OpenApoc::Scenery::collapse(class OpenApoc::GameState &) Scenery at {103,76,3} type CITYTILE_CITYMAP_73 now falling
E void __cdecl OpenApoc::VehicleMission::start(class OpenApoc::GameState &,class OpenApoc::Vehicle &) Restarting self destruct?

To Reproduce
load save, wait a few seconds

@JonnyH
Copy link
Collaborator

JonnyH commented Jul 18, 2024

Thanks for the report!

There seem to be 2 issues I noticed running this save:

There's the printed error when VEHICLE_2076 (the alien transporter) hits the ground - I suspect it's related to the "sliding" mechanic trying to find a open spot but not sure at this point.

But then skipping past this error, when "Valkyrie Interceptor 1" gets hit a few seconds later it is destroyed, then there's an issue with how it kills the agents that are aboard:

Vehicle.cpp:1880

	// Dying will remove agent from current agents list
	for (auto agent : currentAgents)
	{
		agent->die(state, true);
	}

is invalid as Agent::die erases it from the Vehicle::currentAgents container, invalidating the iterator.

@FilmBoy84 FilmBoy84 added !BUG! HIGH PRIORITY Crashes the game! A serious issue stopping game progress or losing data. Needs a fix finding ASAP! Code Query Something doesn't seem right in the code. It may not be a bug, but it probably needs fixing! Verified / Replicated This issue has been verified or replicated by a developer Pathfinding An issue relating to pathfinding of units Cityscape An issue relating to something in the City overview part of Apocalypse Agent ID Error A label for tracking all issues relating to this long standing Agents/Scientists related crash Vehicle ID Error A label for tracking all issues relating to this long standing Vehicle/UFO related crash labels Jul 24, 2024
@kgd192
Copy link
Contributor

kgd192 commented Sep 5, 2024

But then skipping past this error, when "Valkyrie Interceptor 1" gets hit a few seconds later it is destroyed, then there's an issue with how it kills the agents that are aboard:

Vehicle.cpp:1880

	// Dying will remove agent from current agents list
	for (auto agent : currentAgents)
	{
		agent->die(state, true);
	}

is invalid as Agent::die erases it from the Vehicle::currentAgents container, invalidating the iterator.

The CTD has been solved by commit 1d35e9c now it is coming up with another Agend ID error, will look into that and the Restarting self destruct in the following days

@FilmBoy84
Copy link
Collaborator

Thanks for confirming fixed 🍻

Closing

@FilmBoy84
Copy link
Collaborator

Although, i cannot find the PR for this commit?
Can you submit for review when ready please?

@FilmBoy84 FilmBoy84 reopened this Sep 7, 2024
@kayort kayort closed this as completed Sep 7, 2024
@kgd192
Copy link
Contributor

kgd192 commented Sep 7, 2024

@FilmBoy84 Yeah i didnt put in the PR yet due to the outstanding fixes at least the Agent ID. Do you reckon we should split the rest into a different issue?

@FilmBoy84
Copy link
Collaborator

Could split them, yes

Would make review quicker and get the fix for the above merged promptly

But no worries if you would prefer to do as one

@FilmBoy84 FilmBoy84 reopened this Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agent ID Error A label for tracking all issues relating to this long standing Agents/Scientists related crash !BUG! HIGH PRIORITY Crashes the game! A serious issue stopping game progress or losing data. Needs a fix finding ASAP! Cityscape An issue relating to something in the City overview part of Apocalypse Code Query Something doesn't seem right in the code. It may not be a bug, but it probably needs fixing! Pathfinding An issue relating to pathfinding of units Vehicle ID Error A label for tracking all issues relating to this long standing Vehicle/UFO related crash Verified / Replicated This issue has been verified or replicated by a developer
Projects
None yet
Development

No branches or pull requests

4 participants