Logout error

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

Moderators: Lapo, Bax

Post Reply
martian77
Posts: 7
Joined: 08 Apr 2011, 09:10
Location: UK - England
Contact:

Logout error

Post by martian77 »

Hi,

I'm getting a problem in Actionscript when I attempt to use Logout. When the Logout Event is received I get the following output in Flash:
[SFS - INFO] Logout { Message id: 2 }
{ Dump: }

(utf_string) zn: GameZone

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]
The logout request is being received and actioned by the server (my user is logged out), but when that event comes back to the front end it doesn't get processed properly. My actionscript to catch this event is never getting triggered, which is obviously a problem. It looks to me that it may have the same root cause as this error discussed here http://forums.smartfoxserver.com/viewto ... 015#p64015.

I've just patched, but the swc file doesn't seem to have updated. Any ideas?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Logout error

Post by Lapo »

Can you tell me the version of your API? You can obtain it by tracing the SmartFox.version property.
Lapo
--
gotoAndPlay()
...addicted to flash games
martian77
Posts: 7
Joined: 08 Apr 2011, 09:10
Location: UK - England
Contact:

Re: Logout error

Post by martian77 »

Yep, API version is 1.0.2
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Logout error

Post by Lapo »

Ok, as I imagined they are out of date.
Make sure to grab the latest release from here: http://www.smartfoxserver.com/download/sfs2x#p=updates
Scroll down a bit and you'll find all the client updates.

I am sure this will solve your problem.
Let me know
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply