Ticket #224 (new defect)

Opened 5 months ago

Last modified 3 weeks ago

MatchBot's !sub malfunction

Reported by: Maverick Assigned to: nobody
Priority: normal Component: Bots - TWD/TWL
Version: Latest version from repository Severity: major
Keywords: matchbot !sub substitute bug Cc:

Description

:Leitz:hm what kind of error?
(Leitz)> i subbed my self in for a player, this player came back and subbed myself for him again. but he was laggy, so i needed to sub myself in again. AFter this 3th sub between 2 the same players we had 9 in.
(Leitz)>he didn't get specced with the last sub
:Leitz:oh.. odd
:Leitz:I will check it out and fix it (if I can find the bug)
(Leitz)>i've seen it happen like 3 weeks ago also
(Leitz)>i can look up the game if you want me 2?
:Leitz:if you can, please
(Leitz)>ah twd is down for me, i will send it to you later
:Leitz:ok thanks

Will update if Leitz found the game.

Attachments

Change History

03/08/08 08:59:41 changed by milosh

The way he describes this is pretty cut and dry. Can't we test to verify that's what's really happening?

03/08/08 12:44:55 changed by Maverick

[Mar 08 17:51] Leitz: Game with 9 player error was on 2008-03-02 14:28:01 against Fear. http://twd.trenchwars.org/showgame/88968199

Well worth checking the code for but I doubt it's easy to find.

03/10/08 20:20:36 changed by milosh

Could you get a command log for that game, MMav?

03/12/08 00:33:01 changed by Maverick

uh yea, I will try to see what I can find.

04/14/08 21:59:05 changed by milosh

I read in to this a bit. It's not a consistent error. From what I can tell this instance was caused by a returned null value from BotAction's getPlayer() method. The bot only spectates a player if it finds that the player is in the arena. It tests this by making sure that getPlayer() does not return a null value; however, getPlayer() doesn't always return a value even if the player is in the arena.

public void reportSubstituted()
	{
		resetOutOfBorderTime();
		m_fnPlayerState = 2;

		//cancel lag checks
		if (lagRequestTask != null)
            m_botAction.cancelTask(lagRequestTask);

		m_fnSpecAt = m_statTracker.getStatistic(Statistics.DEATHS);
		m_statTracker.endNow();

		if (m_player != null)
		{
			m_logger.specAndSetFreq(m_fcPlayerName, m_team.getFrequency());
		};
	};

04/30/08 16:17:18 changed by milosh

  • component changed from Bots - Other to Bots - TWD/TWL.

07/31/08 05:16:13 changed by milosh

  • owner set to nobody.

Going for consistency.


Add/Change #224 (MatchBot's !sub malfunction)




Change Properties
Action