thanks for following and tracking the issue,
in my case both the editor and standalone .exe windows app crashes/freezes too when server is disconnected.
Unity client freezes when disconnected by server.
Re: Unity client freezes when disconnected by server.
UPDATE: I've done a little more testing on this issue and I think that there's an effective workaround, which is to properly handle the quit event via the Unity OnApplicationQuit method, which is called right before the Editor (or WebPlayer) is stopped/closed.
I've tested the Lobby example we provide by adding this code:
and it seems to be working correctly in the Editor, using Windows 8.
Give it a try and let us know if it solves the issue.
Thanks
I've tested the Lobby example we provide by adding this code:
Code: Select all
void OnApplicationQuit()
{
if (smartFox.IsConnected)
smartFox.Disconnect()
}
and it seems to be working correctly in the Editor, using Windows 8.
Give it a try and let us know if it solves the issue.
Thanks
Re: Unity client freezes when disconnected by server.
Hi,
We were already doing this before as I've seen the related post, and it doesn't help unfortunately..
We were already doing this before as I've seen the related post, and it doesn't help unfortunately..
Re: Unity client freezes when disconnected by server.
If this is the case there should be something else going on.
I finished testing our Lobby example adding the OnApplicationQuit() code and exported to a native binary under Windows 8 and Windows 7 64bit and they all work as expected, with no errors or application hangs etc...
At this point my suspect is that there might be something else going on in your application that causes the issue.
Thanks
I finished testing our Lobby example adding the OnApplicationQuit() code and exported to a native binary under Windows 8 and Windows 7 64bit and they all work as expected, with no errors or application hangs etc...
At this point my suspect is that there might be something else going on in your application that causes the issue.
Thanks
Re: Unity client freezes when disconnected by server.
May I ask what exactly is the scenario that you are testing? Just to recap this is our scenario:
- Connect to the server
- Login to a zone
- Kill the server
- Quit the Unity application in the Editor
- Attempt to Start the Unity application in the Editor
- Editor hangs
- Connect to the server
- Login to a zone
- Kill the server
- Quit the Unity application in the Editor
- Attempt to Start the Unity application in the Editor
- Editor hangs
Re: Unity client freezes when disconnected by server.
Yes, exactly same scenario.
Tested right now using Unity Editor 4.1.2, under Win7-64 and Win8. Works without hanging.
Tested right now using Unity Editor 4.1.2, under Win7-64 and Win8. Works without hanging.
Re: Unity client freezes when disconnected by server.
Hmmm.. This is going to be really hard to track down..
Re: Unity client freezes when disconnected by server.
Unfortunately yes
There could be something else in your code that is causing the the issue.
There could be something else in your code that is causing the the issue.
Re: Unity client freezes when disconnected by server.
Sooo I think I know what's wrong. At some point you mentioned that this might be a UDP issue. And indeed, I am no longer calling InitUDP when I initialize the server and the problem disappears... Of course we need UDP for our game so we can't stop using it but this seems to be the issue.
You mentioned that the Lobby example works, however the Lobby example does not use UDP. Perhaps you could try an example that does?
You mentioned that the Lobby example works, however the Lobby example does not use UDP. Perhaps you could try an example that does?
Re: Unity client freezes when disconnected by server.
I have added UDP to the Lobby Example to make the full test and I have no problems with it as well.
Who is online
Users browsing this forum: No registered users and 20 guests