Ha - Firefox crash in Unity "solved"

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Ha - Firefox crash in Unity "solved"

Postby ThomasLund » 01 Nov 2008, 08:56

Well - those of you who have tried to use SFS with Unity projects in a webplayer might have noticed that Firefox crashes on connect in the test project that I've made.

Just solved the issue...... :oops:

When you forget to register delegates/callback methods and the client API tries to call back on an event - then firefox doesnt like that at all. Other browsers and standalone players dont care.

I dont know why Firefox is so fickle about this, but anyways. The test project starts the connection in "debug = true" mode. This means there are lots of callbacks on the onDebugMessage event, and the test project doesnt have one = boom on connect, as it writes a little "Trying to connect" debug message back to the client.

So either in Firefox start the connection in debug = false, or implement a quick onDebugMessage method.

Code: Select all

   SFSEvent.onDebugMessage += OnDebugMessage;

   public void OnDebugMessage(string message)
   {
       Debug.Log("[SFS DEBUG] " + message);
   }


This also means that you can expect other crashes in Firefox when the server gets events from the server that you didnt register for in your client code.

For the beta 2 I will put in some robustness checks in the client API itself, so this issue will not show up again. But I wanted to let you know about it here in case you are currently developing with beta 1 (or some of the ppl with the post-beta 1 / pre-beta 2 that I send out on request)

This does NOT fix the issue on shutdown that all Unity clients have!!!! But it makes Firefox behave like the others.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 12 guests