Thread: [Azure] Ladder problem

Results 1 to 3 of 3
  1. #1 [Azure] Ladder problem 
    Registered Member
    Join Date
    Sep 2010
    Posts
    448
    Thanks given
    42
    Thanks received
    23
    Rep Power
    4
    Okay, i went testing the ladders in lumby, and when i clicked on them this error came up in cmd, but i still moved up or down...
    Code:
    java.util.ConcurrentModificationException
    	at java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
    	at java.util.LinkedList$ListItr.remove(Unknown Source)
    	at com.rs2.model.World.process(World.java:52)
    	at com.rs2.Server.cycle(Server.java:205)
    	at com.rs2.Server.run(Server.java:118)
    	at java.lang.Thread.run(Unknown Source)
    World.java (red line is line 52)
    Code:
    public static void process() throws Exception {
    		Iterator<Tick> tickIt$ = tickManager.getTickables().iterator();
    		while(tickIt$.hasNext()) {
    			Tick t = tickIt$.next();
    			t.cycle();
    			if(!t.isRunning()) {
    				tickIt$.remove();
    			}
    		}
    		// Perform any logic processing for players.
    		for (int i = 0; i < players.length; i++) {
    			Player player = players[i];
    			if (player == null) {
    				continue;
    			}
    			try {
    				player.process();
    			} catch (Exception ex) {
    				ex.printStackTrace();
    				player.disconnect();
    			}
    		}
    		
    		// Perform any logic processing for NPCs.
    		for (int i = 0; i < npcs.length; i++) {
    			Npc npc = npcs[i];
    			if (npc == null) {
    				continue;
    			}
    			try {
    				npc.process();
    			} catch (Exception ex) {
    				ex.printStackTrace();
    				unregister(npc);
    			}
    		}
    
    		// Update all players.
    		for (int i = 0; i < players.length; i++) {
    			Player player = players[i];
    			if (player == null) {
    				continue;
    			}
    			try {
    				PlayerUpdating.update(player);
    				NpcUpdating.update(player);
    			} catch (Exception ex) {
    				ex.printStackTrace();
    				player.disconnect();
    			}
    		}
    
    		// Reset all players after cycle.
    		for (int i = 0; i < players.length; i++) {
    			Player player = players[i];
    			if (player == null) {
    				continue;
    			}
    			try {
    				player.reset();
    			} catch (Exception ex) {
    				ex.printStackTrace();
    				player.disconnect();
    			}
    		}
    		
    		// Reset all npcs after cycle.
    		for (int i = 0; i < npcs.length; i++) {
    			Npc npc = npcs[i];
    			if (npc == null) {
    				continue;
    			}
    			try {
    				npc.reset();
    			} catch (Exception ex) {
    				ex.printStackTrace();
    				unregister(npc);
    			}
    		}
    		ItemManager.getInstance().tick();
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member
    tommo's Avatar
    Join Date
    Aug 2008
    Posts
    420
    Thanks given
    30
    Thanks received
    36
    Rep Power
    200
    try putting a try-catch statement around the red line catching the concurrent modification exception.

    The concurrent modification exception is thrown when an element on a collection is removed during iteration.

    maybe flag the elements which need to be removed and remove them after the iteration.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2010
    Posts
    448
    Thanks given
    42
    Thanks received
    23
    Rep Power
    4
    bump
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 3
    Last Post: 11-19-2011, 04:07 AM
  2. [Azure V3] - Invisible player problem
    By Sonic chao in forum Help
    Replies: 0
    Last Post: 10-01-2011, 04:14 PM
  3. [Azure V3] Running Option Problem
    By Kayla in forum Help
    Replies: 0
    Last Post: 09-17-2011, 10:48 PM
  4. [RuneSource] Azure client - Run problem
    By Sonic chao in forum Help
    Replies: 5
    Last Post: 09-14-2011, 04:02 PM
  5. Ladder Problem?[PICS] giving REP++
    By cristea2007 in forum Help
    Replies: 7
    Last Post: 09-16-2009, 12:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •