Page 1 of 1

Random AS3 API crash

Posted: 01 Mar 2012, 12:55
by tortenazor
Hi,

we've developed a realtime racing game using SFX. It works great so far. However from time to time the flash client throws this:

RangeError: Error #2006: Index out of limits
at flash.utils::ByteArray/writeBytes()
at com.smartfoxserver.v2.core::SFSIOHandler/handlePacketData()
at com.smartfoxserver.v2.core::SFSIOHandler/onDataRead()
at com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketData()

And after that the entire sfs class becomes unusable. No more events, no more requests can be sent, etc. When this happens the server doesn't display any errors and the admin tool reports the connection with the client to be working fine ( no dropped messages, etc ).

I'm using the latest as3 2.0.1 API against SFS2_RC3 ( Can't get the release to work on that same server, will start another post about that ) It happened as well with the 2.0.0 API before that

Thank you

Thank you

Re: Random AS3 API crash

Posted: 02 Mar 2012, 09:16
by Bax
Using the latest AS3 API with an older version of SFS is not recommended at all.
Please install SFS2X 2.0.1 and retry.
If it still happens, you should please provide step-by-step instructions on reproducing the issue, or a test case showing it.

Re: Random AS3 API crash

Posted: 13 Mar 2012, 18:19
by tortenazor
Hi,

just a follow-up post. Updated bopth server and APi to latest releases and the issue is still there. Unfortunately I can't reproduce the rror. It happens very randomly.

In the meantime I suggest a patch that try catches this block

at flash.utils::ByteArray/writeBytes()
at com.smartfoxserver.v2.core::SFSIOHandler/handlePacketData()
at com.smartfoxserver.v2.core::SFSIOHandler/onDataRead()

so when the issue happens only the offending packet is discarded and the API continues to work as usual. Now when I get the error the whole smartfox class becomes unresponsive and I users have to reload the game.

Please help me with this since it is hurting our game's reputation and I can't patch it myself

Re: Random AS3 API crash

Posted: 14 Mar 2012, 10:40
by Lapo
I have already replied in another post of yours. Please let's keep the discussion in one thread only