Skip to content

Olympiad Bug

Featured Replies

Hello,

Some time when starting match teleport two teams to same arena. And i can't find problem.

here how work:

for (int i = 0; i < STADIUMS.length; i++)
				{
..
..
....
.....
if (STADIUMS[i].isFreeToUse()){
...
.....
.....
.......
	try
	{
       _olympiadInstances.put(i, new OlympiadGame(i, COMP_TYPE.NON_CLASSED,  nextOpponents(Olympiad.getRegisteredNonClassBased())));
       _gamesQueue.put(i, new OlympiadGameTask(_olympiadInstances.get(i)));
       STADIUMS[i].setStadiaBusy();
	}
.....
........

Why can set same stadium id? firstly it check is free or no, then if free set stadium to busy.

What's your pack? maybe it's about synchronization in olympiad instances

  • Author

frozen

 

What's your pack? maybe it's about synchronization in olympiad instances

and its synchronized

i see upper for (int i = 0; i < STADIUMS.length; i++)

public synchronized void run()
    {

Edited by wongerlt

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.