Page 1 of 1

Unity3D crashing while SFS connection still active.

Posted: 01 Apr 2011, 14:57
by CrociDB
Hey,

I'm working on a webgame on Unity3D and I'm using SFS 1.6.9 for simple data transfer with my server. I had no problem developing on a Mac, but then when I tested my game on a PC running Windows 7, I noticed that the game crashes when I try to close my browser or leave that page when connection is still active. If I Disconnect from the server before leaving the game page, everything is fine.

I tried in some other machines with Windows 7 and all three major browsers for Windows (Chrome, Firefox and IE) and I still got the same problem. Sometimes it unfreezes after a while. Also ran a few tests with Flash and nothing weird happened.

I am catching the event of login and leaving (USER_LOST, USER_EXIT, ROOM_LOST, LOGOUT) on my extension. Am I doing anything wrong?

Posted: 02 Apr 2011, 00:20
by ThomasLund
Are you using the 1.2.7 plugin? Unity 2.x or 3.x?

(Unity 2.x has a very nasty way of handling socket close that is very often crashing the browser by random. Fixed in Unity 3)

Posted: 04 Apr 2011, 14:14
by CrociDB
3.x.

I did a little workaround catching the event of leaving the page on JavaScript and sending a message to unity to close the socket. That's working now, but I want to make that the right way.

What might I be doing wrong?

Thanks.