Replays of tutorial or campaign maps will crash the game

Bug #647522 reported by Hans Joachim Desserud
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Play a game (either the tutorial or one of the campaign maps) for a while.
2. Quit the map.
3. From the main menu, go to replays and scroll down to the latest one (the one you just played).
4. Click OK to load the replay.

The game will crash with a segmentation fault. I suspect the reason it crashes is the dialogs that appear in these maps requiring interaction, though this is just a guess.
This problem does not seem to affect replays of regular maps.

Widelands bzr rev 5538 on Ubuntu 10.04

Tags: crash replay
Revision history for this message
SirVer (sirver) wrote :

indeed that is the case. This is stated in the Lua documentation for modal message boxes and is quite hard to fix.

Nasenbaer (nasenbaer)
Changed in widelands:
status: New → Confirmed
milestone: none → build17-rc1
Revision history for this message
SirVer (sirver) wrote :

Frankly now, who cares for this bug? At this point in time it has not once be useful to have a replay for debugging of a scenario. Watching a replay of someone playing a scenario for fun seems also quite unlikely. I for one would set this to Won't fix and be done with it.

Setting to incomplete for now for further discussion.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I have thought a bit about this since I filed it, and there might be an alternative solution to this.

So, obviously the problem here is that campaign replays triggers a crash. The ideal solution would be to fix these replays, but this is complicated and will likely not happen. Therefore we need an alternative approach; simply don't create a replay if the game in question is a campaign map (read:contains scripted story/dialogue). Note that this merely fix the symptom, not the underlying problem so I am not really 100% happy with it. However, it would prevent the players from loading a crashing replay since they would not be available or show up in the list of replays. And I think the important issue here is that it should not be possible to crash the game.

I am not sure how feasible this is, but it should be easier than fixing the message boxes. From what I gather, the replay is intially created at the same time as the map loads, so if it is possible to see whether the map utilize scripted dialogue at this point it should be fairly straight-forward.

Revision history for this message
SirVer (sirver) wrote : Re: [Bug 647522] Re: Replays of tutorial or campaign maps will crash the game

The only thing that makes problems are the modal message boxes (those
that stop the game). They are the only thing that makes trouble in
replays. Another simple solution would be to just not show them in a
replay and basically ignore them. This might be easy to implement - I do
not know.

Alright, you have me convinced. Having crashing replays in the users
reach is not a good idea. Not saving them is also not ideal. So fixing
it is.

  status triaged

Changed in widelands:
status: Incomplete → Triaged
Revision history for this message
Gabriel Margiani (gamag) wrote :

If someone is viewing a replay of a tutorial or campaign, he may
want to know the story, or why the player is doing something.
So I think it would be nice to wait viewer the user closes a window
and then continue the replay.
But that makes things more difficult...

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Gabriel: On the other hand, I mainly watch replays to see what the different players did and how they dealt with different situations. Furthermore I often speed up the replays to get to the interesting parts. Having parts of the dialog to skip through would mainly seem like interruptions.

That said, I don't necessarily disagree with you, but I think it creates some quite severe issues. I don't really have any data to back up whether "my" way of viewing replays is the most widespread. :p

However, I think the easier way might be to focus on the gameplay and what happened in the game in the replay, and if players want to experience the story-line they should play through the map themselves. Though it probably depends on what we consider the main use case for our replays.

Revision history for this message
SirVer (sirver) wrote :

Would you really watch replays of other players playing a scenario? I
enjoy watching network games because it is interesting to see strategies
and solutions to problems unfolding. But scenarios?

Revision history for this message
Gabriel Margiani (gamag) wrote :

Maybe somebody who has problems playing a campaign
would use a replay as help or solution. (then he would need the story).
But if somebody can't play the tutorials without help of
a replay he will never learn to play widelands.
So, I never watched a replay of a scenario and I know
nobody who does.

Don't show the windows or don't show them as modal ones
would be a solution ...

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

>Would you really watch replays of other players playing a scenario?

To be fair, I probably wouldn't. And even if I would, someone else needed to actually provide them, which seems like too much hassle for little gain.

This is partially the reason why I suggested not having replays for campaign maps above. The only thing we would need to do is somehow present it in an understandable way that only skirmish games will result in replays. I am not quite sure how other games handle this, but I would assume it is understandable that there are no replays of campaign maps.

Revision history for this message
Shevonar (shevonar) wrote :

Fixed in revision 6289. The message_box method is ignored in replays. Also the set_viewpoint_x and set_viewpoint_y methods are ignored, because otherwise the view in the replay will be moved for no reason. Now a replay of a scenario feels like a normal replay of a normal game. If you think this should be done in another way reopen this bug.

Changed in widelands:
status: Triaged → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.