FIBS Board backgammon forum

Bots & other tech stuff => TourneyBot => Topic started by: MadMatt on March 24, 2006, 09:56:35 PM

Title: Caught The Bug That Was Causing Crashes
Post by: MadMatt on March 24, 2006, 09:56:35 PM
So, I thought I'd let you know that I caught the bug that was causing TourneyBot to drop and stop responding when a tourney was opened after examining the logs.

The issue was with people sending the command "Tourneys Created" after the opening of a tourney. Note the uppercase C. TourneyBot checked the registry of known tourney states and since there was no "Created" state (there is a "created" state, however) that caused the null pointer exception and TourneyBot dropped. This serious oversight of mine has now been fixed.

As you can see this is why it always happened when a TD opened a tourney - people would check Tourneys Created to get the number of the tourney and such, so the bot would drop. Now the only thing that still puzzles me a little is that when I was testing to find this bug TourneyBot's built-in autoreconnect feature would work well enough - after the drop the bot would come back on and work properly. However, according to the log, after every so many drops the bot would still come back online, but would not respond anymore to commands.

So there were no malicious attacks going on - it was a fairly simple bug. The reconnect issue could still be a problem, but only if another way is found to crash the bot in which case it will be easily found and fixed when I have the time.

It should be perfectly safe to use TourneyBot again.

Cheers,

M.
Title: Caught The Bug That Was Causing Crashes
Post by: diane on March 24, 2006, 10:12:48 PM
That is excellent news - thanks for your time once again.  Lets hope bago resumes on a regular basis and there are more tournaments once again - players were missing them.  It does seem odd this took so long to show up - we never saw these crashes in the early days - I wonder if one of the updates caused it maybe?
Whatever - it is good to have it back  :D
Title: Caught The Bug That Was Causing Crashes
Post by: Tomawaky on March 24, 2006, 10:28:48 PM
:jump2:
Great. Good news.
And very thanks to you Matt for taking time.
I will be there for the first tuesday of april.  :cool:  
Title: Caught The Bug That Was Causing Crashes
Post by: MadMatt on March 25, 2006, 10:16:32 AM
Yesterday when I "fixed" the TourneyBot I also unintentionally broke it so that some versions of the "tourneys" command would still crash it. However, I've fixed that now as well. Let's hope it lasts this time.
Title: Caught The Bug That Was Causing Crashes
Post by: socksey on March 25, 2006, 12:21:59 PM
Great news!  Hope this works for everyone.  I ran a tourney last night with no problems.  I thought the command for seeing tourneys in progress was just "tourneys".  I've used that since the beginning.  

Hmmmmmm.......Just checked and no Tourneybot.

socksey



"Where there's a will, I want to be in it." - Anonymous
Title: Caught The Bug That Was Causing Crashes
Post by: lewscannon on March 27, 2006, 11:05:50 PM
Has anyone else noticed that socksey's tournament never crash when she is winning them? :P  
Title: Caught The Bug That Was Causing Crashes
Post by: socksey on March 28, 2006, 12:40:20 PM
giggle giggle



"You're just jealous because the voices only talk to me." - Anonymous
Title: Caught The Bug That Was Causing Crashes
Post by: diane on April 04, 2006, 09:13:47 PM
Hmm, the bot stopped responding again in BAGO tonight, during registration  :( Any more ideas?