Page 1 of 1

Logout error

Posted: 28 Sep 2012, 15:41
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?

Re: Logout error

Posted: 28 Sep 2012, 15:50
by Lapo
Can you tell me the version of your API? You can obtain it by tracing the SmartFox.version property.

Re: Logout error

Posted: 28 Sep 2012, 16:26
by martian77
Yep, API version is 1.0.2

Re: Logout error

Posted: 28 Sep 2012, 16:55
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