Null object reference on handleLogout

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

User avatar
copet80
Posts: 42
Joined: 27 Apr 2010, 22:23
Location: Australia
Contact:

Null object reference on handleLogout

Postby copet80 » 03 Oct 2012, 04:56

I'm getting the following null pointer exception when the server sends the client a LOGOUT event:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.smartfoxserver.v2::SmartFox/handleLogout()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/SmartFox.as:1912]
at com.smartfoxserver.v2.controllers::SystemController/fnLogout()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/controllers/SystemController.as:827]
at com.smartfoxserver.v2.controllers::SystemController/handleMessage()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/controllers/SystemController.as:127]
at com.smartfoxserver.v2.core::SFSProtocolCodec/dispatchRequest()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSProtocolCodec.as:150]
at com.smartfoxserver.v2.core::SFSProtocolCodec/onPacketRead()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSProtocolCodec.as:54]
at com.smartfoxserver.v2.core::SFSIOHandler/handlePacketData()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSIOHandler.as:246]
at com.smartfoxserver.v2.core::SFSIOHandler/onDataRead()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSIOHandler.as:105]
at com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketData()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/bitswarm/BitSwarmClient.as:419]

Has anyone else experienced this issue?

I'm running SFS 2.2.0.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Null object reference on handleLogout

Postby Bax » 03 Oct 2012, 07:45

The line number is not corresponding to the handleLogout method mentioned in your stack trace, so you are probably using an older version of the AS3 API. Please update to the latest version available and retest. You can get it on this page: http://www.smartfoxserver.com/download/sfs2x#p=updates
Paolo Bax
The SmartFoxServer Team
User avatar
copet80
Posts: 42
Joined: 27 Apr 2010, 22:23
Location: Australia
Contact:

Re: Null object reference on handleLogout

Postby copet80 » 05 Oct 2012, 00:18

All good now! Thanks Bax

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 13 guests