Thread: [597] Client throwing index out of bounds exception

Results 1 to 4 of 4
  1. #1 [597] Client throwing index out of bounds exception 
    Registered Member
    Join Date
    Nov 2011
    Posts
    20
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Hi,

    Spoiler for Problem:
    Soooo idk why this is throwing an index 0 out of bounds for length 0...

    Code:
    static Class49 method476(Class177 idx8, int i) {
    		byte[] spriteData = idx8.method2133(i);
    		if (spriteData == null) {
    			return null;
    		}
    
    		return method480(spriteData)[0];
    	}
    I don't have any clue why it is doing it... I honestly have no clue how the array on a method works. So if you could explain that to me that would be cool.
    Thanks!

    Also if someone has the jawt.dll that would be dope too.


    Fixed. Just had to move some values out side of a for loop into it. Now it works completely fine. But if you still want to explain how the method()[0] stuff works, please do because I am still confused how it works.
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Seems like it's trying to load the buffered images from the raw sprite data but there isn't any so it's throwing an out of bounds exception.

    You can just add a length check before returning the data for now, though the problem might persist elsewhere.
    Project thread
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2011
    Posts
    20
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    So would it be a Cache problem or a loading problem?

    Ill try and add a check to see what happens.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Dec 2009
    Posts
    774
    Thanks given
    367
    Thanks received
    455
    Rep Power
    927
    Quote Originally Posted by Immortal_317 View Post
    So would it be a Cache problem or a loading problem?

    Ill try and add a check to see what happens.
    Find out which sprite it's trying to read.
    link removed
    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: 4
    Last Post: 08-27-2016, 10:34 PM
  2. Replies: 7
    Last Post: 07-08-2015, 02:08 AM
  3. index out of bounds exception
    By kopjekoffiee in forum Help
    Replies: 0
    Last Post: 06-29-2011, 09:41 PM
  4. Index Out of bounds exception
    By discipl3 in forum Help
    Replies: 0
    Last Post: 11-17-2009, 10:19 PM
  5. Npc Out of bounds exception
    By discipl3 in forum Help
    Replies: 0
    Last Post: 11-09-2009, 10:22 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •