Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException #82

Closed
taylorleprechaun opened this issue Apr 12, 2017 · 2 comments
Closed

IllegalStateException #82

taylorleprechaun opened this issue Apr 12, 2017 · 2 comments

Comments

@taylorleprechaun
Copy link
Collaborator

This error pops up a lot in the Day 2 logs. Here is 2 instances of it in Challenge 0.

CLIENT: GAME B MOVE 18 PLACE LAKE+JUNGLE AT 7 -8 1 1 FOUND SETTLEMENT AT 3 -3 0
SERVER: GAME B MOVE 18 PLAYER 1 PLACED LAKE+JUNGLE AT 7 -8 1 1 FOUNDED SETTLEMENT AT 3 -3 0
SERVER: GAME B MOVE 19 PLAYER 10 PLACED GRASS+JUNGLE AT -16 18 -2 2 EXPANDED SETTLEMENT AT 1 -10 9 GRASS
SERVER: GAME A OVER PLAYER 1 FORFEITED PLAYER 10 WIN
Exception in thread "Thread-440" java.lang.IllegalStateException
SERVER: GAME B OVER PLAYER 10 620 PLAYER 1 220
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: BEGIN ROUND 9 OF 15
	at Tournament.startNewRound(Tournament.java:26)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 9
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
SERVER: END OF ROUND 8 OF 15 WAIT FOR NEXT MATCH
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE GRASS+LAKE
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
CLIENT: GAME A MOVE 0 PLACE GRASS+LAKE AT 0 2 -2 5 FOUND SETTLEMENT AT 1 0 -1
SERVER: GAME B MOVE 0 PLAYER 9 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED GRASS+LAKE AT 0 2 -2 5 FOUNDED SETTLEMENT AT 1 0 -1
SERVER: GAME A MOVE 0 PLAYER 9 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 9 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 9 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 9 OF 15 WAIT FOR NEXT MATCH
Exception in thread "Thread-449" java.lang.IllegalStateException
SERVER: BEGIN ROUND 10 OF 15
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 8
	at Tournament.startNewRound(Tournament.java:26)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE GRASS+LAKE
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
CLIENT: GAME A MOVE 0 PLACE GRASS+LAKE AT 2 0 -2 1 FOUND SETTLEMENT AT 0 1 -1
SERVER: GAME B MOVE 0 PLAYER 8 PLACED GRASS+LAKE AT -2 2 0 1 FOUNDED SETTLEMENT AT 0 1 -1
SERVER: GAME A MOVE 0 PLAYER 1 PLACED GRASS+LAKE AT 2 0 -2 1 FOUNDED SETTLEMENT AT 0 1 -1
@taylorleprechaun
Copy link
Collaborator Author

Here are 8 instances of it.

SERVER: GAME A MOVE 14 PLAYER 1 FORFEITED: ILLEGAL BUILD
SERVER: GAME A OVER PLAYER 1 FORFEITED PLAYER 6 WIN
SERVER: GAME B OVER PLAYER 1 FORFEITED PLAYER 6 WIN
SERVER: END OF ROUND 12 OF 15 WAIT FOR NEXT MATCH
SERVER: BEGIN ROUND 13 OF 15
Exception in thread "Thread-573" java.lang.IllegalStateException
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE GRASS+LAKE
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 5
	at Tournament.startNewRound(Tournament.java:26)
CLIENT: GAME A MOVE 0 PLACE GRASS+LAKE AT 2 0 -2 2 FOUND SETTLEMENT AT 1 0 -1
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME A MOVE 0 PLAYER 1 PLACED GRASS+LAKE AT 2 0 -2 2 FOUNDED SETTLEMENT AT 1 0 -1
SERVER: GAME B MOVE 0 PLAYER 5 FORFEITED: ILLEGAL TILE PLACEMENT
SERVER: GAME A MOVE 0 PLAYER 5 FORFEITED: ILLEGAL TILE PLACEMENT
SERVER: GAME A OVER PLAYER 5 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 5 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 13 OF 15 WAIT FOR NEXT MATCH
Exception in thread "Thread-582" java.lang.IllegalStateException
SERVER: BEGIN ROUND 14 OF 15
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 3
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE GRASS+LAKE
	at Tournament.startNewRound(Tournament.java:26)
CLIENT: GAME A MOVE 0 PLACE GRASS+LAKE AT 0 2 -2 5 FOUND SETTLEMENT AT -1 0 1
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME B MOVE 0 PLAYER 3 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED GRASS+LAKE AT 0 2 -2 5 FOUNDED SETTLEMENT AT -1 0 1
SERVER: GAME A MOVE 0 PLAYER 3 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 3 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 3 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 14 OF 15 WAIT FOR NEXT MATCH
SERVER: BEGIN ROUND 15 OF 15
Exception in thread "Thread-591" java.lang.IllegalStateException
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 2
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
	at Tournament.startNewRound(Tournament.java:26)
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE GRASS+LAKE
CLIENT: GAME A MOVE 0 PLACE GRASS+LAKE AT 2 0 -2 1 FOUND SETTLEMENT AT 0 1 -1
SERVER: GAME B MOVE 0 PLAYER 2 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED GRASS+LAKE AT 2 0 -2 1 FOUNDED SETTLEMENT AT 0 1 -1
SERVER: GAME A MOVE 0 PLAYER 2 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 2 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 2 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 15 OF 15
SERVER: WAIT FOR THE NEXT CHALLENGE TO BEGIN
Exception in thread "Thread-602" java.lang.IllegalStateException
SERVER: BEGIN ROUND 1 OF 15
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 21
	at Tournament.startNewRound(Tournament.java:26)
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
SERVER: NEW CHALLENGE 1 YOU WILL PLAY 15 MATCHES
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE LAKE+ROCK
	at WritingRunnable.run(WritingRunnable.java:18)
CLIENT: GAME A MOVE 0 PLACE LAKE+ROCK AT -1 2 -1 4 FOUND SETTLEMENT AT 0 -1 1
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME B MOVE 0 PLAYER 21 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED LAKE+ROCK AT -1 2 -1 4 FOUNDED SETTLEMENT AT 0 -1 1
SERVER: GAME A MOVE 0 PLAYER 21 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 21 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 21 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 1 OF 15 WAIT FOR NEXT MATCH
Exception in thread "Thread-611" java.lang.IllegalStateException
SERVER: BEGIN ROUND 2 OF 15
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE LAKE+ROCK
	at Tournament.startNewRound(Tournament.java:26)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 20
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
CLIENT: GAME A MOVE 0 PLACE LAKE+ROCK AT 2 0 -2 2 FOUND SETTLEMENT AT 0 1 -1
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME B MOVE 0 PLAYER 20 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED LAKE+ROCK AT 2 0 -2 2 FOUNDED SETTLEMENT AT 0 1 -1
SERVER: GAME A MOVE 0 PLAYER 20 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 20 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 20 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 2 OF 15 WAIT FOR NEXT MATCH
SERVER: BEGIN ROUND 3 OF 15
Exception in thread "Thread-620" java.lang.IllegalStateException
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
	at Tournament.startNewRound(Tournament.java:26)
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE LAKE+ROCK
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 19
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
CLIENT: GAME A MOVE 0 PLACE LAKE+ROCK AT 2 0 -2 3 FOUND SETTLEMENT AT 0 1 -1
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME B MOVE 0 PLAYER 19 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED LAKE+ROCK AT 2 0 -2 3 FOUNDED SETTLEMENT AT 0 1 -1
SERVER: GAME A MOVE 0 PLAYER 19 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 19 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 19 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 3 OF 15 WAIT FOR NEXT MATCH
Exception in thread "Thread-629" java.lang.IllegalStateException
SERVER: BEGIN ROUND 4 OF 15
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 18
	at Tournament.startNewRound(Tournament.java:26)
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE LAKE+ROCK
	at WritingRunnable.run(WritingRunnable.java:18)
CLIENT: GAME A MOVE 0 PLACE LAKE+ROCK AT 2 0 -2 6 FOUND SETTLEMENT AT 1 0 -1
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME B MOVE 0 PLAYER 18 FORFEITED: TIMEOUT
SERVER: GAME A MOVE 0 PLAYER 1 PLACED LAKE+ROCK AT 2 0 -2 6 FOUNDED SETTLEMENT AT 1 0 -1
SERVER: GAME A MOVE 0 PLAYER 18 FORFEITED: TIMEOUT
SERVER: GAME A OVER PLAYER 18 FORFEITED PLAYER 1 WIN
SERVER: GAME B OVER PLAYER 18 FORFEITED PLAYER 1 WIN
SERVER: END OF ROUND 4 OF 15 WAIT FOR NEXT MATCH
Exception in thread "Thread-638" java.lang.IllegalStateException
SERVER: BEGIN ROUND 5 OF 15
	at java.util.HashMap$HashIterator.remove(HashMap.java:1449)
SERVER: NEW MATCH BEGINNING NOW YOUR OPPONENT IS PLAYER 16
	at Tournament.startNewRound(Tournament.java:26)
SERVER: MAKE YOUR MOVE IN GAME A WITHIN 1.5 SECONDS: MOVE 0 PLACE LAKE+ROCK
	at TournamentDriver.receiveInfo(TournamentDriver.java:48)
CLIENT: GAME A MOVE 0 PLACE LAKE+ROCK AT 2 0 -2 6 FOUND SETTLEMENT AT 0 1 -1
	at RoundProtocol.responseForMessage(RoundProtocol.java:39)
	at MessageDispatcher.processInput(MessageDispatcher.java:14)
	at WritingRunnable.run(WritingRunnable.java:18)
	at java.lang.Thread.run(Thread.java:745)
SERVER: GAME A MOVE 0 PLAYER 1 PLACED LAKE+ROCK AT 2 0 -2 6 FOUNDED SETTLEMENT AT 0 1 -1
SERVER: GAME B MOVE 0 PLAYER 16 PLACED LAKE+ROCK AT -1 1 0 6 FOUNDED SETTLEMENT AT -1 2 -1
SERVER: MAKE YOUR MOVE IN GAME B WITHIN 1.5 SECONDS: MOVE 0 PLACE GRASS+GRASS

@gonzalonunez
Copy link
Contributor

Here's the fix I just implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants