Chat: SFSIOHandler exception

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

Moderators: Lapo, Bax

regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

Can you wrapp in try-catch at
com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketData()
line this

private function onSocketData(event:ProgressEvent) : void
{
try {
var _loc_2:* = new ByteArray();
this._socket.readBytes(_loc_2);
this._ioHandler.onDataRead(_loc_2);
} catch(e:Error) {
trace(...);
}
}

???
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Why?
If there is an error there we must stop anyways, because data is corrupted and the current buffer is invalid.
So we catch an error and throw another one? What's the use? None.
Lapo
--
gotoAndPlay()
...addicted to flash games
regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

Lapo, I understand all that! Yes, exception sync, yes - all still work after exception, but debug player in firefox is hanging and we can't work normaly! I don't know what i can do... Only you can o something. I have tired.

If you insert in the place that I showed you - all will be well: it's the top level of an error beginnings - the above process will not go? Or am I wrong?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

At the moment I have no specific answer to this. We have never encountered a similar problem. We have run gazillions of client tests where the server fires messages to client at an insane rate (5 to 10K msg/sec) and the API have always been stable and error free.

I really think it has to do with a network issue, which is typically not easy to detect and reproduce.
If you have any ways to provide more details and ways for reproducing I'll be glad to provide further help.
Lapo
--
gotoAndPlay()
...addicted to flash games
regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

Lapo, I am understand all of this. But I also anderstand different beetween words and solution. I understand that difficult for you to localize the problem.
Lapo wrote: I really think it has to do with a network issue, which is typically not easy to detect and reproduce.
I agree that the problem may be in it. We can somehow verify this? Can add traces?

Do I need to beg you to have solved this problem? I do not see you offering any solution, except excuses that you do not see the problem! Do not act like that! I understand that it is hard for you - but it's not easy!
regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

Lapo, I have only 1-2 minutes for work before the exeption! I can't work normally!!! Please, help me! We bought a license and would like to get those normal ASSISSTANCE! Say, what I may do???
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Yesterday it was national vacation, here in Italy so we didn't work.

With this said there must be something very odd going on your side.
I am not saying that it's your fault but I can assure that this problem has never been seen in months of testing and development. We have at least three realtime applications that were tested locally and over the internet with very high traffic and this problem was never reported. (Plus another truckload of local stress tests). Of course I am not saying the problem doesn't exist. Just wondering why it seems so predominant. If it was a flaw in the API everyone would be complaining about it.

We can take try to inhibit the exception if you think it will solve your issue but this is not a real cure for the problem. You will need to understand what is going on and why.

I would like to see a transcript of the debug info that the client produces during a normal session. Even a short one, like 3-5 minutes. Can you please provide it? You just need to run the client in the Flash IDE with the debug flag turned on. Then zip the output and send it to our email, with a reference to this post.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

Can you replace "throw" with "trace"? It's sync throw on top level of code. I can't catch this exeption.
cycheung73
Posts: 1
Joined: 25 Apr 2011, 17:03

Post by cycheung73 »

We are also having a lot of the same issues. We used to only see the SFSIOHandler exception once in a while, but lately it shows up very frequently. We cannot catch this exception and it is disrupting the rest of our application.
loki
Posts: 66
Joined: 04 Apr 2010, 11:16
Location: Latvia
Contact:

Post by loki »

Have the same problem. Anyone solved it?
Error: Unexpected header byte: 0
at com.smartfoxserver.v2.core::SFSIOHandler/handleNewPacket()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSIOHandler.as:103]
at com.smartfoxserver.v2.core::SFSIOHandler/onDataRead()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSIOHandler.as:75]
at com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketData()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/bitswarm/BitSwarmClient.as:404]
regulxenao
Posts: 34
Joined: 03 Mar 2011, 20:29

Post by regulxenao »

Yes. The developers of SFS created version of flash-api library without exception. Ask them.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Chat: SFSIOHandler exception

Post by Lapo »

We are releasing a patch soon that is going to handle the issue discussed here.
If anyone needs a quick update you can request it via email.
The patch should be out in the first days of May
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply