Loading...
 

PogamutUT2004


Exceptions generated when bots start at same or near same time

Don't know if this is an error from my side or just something that can't be avoided. What happens is I get following error:

Exception in thread "Thread-1" com.google.inject.ProvisionException: Guice provision errors:

This happens if I create two bots just after each other. If I wait around 1500 milli seconds this error wont show up. Though the error pops up it looks like everything runs fine afterword.

I'm just waiting the 1500 milli seconds before I'm starting each bot so the error wont show up but just wanted to give a head up as I don't know if it an error or working as intended?
Hi! This is definetly a bug. Thanks for reporting.

Please - can you post some piece of code where you're starting all bots? (Functional as well as buggy version.)
What class are you using to fire up the bot?

Thanks,
Jimmy
Its very simple to recreate. I start two thread (or more) after each other with the following in their run() method:

int serverPort = BotSetup.INSTANCE.getDummyServerPort();

UT2004BotModule myModule = new UT2004BotModule(DummyBot.class);
UT2004BotFactory factory = new UT2004BotFactory(myModule);

UT2004BotRunner botRunner = new UT2004BotRunner(factory, "DummyBot", "localhost", serverPort);
IAgent agent = botRunner.startAgent();

// wait until the bot finishes and close Pogamut platform
new WaitForAgentStateChange(agent.getState(), IAgentStateStopped.class).await();
Pogamut.getPlatform().close();


If I want it to run functional I just make 1500 miliseconds pass before starting the next thread. Found out with 1000 milli seconds it would still generate bug some times.
Wow - so it points more to Guice than Pogamut :-( ... you could probably use direct factory than Guice one. I will write details later (direct factory will
create you bot manually instead of constructing the Guice injector).

Best,
Jimmy
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.