It is currently 23 Aug 2025, 20:44
   
Text Size

Getting stuck "Waiting for opponent..." after exception

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Getting stuck "Waiting for opponent..." after exception

Postby hervebronnimann » 03 Feb 2015, 04:26

Here's a simple suggestion, I'd like to hear from others what they think. While testing a draft deck, I sometimes encounter a bug (NPE, CME, ...) that kills the app, and forces me to close and restart. The thread that gets killed by the exception is like this (I take from a recent stack trace):
Code: Select all
   at forge.game.GameAction.startGame(GameAction.java:1390)
   at forge.game.Match.startGame(Match.java:71)
   at forge.match.MatchUtil$2.run(MatchUtil.java:202)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:722)
Now I like very much the popup window that shows up with the bug report, but essentially the app is still dead: I cannot start a new game. It would be very simple to put a try/catch block around startGame, for instance, and the catch block could simply wait for the completion of the action on the popup window (if it is guaranteed that one is created upon exceptions) and simply close the game.

Now there are two things I am missing in order to test this. One: I closed the app before I did a thread dump, so I do not know which thread processes the bug report window, and where that code lives. (I'll find out eventually, when that happens again, but in case anyone of you knows...)

Two: concerning the best resolution... Would players in general appreciate being able to continue with their game after a crash? (It may be unfair, tho, to ignore the exception inside the game loop). Personally I think the best behavior would be to assume a draw, or simply give the option to restart round or quit (if in a draft), or whatever the normal behavior is at the end of the game. Perhaps introducing a new GameOutcome value for ENDS_WITH_ERROR. What do y'all think?
hervebronnimann
 
Posts: 20
Joined: 29 Nov 2014, 22:34
Has thanked: 1 time
Been thanked: 0 time

Return to Forge

Who is online

Users browsing this forum: No registered users and 12 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 12 guests

Login Form