[FIXED] IE & Firefox crash with unity 2.5

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

Moderators: Lapo, Bax

alia
Posts: 11
Joined: 26 Mar 2009, 15:27

[FIXED] IE & Firefox crash with unity 2.5

Postby alia » 26 Mar 2009, 15:36

First up, great work with this! Just started with this last week.. and damn it makes it easy.

Anyway my process is something like this:

1. Login
2. Use ProcessQueuedEvents in Update()
3. Deregister event handlers and Logout
4. Close tab
5. No profit!!! Actually it crashes the browser after a few seconds.

[Edit]
Any chance this is related to the previous crashes reported here or more likely a new 2.5 bug?

Cheers,

A.
Last edited by alia on 26 Mar 2009, 19:24, edited 1 time in total.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 26 Mar 2009, 15:58

Hey

Does this happen with your game, or with one of the examples/tutorials? Windows or Mac?

In general - Firefox crashes in any Unity program where a null pointer exception is thrown. Its internal exception handling sucks :-)

If you can, try to run the game in Safari and look in the player log. It should handle the exception nicely and even report where it came from!

/Thomas
alia
Posts: 11
Joined: 26 Mar 2009, 15:27

Postby alia » 26 Mar 2009, 16:49

ThomasLund wrote:Hey

Does this happen with your game, or with one of the examples/tutorials? Windows or Mac?

Windows only :( my own app.. ill fire up the examples and see if we cant reproduce it.

ThomasLund wrote:In general - Firefox crashes in any Unity program where a null pointer exception is thrown. Its internal exception handling sucks :-)


Yeah i thought as much - havent been able to get any logs though.

ThomasLund wrote:If you can, try to run the game in Safari and look in the player log. It should handle the exception nicely and even report where it came from!


Yeah safari is nice.. ... and yay it crashed.. not sure what GLib is in this case... Glib/GTK?

Code: Select all

090326 11:03:50 Closing plugin window
web: shutdown player
Cleanup player
GLib: Cannot convert message: Conversion from character set 'UTF-8' to 'CP1252' is not supported

** (Safari.exe:3852): WARNING **: Aborting of threads in domain UnityRuntimeDomain timed out.
Exception unloading domain
web: shutdown finished
090326 11:04:00 loader: final cleanup
090326 11:04:00 loader: unload unity dll
090326 11:04:00 Instance 9428f3a5ccc4654e876638ed5e4cee85 shutting down
[/code]
alia
Posts: 11
Joined: 26 Mar 2009, 15:27

Postby alia » 26 Mar 2009, 19:26

I added a Disconnect() after the Logout() and its all good.

Code: Select all

void OnApplicationQuit()
{
   smartFox.Logout();
   smartFox.Disconnect();
}



Cheers,

Alia
:D
Last edited by alia on 26 Mar 2009, 19:42, edited 1 time in total.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 26 Mar 2009, 19:33

Do you have an onApplicationQuit() - or what it exactly is called (from top of my head). You could also add a Disconnect there.

If the tutorials work on your machine, then try to look in them and mimic what they do.

I havent tested the tutorials on a Windows with 2.5 (API released before 2.5). So would be nice to know if there is an issue there
alia
Posts: 11
Joined: 26 Mar 2009, 15:27

Postby alia » 26 Mar 2009, 19:42

ThomasLund wrote:Do you have an onApplicationQuit() - or what it exactly is called (from top of my head). You could also add a Disconnect there.

If the tutorials work on your machine, then try to look in them and mimic what they do.

I havent tested the tutorials on a Windows with 2.5 (API released before 2.5). So would be nice to know if there is an issue there


heh i just finished editing it into my reply!

Thanks!

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

Postby ThomasLund » 26 Mar 2009, 19:48

Super!!

Very happy that it fixed it for you.

Dont hesitate to post again if you run into issues

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 23 guests