[SOLVED ]Problem in LogoutRequest !!!

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

Moderators: Lapo, Bax

secret007
Posts: 58
Joined: 29 May 2009, 06:27

[SOLVED ]Problem in LogoutRequest !!!

Postby secret007 » 05 Mar 2012, 11:13

Hi,

I have a logout button in my game on which "sfs.send(new LogoutRequest());" called, but its giving some errors .


Code: Select all

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]



:(
Last edited by secret007 on 06 Mar 2012, 07:07, edited 1 time in total.
======================================================
Choose a job of your choice and you will never have to work in life !!!
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Problem in LogoutRequest !!!

Postby rjgtav » 06 Mar 2012, 00:07

Hi.
Please download the latest Client-API, version 1.0.3 from http://www.smartfoxserver.com/download/sfs2x#p=updates.
It fixed a bug about a NullPointerException during logout, when the LagMonitor was enabled.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
secret007
Posts: 58
Joined: 29 May 2009, 06:27

Re: Problem in LogoutRequest !!!

Postby secret007 » 06 Mar 2012, 07:07

got it man, now working fine,


cheerss ...
======================================================
Choose a job of your choice and you will never have to work in life !!!
kalani96746
Posts: 6
Joined: 21 Jun 2008, 17:24

Re: [SOLVED ]Problem in LogoutRequest !!!

Postby kalani96746 » 30 May 2012, 07:47

Why not update the client directly rather than via patch. I got the .swc from the website about a week ago and got this error.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: [SOLVED ]Problem in LogoutRequest !!!

Postby rjgtav » 01 Jun 2012, 23:37

Hello.
Sorry but I'm not understanding what you mean with your first sentence.
Can you please confirm which API version you're using? You can do it by tracing the version property of a SmartFox instance.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
kalani96746
Posts: 6
Joined: 21 Jun 2008, 17:24

Re: [SOLVED ]Problem in LogoutRequest !!!

Postby kalani96746 » 02 Jun 2012, 11:12

Hi rjtav,

I just meant I was just wondering why Smartfox doesn't just roll the patch in with the current release; it seems its pretty long ago now that this patch was made and it would seem to me a major bug.

-------NOTE--------
Just as a note for people with this issue I did notice however the patch .swc has issues with codehinting in FlashDevelop.
I use this so after getting around the issue which the patch fixed I had to get around another issue due to the patch .swc.

You might want to keep the older non-patched version of the .swc around if you use codehinting in FlashDevelop.

See http://www.smartfoxserver.com/forums/viewtopic.php?f=19&t=13538&p=58115&hilit=.0.3+flashdevelop#p58115
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: [SOLVED ]Problem in LogoutRequest !!!

Postby rjgtav » 02 Jun 2012, 22:54

Well, it is much easier and quicker to just release a client patch instead of having to compile the whole server again just due to a minor client tweak.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 4 guests