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

Crash while drawing walking soldier #1668

Open
Spikeone opened this issue May 26, 2024 · 5 comments · May be fixed by #1706
Open

Crash while drawing walking soldier #1668

Spikeone opened this issue May 26, 2024 · 5 comments · May be fixed by #1706
Labels

Comments

@Spikeone
Copy link
Member

The game (and replay) crashes:
grafik

grafik

Although the replay seems to end at GF 469209, the replay crashes if you observe that spot early.
If you do not look at that spot (so just start the replay, jump to end, continue with P) the game doesn't crash. As soon as you jump to that spot the game will crash.

Version: 20240409

2024-05-25_19-40-22.zip

@Flamefire
Copy link
Member

I investigated this a bit and it is actually the drawing code that crashes the game. Investigating this is complicated by the length of the replay such that I'm checking how to save a partial replay, i.e. jump to a GF in a replay then save the remaining replay.

@Spikeone

Although the replay seems to end at GF 469209, the replay crashes if you observe that spot early.

What exactly do you mean by that? The replay ends at this GF because the game crashed. Do you have any earlier GF where the game crashes if you observe the spot? With jumping it seems to be tricky as the crashing GF might not be drawn (draw during jump happenings only every 100 GFs or so)

@Spikeone
Copy link
Member Author

Spikeone commented Jun 18, 2024

@Flamefire

What exactly do you mean by that? The replay ends at this GF because the game crashed. Do you have any earlier GF where the game crashes if you observe the spot? With jumping it seems to be tricky as the crashing GF might not be drawn (draw during jump happenings only every 100 GFs or so)

Well, that meant if you observe the spot, the game crashes before the game actually crashed when playing. Which fits your description, that it's related to drawing. The earliest crash I can reproduce is at GF 469191, thats when Player 2 loses his watchtower at 108:70

But when playing the replay up to 469200, then jumping to the spot, the game crashes as well.
When playing the replay up to 469000, then jumpting to the spot, the game doesn't crash. But continuing then the player loses the watchtower at GF 469191.
When playing the replay to the end, keeping the white HQ centered, continue playing to 470011, jumping to that spot, the game crashes as well.

Hope this does answer your initial question. So you should be able to jump to GF 469100, save, continue and it should crash some GFs after.

@Flamefire Flamefire changed the title Crash (probably in pathfinding) Crash while drawing walking soldier Jun 27, 2024
@Flamefire
Copy link
Member

Uff, that is hard to reproduce in a way it allows debugging: If I save at 469100 and load that savegame it doesn't crash
And jumping to the crash takes a bit of time.

I was already thinking about adding a feature to save a replay at the current point, i.e. jump halfway through, save that as a new replay which can be loaded and played as-if the first replay was continued at that point.

@Spikeone
Copy link
Member Author

@Flamefire in Replay mode I jumped to 469190, saved the game, loaded the game, jumped to the spot and it crashed. So the replay now should crash as soon as you observe the spot and hit play.

2024-07-13_11-22-43.zip

@Flamefire
Copy link
Member

Thanks. I found the reason:

  • One soldier was waiting for another soldier when the building was captured.
  • This destroyed a (short) road over water
  • That road was the only way that other soldier could come to the common fight spot
  • The fight gets aborted but the waiting soldier doesn't do anything and would be standing there forever
  • Drawing expects the soldier to be walking in this state but as it never started walking it crashes when trying to find the right animation and intermediate spot to draw at (i.e. between 2 map points)

Flamefire added a commit to Flamefire/s25client that referenced this issue Oct 13, 2024
Create 2 tests for free fights aborted by either the attacker or defender.
This reproduces issue Return-To-The-Roots#1668
Flamefire added a commit to Flamefire/s25client that referenced this issue Oct 13, 2024
Create 2 tests for free fights aborted by either the attacker or defender.
This reproduces issue Return-To-The-Roots#1668
Flamefire added a commit to Flamefire/s25client that referenced this issue Oct 13, 2024
Create 2 tests for free fights aborted by either the attacker or defender.
This reproduces issue Return-To-The-Roots#1668
Flamefire added a commit to Flamefire/s25client that referenced this issue Oct 16, 2024
Create 2 tests for free fights aborted by either the attacker or defender.
This reproduces issue Return-To-The-Roots#1668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants