Ghost User

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
ekrem5353
Posts: 118
Joined: 10 Dec 2015, 15:50

Ghost User

Postby ekrem5353 » 31 May 2016, 12:39

Hi,

I have ghost user problem. User seems from client side and from smartfox's control panel. Room stucks and From control panel I can see the room and user but when I select it and clicked monitor selection it says something like user is not available. I use this code to delete it


fileName : RoomRemove.py
ZONE_NAME = "Pisti"
ROOM_NAME = "SUZ18"

def init():
trace("RoomUnlock Started: ", VERSION)
theZone = _sfs.getZoneManager().getZoneByName(ZONE_NAME)

if theZone != None:
theRoom = theZone.getRoomByName(ROOM_NAME)
theZone.removeRoom(theRoom) // Here it throws null pointer exception
trace("Done!")

else:
trace("Zone not found, please double check the name provided in the Extension script!")


def destroy():
trace("RoomUnlock extension destroyed")

def handleClientRequest(cmd, sender, params):
trace("Request: ", cmd, sender, params)



This sometimes works sometimes it doesnt.

What can be done.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Ghost User

Postby Lapo » 31 May 2016, 13:59

Can you show me the NullPointer exception stack trace?
Have you turned on the "Ghost Hunter" function in the AdminTool > Server Configurator?
Are you listening for USER_DISCONNECT / USER_LOGOUT events on the server side? If so can you tell me what these listeners do?

Finally it wouldn't hurt to know what SFS2X version you're running.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
ekrem5353
Posts: 118
Joined: 10 Dec 2015, 15:50

Re: Ghost User

Postby ekrem5353 » 15 Jun 2016, 06:19

Hi

This is error in the logs.

VERSION = "1.0.0"

#
# Removes a stuck user and the related Room
#

ZONE_NAME = "CanakOkey"
ROOM_NAME = "SUZ16"

def init():
trace("RoomUnlock Started: ", VERSION)
theZone = _sfs.getZoneManager().getZoneByName(ZONE_NAME)

if theZone != None:
theRoom = theZone.getRoomByName(ROOM_NAME)
theZone.removeRoom(theRoom) // This is line 25
trace("Done!")

else:
trace("Zone not found, please double check the name provided in the Extension script!")


def destroy():
trace("RoomUnlock extension destroyed")

def handleClientRequest(cmd, sender, params):
trace("Request: ", cmd, sender, params)




****** Error in the logs **********************

15 Jun 2016 | 08:52:46,122 | WARN | SFSWorker:Ext:4 | v2.extensions.PythonExtension | | Failed initializing Python Extension: debug -> Traceback (innermost last):
File "<string>", line 25, in init
java.lang.NullPointerException

java.lang.NullPointerException: java.lang.NullPointerException

smartfox version ---> 2.11.0

Ghost Hunter function is on..

I am listening user_disconnect and user logout events I can send them too but they are too long
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Ghost User

Postby Lapo » 15 Jun 2016, 07:42

ekrem5353 wrote:I am listening user_disconnect and user logout events I can send them too but they are too long

On multiple occasions we have had reports of issues in the USER_DISCONNECT or USER_LOGOUT code that would cause the Room to linger.

You could send the code for those two events in an email to our support@... email box. We're not going to do a full code review, but sometimes a quick glance is enough to spot potential issues.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 130 guests