Zombie crash at some states

Game development with Board Game Arena Studio
Post Reply
User avatar
ExtraPaul
Posts: 10
Joined: 08 May 2020, 17:19

Zombie crash at some states

Post by ExtraPaul »

I have programmed "zombiePass" in major states of my game Cacao.
But I some step of the game, a player quitting the game fires a crash :

Unexpected error: Propagating error from GS 1 (method: zombie): feException: More than one possible action at this state in /var/tournoi/release/tournoi-200730-1036-gs/www/game/module/table/gamestate.game.php:333
Folowed by this messace, twice :
Unexpected error: Can't manage zombie player in this game state (5)

I have coded a big trace in zombieTurn function :

Code: Select all

    function zombieTurn( $state, $active_player ) {
		self::dump('========================= zombieTurn : state = ',$state);
		self::dump('========================= zombieTurn : active_player = ',$active_player);
    	$statename = $state['name'];
I don't find these traces in my BGA request & SQL logs.
Last lines are :

11/08 20:03:52 [info] [M] [2325352/ExtraPaul0] /1/cacao/cacao/wakeupPlayers.html?table=178499&testuser=2325352&dojo.preventCache=15971690341611
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] 0.23293495178223 SELECT global_id, global_value FROM global WHERE 1 1
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] setTable1
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] 0.097036361694336 SELECT global_id, global_value FROM global WHERE 1 1
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] 0.14305114746094 SELECT player_id, player_remaining_reflexion_time,
UNIX_TIMESTAMP( player_start_reflexion_time ) start_reflexion_time, UNIX_TIMESTAMP( NOW() ) now_time
FROM player 1
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] 0.082969665527344 SELECT player_id, player_is_multiactive FROM player LOCK IN SHARE MODE 1
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] 0.11110305786133 SELECT * FROM action1
11/08 20:03:52 [info] [T178499] [2325352/ExtraPaul0] DB rollback: action cancelled1
11/08 20:03:52 [error] [T178499] [2325352/ExtraPaul0] Unexpected exception: Can't manage zombie player in this game state (5)#
#0 /var/tournoi/release/tournoi-200730-1036-gs/www/include/APP_GameAction.inc.php(223): Table->checkReturnState()#
#1 /var/tournoi/release/tournoi-200730-1036-gs/www/include/APP_GameAction.inc.php(216): APP_GameAction->ajaxResponseWithResult(NULL)#
#2 /var/tournoi/release/tournoi-200730-1036-gs/www/include/APP_GameAction.inc.php(171): APP_GameAction->ajaxResponse()#
#3 /var/tournoi/release/tournoi-200730-1036-gs/www/include/webActionCore.inc.php(135): APP_GameAction->wakeupPlayers()#
#4 /var/tournoi/release/tournoi-200730-1036-gs/www/index.php(230): launchWebAction('cacao', 'action_cacao', 'wakeupPlayers', false, false, NULL, true, false)#
#5 {main}h
http://1.studio.boardgamearena.com/1/ca ... 1690341611
11/08 20:03:52 [notice] [T178499] [2325352/ExtraPaul0] ER-100 302 d1 c0 e227 m0 I300 A0 V0 T0 /1/cacao/cacao/wakeupPlayers.html?table=178499&testuser=2325352&dojo.preventCache=1597169034161

This occurs :
  • when players can carry out jungle tiles action (the game is in "multipleactiveplayer");
  • when the leaving player must choose a jungle tile.
I don't understand how to manage this problem if it's occurs outside of my code ?!
User avatar
Lymon Flowers
Posts: 195
Joined: 01 April 2020, 21:14

Re: Zombie crash at some states

Post by Lymon Flowers »

I think that in your code you call nextState() without a name, so the state engine is confused.

Regarding the lack of logs, I suppose that as there is an exception, no SQL commit is done and everything is rollbacked to previous state.
User avatar
hersh
Posts: 76
Joined: 12 December 2013, 23:49

Re: Zombie crash at some states

Post by hersh »

You can mimic zombie in studio that’s probably the easiest way to troubleshoot.

Run a game in real time on studio and let it time out. Then play as the other players to check if all transitions work.
User avatar
Marcuda
Posts: 25
Joined: 21 September 2015, 00:36

Re: Zombie crash at some states

Post by Marcuda »

I agree with bdrieu and hersh. Check your state machine and try quitting in a studio game. My marcuda1 user has 0 reputation from testing zombie states :)

The logs look like its already in process of rolling back. I would expect your messages to be higher up. I find the logs difficult to use because normal moves generate so many lines. I took to doing things like

Code: Select all

self::dump('===============================================');
self::dump('===============================================');
self::dump("========" . $thing_i_want_to_see . "========");
self::dump('===============================================');
self::dump('===============================================');
That makes it easier to spot amongst the mess of logs. Also try setting the number of lines to 1000 (default 100) to make sure it doesn't get pushed out by the rollback or other things.
User avatar
ExtraPaul
Posts: 10
Joined: 08 May 2020, 17:19

Re: Zombie crash at some states

Post by ExtraPaul »

Thank you for your reactions.
  • All nextState contain state name.
  • My tests are made in Studio.
I continue to search : some reponses give me some ways to explore...
Post Reply

Return to “Developers”