Thread: Help with Playerhandler - Dcing players

Results 1 to 8 of 8
  1. #1 Help with Playerhandler - Dcing players 
    Donator
    OsLegion's Avatar
    Join Date
    Sep 2017
    Posts
    86
    Thanks given
    23
    Thanks received
    15
    Rep Power
    11
    Firstly im not a good enough coder to fully understand how to fix/edit/rewrite my servers playerhandler class. One thing my server has a result of the bugged class is a dc issue for players
    where they dc and cant log back into their account until someone kicks the account or it logs itself. Maybe someone can show me some glaring issues. I believe some proccess takes more than a tick long
    resulting in the player trying to read something(idk im just guessing) thats already being used, so it kicks the player instead. I know theres some issues with the synchronized (lock) as well. Any help would
    be great

    Here's the code
    https://hastebin.com/aboqibubod.cs
    Reply With Quote  
     

  2. #2  
    Renown Programmer
    Bartvh's Avatar
    Join Date
    May 2017
    Posts
    370
    Thanks given
    89
    Thanks received
    208
    Rep Power
    497
    Why do you synchronise it anyway? Your whole player handeling should be single threaded. Also if you can't find the root cause of the problem you can just make it so when the connection is closed the player is logged out.
    Reply With Quote  
     

  3. #3  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Is there any print out in the console whenever someone that got dc'd ang can't log back in?
    What did the player do before it happend?
    Can they close they restart the client to get back online?


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

  4. #4  
    Donator
    OsLegion's Avatar
    Join Date
    Sep 2017
    Posts
    86
    Thanks given
    23
    Thanks received
    15
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    Is there any print out in the console whenever someone that got dc'd ang can't log back in?
    What did the player do before it happend?
    Can they close they restart the client to get back online?
    There is no printout. Usually what i get though is, "player is sending invalid PacketType: x"
    and then a java.lang.ArrayIndexOutOfBoundsException without anything else so i have no idea where it comes from.
    Players can't turn off client to get back onto their character. The only way is if a staff member kicks them.
    Reply With Quote  
     

  5. #5  
    Registered MrClassic
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    15
    Posts
    2,063
    Thanks given
    24,154
    Thanks received
    551
    Rep Power
    5000
    Quote Originally Posted by OsLegion View Post
    There is no printout. Usually what i get though is, "player is sending invalid PacketType: x"
    and then a java.lang.ArrayIndexOutOfBoundsException without anything else so i have no idea where it comes from.
    Players can't turn off client to get back onto their character. The only way is if a staff member kicks them.
    Most of the times java.lang.ArrayIndexOutOfBoundsException is printed with a stack trace to the source and which line. If you could get that next time, we can help you even more.

    EDIT:

    check your ProcessPacket in PackhetHandler.java
    Reply With Quote  
     

  6. #6  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by OsLegion View Post
    There is no printout. Usually what i get though is, "player is sending invalid PacketType: x"
    and then a java.lang.ArrayIndexOutOfBoundsException without anything else so i have no idea where it comes from.
    Players can't turn off client to get back onto their character. The only way is if a staff member kicks them.
    Well then it is sending something, no?
    Have a look at what cause sending that message aka what is the x for?


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

  7. #7  
    Donator
    OsLegion's Avatar
    Join Date
    Sep 2017
    Posts
    86
    Thanks given
    23
    Thanks received
    15
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    Well then it is sending something, no?
    Have a look at what cause sending that message aka what is the x for?
    I get this
    Attached image
    Reply With Quote  
     

  8. #8  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Looks like a deadlock, the rest of the error is probably shoved down amongst these spammed messages.
    Attached image
    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: 05-27-2017, 07:34 PM
  2. Need help with adding normal player commands?
    By N3wAgeMusic in forum Help
    Replies: 1
    Last Post: 07-10-2015, 12:57 PM
  3. Replies: 1
    Last Post: 01-25-2014, 07:45 PM
  4. HELP with playerrights to players!!!
    By Verisimilitude in forum Help
    Replies: 1
    Last Post: 12-05-2013, 04:22 AM
  5. Need help with my 100+ player server
    By Integer in forum Help
    Replies: 4
    Last Post: 10-07-2009, 03:35 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
  •