- Home /
Crash when closing our game in WebPlayer builds
Hi,
We have a bug where unity crashes Firefox when one closes the tab that it's running in. It seems to be a null reference error, but I can't seem to find more specific information about it in the logs. Any ideas on how to track this down? Or is this a known issue that may be addressed in future versions?
Thanks, Adam
Answer by Mike 3 · Nov 04, 2010 at 01:03 AM
With 2.6, crashing on exit was generally a sign that you were messing up something thread based (usually not cleaning them up properly), whether it be through asynchronous sockets or your own threads
I'm guessing that it most likely won't have changed, that kind of thing should be an error regardless of the unity api used
Either way - check for any use of threads in your code, e.g. System.Timers.Timer, System.Threading, or anything with async callbacks
Answer by Adam 8 · Nov 04, 2010 at 08:59 PM
Thanks for the input, Mike, it pointed me to the cause: not calling MasterServer.UnregisterHost() in OnApplicationQuit(). We were mistakenly calling MasterServer.UnregisterHost() in a destructor.
Your answer
Follow this Question
Related Questions
Unity 3D Keep Crashing in every site! 1 Answer
Does c# Marshaling work in the webplayer? 1 Answer
Crash in build when reloading level with a Sprite Renderer in the scene 0 Answers
Unity5.1.2f crash every time when trying to open project screen 1 Answer
Web browser is crashed every time when moving tofrom the page containing the unity web plugin. 2 Answers