Thread: Event null pointer occurs when regular method is called ?

Results 1 to 4 of 4
  1. #1 Event null pointer occurs when regular method is called ? 
    Registered Member Akeid's Avatar
    Join Date
    May 2009
    Posts
    911
    Thanks given
    22
    Thanks received
    15
    Rep Power
    37
    lol fixed sry guys, the problem was 2 events called direclty at the same time;
    to fix this kind of issue go to walktoactions.java, and remove the event around the first objkect method (cheapFix lol ) then add some timers


    Spoiler for FIXED:
    Hey guys, im writing mining for runesource and im having a little trouble with the event system.

    I have the method below for handling the the mining process, but when ever it is called from mining.java it gives me this null pointer in the terminal

    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:43)
    	at com.rs2.Server.cycle(Server.java:200)
    	at com.rs2.Server.run(Server.java:113)
    	at java.lang.Thread.run(Unknown Source)
    When i run a similar event in commands.java, no nulls occur (has nothing to do with tick.java). Btw, the items still are added when the null occurs.

    This is the method that is called

    Code:
        public static void checkBeforeMine(final Player player, final int objectClickId){ 
        	
        	int oreObjectIdIndex = Arrays.binarySearch(oreObjectId, objectClickId);
        	
            final int ObjectId = oreObjectId[oreObjectIdIndex];
            final int oreItemId = ores[oreObjectIdIndex][0];
            final int expGained = ores[oreObjectIdIndex][2];
            final int levelRequired = ores[oreObjectIdIndex][1];
            
            player.getUpdateFlags().sendAnimation(624, 0);
            player.getActionSender().sendMessage("You swing your pick axe at the rock...");
            
            World.submit(new Tick(4) {
                @Override
                public void execute() {
                	
                		
                		player.getInventory().addItem(new Item(oreItemId));
                		player.getActionSender().sendMessage("You managed to mine some copper ore.");
                		
                	
                	this.stop();
                	}
                
            });   	
        }
    If anyone can solve the problem i would be thankful, its been bugging me and i cant seem to understand why it is doing this.
     

  2. #2  
    Banned x eddie x's Avatar
    Join Date
    Feb 2011
    Posts
    528
    Thanks given
    17
    Thanks received
    7
    Rep Power
    0
    man bump dont know how to fix this..
     

  3. #3  
    Registered Member Akeid's Avatar
    Join Date
    May 2009
    Posts
    911
    Thanks given
    22
    Thanks received
    15
    Rep Power
    37
    haha fixed sry dudes
     

  4. #4  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
     


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. Null pointer
    By Andrew in forum Help
    Replies: 12
    Last Post: 08-05-2010, 05:12 PM
  2. Null Pointer
    By Mage k0 in forum Help
    Replies: 1
    Last Post: 01-01-2010, 02:14 PM
  3. Null pointer
    By Mr. Epic in forum Help
    Replies: 3
    Last Post: 12-01-2009, 08:17 AM
  4. Null pointer
    By Bruno in forum Help
    Replies: 3
    Last Post: 07-09-2009, 04:39 PM
  5. [508]nub null pointer.
    By EndlessZombies in forum Help
    Replies: 0
    Last Post: 03-08-2009, 03:40 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
  •