Exception at SmartFoxServer.canLogin

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
milosh6
Posts: 27
Joined: 06 Sep 2006, 14:09

Exception at SmartFoxServer.canLogin

Post by milosh6 »

Hello Lapo :)

well, we are now receiving the exception when calling the "canLogin" method, and we really cannot figure out why is this exception generated, as it is generated by canLogin method.

Here is the stack trace. Any ideas?

Code: Select all

java.lang.NullPointerException
	at it.gotoandplay.smartfoxserver.SmartFoxServer.canLogin(SmartFoxServer.java:1985)
	at it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.canLogin(ExtensionHelper.java:102)
	at geesee.handler.LoginRequest.execute(LoginRequest.java:168)
	at geesee.handler.Handler.run(Handler.java:54)
	at geesee.GeeseeExtension.handleInternalEvent(GeeseeExtension.java:137)
	at it.gotoandplay.smartfoxserver.controllers.MessageHandler.dispatchEvent(MessageHandler.java:141)
	at it.gotoandplay.smartfoxserver.controllers.SystemHandler.handleLoginRequest(SystemHandler.java:374)
	at it.gotoandplay.smartfoxserver.controllers.SystemHandler.processEvent(SystemHandler.java:164)
	at it.gotoandplay.smartfoxserver.controllers.SystemHandler.run(SystemHandler.java:112)
	at java.lang.Thread.run(Unknown Source)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

is this error happening on each login attempt?
To me it looks like the client got disconnected in the middle of the login transaction
Lapo
--
gotoAndPlay()
...addicted to flash games
milosh6
Posts: 27
Joined: 06 Sep 2006, 14:09

Post by milosh6 »

No, it happens only sometimes, but relatively often considering the amount of clients using the chat. How do we prevent this exception from occuring?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

This exception should be seen very rarely or not seen at all.
Paired with the other problems you reported it seems that often connections get closed or shut down unexpectedly. Also it sounds weird that these connections die so prematurely... i.e. at login time, which usually happens a few seconds after connecting.

Is your server exposed directly to the internet? Or is it behind a router / firewall? Does it run a software firewall?
Are these failed connections coming always from the same place?

If you want we can try a remote test with a stress test tool, opening a few connections (50-100 or more) and see what happens.
Maybe drop us an email so we can discuss how to do it.

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply