Thread: Ascend source java.lang.ArrayIndexOutOfBoundsException

Results 1 to 8 of 8
  1. #1 Ascend source java.lang.ArrayIndexOutOfBoundsException 
    Registered Member
    Join Date
    Aug 2012
    Posts
    110
    Thanks given
    3
    Thanks received
    1
    Rep Power
    11
    Hello,
    I wonder if anybody could help me.
    Sometimes when people try to login on the server it prints this
    java.lang.ArrayIndexOutOfBoundsException
    in the console and kicks them back out
    They have to try multiple times before the server lets them on.
    i've been looking everywhere for a solution some people say its cache related but i've put the cache
    in my data file so fuck noes
    Any help would be appreciated
    thanks
    Reply With Quote  
     

  2. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    286
    Discord
    Arch337#1337
    Rep Power
    656
    You sure it do not print out more like what file it causing it?


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    976
    Thanks given
    47
    Thanks received
    160
    Rep Power
    366
    Have you tried running the server in debug mode with the option enabled to stop code execution when a certain type of exception is thrown?

    EDIT: I mean within an IDE
    Last edited by TheChosenOne; 06-04-2019 at 09:36 PM. Reason: Clarification
    My informative threads:
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2012
    Posts
    110
    Thanks given
    3
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    You sure it do not print out more like what file it causing it?
    java.lang.ArrayIndexOutOfBoundsException is the only thing that prints when it happens, If i go to the arrayutils file there is alot of outofbounds text so unsure which one it is.
    Apparently it happens on other servers using my source aswell. This is the code : [Only registered and activated users can see links. ]

    Quote Originally Posted by TheChosenOne View Post
    Have you tried running the server in debug mode with the option enabled to stop code execution when a certain type of exception is thrown?

    EDIT: I mean within an IDE
    So on eclipse just right click and click debug as? I've not clue how to enable that other option
    Reply With Quote  
     

  5. #5  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,859
    Thanks given
    14,198
    Thanks received
    295
    Rep Power
    5000
    Within eclipse you can click left of the line which you want to read data from. A small circle will appear and then run the server in debug mode. Once the debugger reaches the line of code, the server will pause
    Thanks, MrClassic.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #6  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    976
    Thanks given
    47
    Thanks received
    160
    Rep Power
    366
    Quote Originally Posted by Smidge View Post
    java.lang.ArrayIndexOutOfBoundsException is the only thing that prints when it happens, If i go to the arrayutils file there is alot of outofbounds text so unsure which one it is.
    Apparently it happens on other servers using my source aswell. This is the code : [Only registered and activated users can see links. ]



    So on eclipse just right click and click debug as? I've not clue how to enable that other option
    Take a look at this link, it explains how to break on certain exceptions: [Only registered and activated users can see links. ]
    My informative threads:
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Aug 2012
    Posts
    110
    Thanks given
    3
    Thanks received
    1
    Rep Power
    11
    Thank you guys, i'll try this out.

    java.lang.ArrayIndexOutOfBoundsException: 512
    at ethos.util.Stream.writeBits(Stream.java:384)
    at ethos.model.players.Player.addNewNPC(Player.java:3 477)
    at ethos.model.players.PlayerHandler.updateNPC(Player Handler.java:251)
    at ethos.model.players.Player.update(Player.java:1260 )
    at ethos.model.players.PlayerHandler.process(PlayerHa ndler.java:195)
    at ethos.Server.lambda$0(Server.java:174)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Unknown Source)
    at java.util.concurrent.FutureTask.runAndReset(Unknow n Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    This is what is causing it i'm fairly certain but no clue how to fix

    player.java reads : str.writeBits(14, id);
    I think its because its out of bounds, what should i change this to?
    Reply With Quote  
     

  8. #8  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,859
    Thanks given
    14,198
    Thanks received
    295
    Rep Power
    5000
    What did you try to change? The bits need to be the same server-sided as client-sided.
    Thanks, MrClassic.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    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: 2
    Last Post: 02-09-2012, 01:50 PM
  2. Replies: 7
    Last Post: 12-03-2011, 09:38 AM
  3. java.lang.ArrayIndexOutOfBoundsException: 7390
    By zhstyle1990 in forum Help
    Replies: 0
    Last Post: 09-18-2011, 10:54 PM
  4. Replies: 1
    Last Post: 12-09-2009, 03:30 AM
  5. java.lang.ArrayIndexOutOfBoundsException: 0
    By Pilldom in forum Projects
    Replies: 0
    Last Post: 11-27-2008, 04:10 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
  •