I think that would fix the Symptome, not the cause.
The ui callbacks contain usually more logic than just sending player command. Some of that logic should run in a replay - in which case it should be pulled out into a different code path. These bugs are subtle though and will be hard to find.
Getting the exception thrown like it is now is at least an easy to diagnose bug and makes diagnosing wrong code easier.
> Am 02.12.2017 um 08:26 schrieb GunChleoc <email address hidden>:
>
> I think we have more of those, and the design is looking a bit fragile
> to me.
>
> How about having a can_act boolean in the Player object instead and
> check it at the PlayerCOmmand level?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1735090
>
> Title:
> Replays crash when a training site construction window is open
>
> Status in widelands:
> In Progress
>
> Bug description:
> To reproduce, unzip open the attached replay with Build 19. Wait for
> the yellow player to start building the arena and training camp and
> open their construction site windows.
>
> Fatal Exception: [b19/src/logic/replay_game_controller.cc:68] Trying
> to send a player command during replay
>
> The stack trace is masked by the emergency save, so we'll have to
> switch that off to investigate.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1735090/+subscriptions
I think that would fix the Symptome, not the cause.
The ui callbacks contain usually more logic than just sending player command. Some of that logic should run in a replay - in which case it should be pulled out into a different code path. These bugs are subtle though and will be hard to find.
Getting the exception thrown like it is now is at least an easy to diagnose bug and makes diagnosing wrong code easier.
> Am 02.12.2017 um 08:26 schrieb GunChleoc <email address hidden>: /bugs.launchpad .net/bugs/ 1735090 logic/replay_ game_controller .cc:68] Trying /bugs.launchpad .net/widelands/ +bug/1735090/ +subscriptions
>
> I think we have more of those, and the design is looking a bit fragile
> to me.
>
> How about having a can_act boolean in the Player object instead and
> check it at the PlayerCOmmand level?
>
> --
> You received this bug notification because you are a bug assignee.
> https:/
>
> Title:
> Replays crash when a training site construction window is open
>
> Status in widelands:
> In Progress
>
> Bug description:
> To reproduce, unzip open the attached replay with Build 19. Wait for
> the yellow player to start building the arena and training camp and
> open their construction site windows.
>
> Fatal Exception: [b19/src/
> to send a player command during replay
>
> The stack trace is masked by the emergency save, so we'll have to
> switch that off to investigate.
>
> To manage notifications about this bug go to:
> https:/