endGame State Fails with Unknown Column player_real_rank_game_played

Game development with Board Game Arena Studio
Post Reply
Grunt_the_Clever
Posts: 24
Joined: 11 October 2020, 21:09

endGame State Fails with Unknown Column player_real_rank_game_played

Post by Grunt_the_Clever »

I am developing a game on BGA and when I call $this->gamestate->nextState( 'endGame' ); from my PHP code, I get this error:

26/11 01:25:49 [info] [T211881] [2337683/JimTomShepard1] DB rollback: action cancelled2
26/11 01:25:49 [error] [T211881] [2337683/JimTomShepard1] Unexpected exception: Error while processing SQL request (Localhost via UNIX socket): UPDATE l_player_rank
SET player_real_rank_game_played=player_real_rank_game_played+1
WHERE player_rank_player_id='2337682' AND
player_rank_game_id='4761'U
Unknown column 'player_real_rank_game_played' in 'field list'#
#0 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/table.game.php(2448): APP_DbObject->masterNodeRequest('gameResult', Array)#
#1 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/gamestate.game.php(460): Table->stGameEnd()#
#2 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/gamestate.game.php(356): Gamestate->jumpToState(99)#
#3 /var/tournoi/release/games/zenerosd/999999-9999/zenerosd.game.php(416): Gamestate->nextState('endGame')#
#4 /var/tournoi/release/games/zenerosd/999999-9999/zenerosd.game.php(780): zenerosd->endOfGame(2337682, true)#
#5 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/gamestate.game.php(625): zenerosd->argsFreeChoose()#
#6 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/gamestate.game.php(129): Gamestate->loadStateArgs()#
#7 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/gamestate.game.php(384): Gamestate->state()#
#8 /var/tournoi/release/tournoi-201125-1049-gs/www/game/module/table/gamestate.game.php(356): Gamestate->jumpToState(4)#
#9 /var/tournoi/release/games/zenerosd/999999-9999/zenerosd.game.php(550): Gamestate->nextState('moveMandatoryPi...')#
#10 /var/tournoi/release/games/zenerosd/999999-9999/zenerosd.action.php(56): zenerosd->moveMandatoryPiece('4', '5')#
#11 /var/tournoi/release/tournoi-201125-1049-gs/www/include/webActionCore.inc.php(189): action_zenerosd->moveMandatoryPiece()#
#12 /var/tournoi/release/tournoi-201125-1049-gs/www/index.php(242): launchWebAction('zenerosd', 'action_zenerosd', 'moveMandatoryPi...', false, false, NULL, true, false)#
#13 {main}h
http://1.studio.boardgamearena.com/1/ze ... 3503483562
26/11 01:25:49 [notice] [T211881] [2337683/JimTomShepard1] ER-100 550 d5 c0 e441 m0 I407 A0 V0 T0 /1/zenerosd/zenerosd/moveMandatoryPiece.html?x=4&y=5&table=211881&testuser=2337683&dojo.preventCache=16063503483562
26/11 01:25:49 [info] [M] [2337682/JimTomShepard0] /1/zenerosd/zenerosd/notificationHistory.html?table=211881&from=85&privateinc=1&history=1&testuser=2337682&dojo.preventCache=16063503485962



Which looks like BGA is trying to update a table but has an invalid column name? Can someone help if this is a BGA bug or because of an error on my end? I am calling the state change from an args* function, part of me wonders if this instability is from that? I am going to test calling it from a st* function and see if that makes a difference.
Grunt_the_Clever
Posts: 24
Joined: 11 October 2020, 21:09

Re: endGame State Fails with Unknown Column player_real_rank_game_played

Post by Grunt_the_Clever »

No, I can confirm this happens when I transition to the endGame state from a st* function as well.
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: endGame State Fails with Unknown Column player_real_rank_game_played

Post by Tisaac »

Grunt_the_Clever wrote: 26 November 2020, 01:57 No, I can confirm this happens when I transition to the endGame state from a st* function as well.
When you say "st* function", you mean in a "game" state right ? Because that would probably not work in a active state.
User avatar
Crazyboog
Posts: 28
Joined: 30 April 2020, 22:12

Re: endGame State Fails with Unknown Column player_real_rank_game_played

Post by Crazyboog »

Hi,

I had the same issue yesterday. When reaching the gameEnd state I got

Unexpected exception: Error while processing SQL request (Localhost via UNIX socket): UPDATE l_player_rank
SET player_real_rank_game_played=player_real_rank_game_played+1 ...

As the l_player_rank is not a table we have access to I did not know how to troubleshoot this issue.


I stopped the game (with Express stop) and today when I tested again, the issue did not reproduce at the end of the game and the game ended correctly. I did not change anything on my side so could it be linked to some kind of maintenance on BGA side that occurred on November 26th 2020?
Grunt_the_Clever
Posts: 24
Joined: 11 October 2020, 21:09

Re: endGame State Fails with Unknown Column player_real_rank_game_played

Post by Grunt_the_Clever »

Tisaac wrote: 26 November 2020, 10:23 When you say "st* function", you mean in a "game" state right ? Because that would probably not work in a active state.
I mean in an active state, the st* function being the "action" function called upon entering this particular active state.
Grunt_the_Clever
Posts: 24
Joined: 11 October 2020, 21:09

Re: endGame State Fails with Unknown Column player_real_rank_game_played

Post by Grunt_the_Clever »

Crazyboog wrote: 26 November 2020, 13:20 I stopped the game (with Express stop) and today when I tested again, the issue did not reproduce at the end of the game and the game ended correctly. I did not change anything on my side so could it be linked to some kind of maintenance on BGA side that occurred on November 26th 2020?
Same thing, I just tried this again today and now the game ends successfully. I tried this probably 20 times yesterday (Nov. 26th, 2020) and it failed in the same way each time, so I would assume your guess is correct, some maintenance was done, or an update which was broken and then fixed.
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: endGame State Fails with Unknown Column player_real_rank_game_played

Post by Een »

Yes, sorry about that, database was temporarily out of sync with the site version.
Post Reply

Return to “Developers”