Forum General Connection error in Unity

Any issues or discussions relating to Unity development are welcome here.

Connection error in Unity

Postby fakersp » August 15th, 2011, 6:12 am

Hello,

We are developing a game for the UnityWeb plataform using the PlayerIO services. So far, PlayerIO has been working wonderfuly good, but we have been noticing that a few computers simply cannot connect to the server. I will list the issue characteristics (what we have been able to discover so far):

- Not related to playerIO servers: The same PCs were able to connect to playerIO games in the flash platform.
- Not related to firewalls: Firewalls were fully disactivated while trying to connect to the server.
- Not related to browser: Tested in Chrome, Firefox, IE, Opera.
- Not related to OS: We have found the problem in machines running Windows Vista, Windows 7 and Macintosh.
- Problem found in 5 out of 87 machines (5,7%).

This problem is amusing us, since we could not find any relation between the machines where the problem occured. We actually are not sure if the problem is related to PlayerIO (if it is, I imagine it might be related to the client DLL).

Anyway, just wandering if anyone has been through it before or have any tips for us.

Bruno.
fakersp
 
Posts: 11
Joined: March 10th, 2011, 10:00 pm

Re: Connection error in Unity

Postby fakersp » August 17th, 2011, 5:36 am

[Updating] We have gathered some new info:

- The game connects to the server when running in the Unity Editor, but problem persists in WebPlayer.
- Apparently Unity 3 has improved the WebPlayer's Security and since PlayerIO focus in the flash plataform, I'm not sure if the Unity specific code is updated to Unity's current version.

Anyway, I've gathered WebPlayer's logs from both normal and malfunctioning connections (diferent machines):

When analysing the malfunctioning log, remember that I have a Debug.Log() call in both success and error delegates in the Connect method.

Log of a malfunctioning machine:

Code: Select all
110816 23:28:34 ------------------------------------------------------------
110816 23:28:34 Instance starting, version 2.6.1f3_31223
110816 23:28:34 Datafile http://ourserver.com.br/plasmacore/WebPlayer.unity3d
web: player version 3.3.0f4
Direct3D:
    Version:  Direct3D 9.0c [nvd3dum.dll 7.15.11.5609]
    Renderer: NVIDIA MCP67M
    Vendor:   NVIDIA
    VRAM:     64 MB
    Caps:     Shader=30 DepthRT=1 NativeDepth=0 NativeShadow=1 DF16=0 DF24=0 INTZ=0 RAWZ=1 NULL=1 RESZ=0 SlowINTZ=0
web: load mono
Mono path[0] = 'C:/Users/UserName/AppData/LocalLow/Unity/WebPlayer/player/3.x.x/Data/lib'
Mono path[1] = 'C:/Users/UserName/AppData/LocalLow/Unity/WebPlayer/mono/3.x.x/Data/lib'
web: start, src=WebPlayer.unity3d abs=http://ourserver.com.br/plasmacore/WebPlayer.unity3d
Player: init engine
web: sucessfully initialized
110816 23:28:37 loader: start ok
web: parent window change: 2044e 850x525
110816 23:28:45 Times: download 2.4 load 8.6
Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Data\lib\UnityEngine.dll (this message is harmless)
Non platform assembly: data-0785CC50 (this message is harmless)
Non platform assembly: data-0787A258 (this message is harmless)
Non platform assembly: data-0787FA60 (this message is harmless)
Non platform assembly: data-0C8A0048 (this message is harmless)
Non platform assembly: data-0C8BFC50 (this message is harmless)
<I> Initializing (RawInput).

<RI> Input initialized.

desktop: 1280x800 60Hz; virtual: 1280x800 at 0,0
Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\mono\3.x.x\Data\lib\System.Core.dll (this message is harmless)
Changing state: RegisterState
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
StateMachine:UpdateMachine()
GameGUI:Update()

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Data\lib\CrossDomainPolicyParser.dll (this message is harmless)
Successfully connected to Player.IO!
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
<RegisterAccount>c__AnonStoreyB:<>m__16(Client)
PlayerIOClient.<>c__DisplayClass3:<Connect>b__2(ConnectOutput)
PlayerIOClient.Internal.<>c__DisplayClass3:<Connect>b__2(ConnectOutput)
PlayerIOClient.Internal.<call>d__ff`3:MoveNext()

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\mono\3.x.x\Data\lib\System.dll (this message is harmless)
SocketPolicyClient1: Incoming GetPolicyStreamForIP

SocketPolicyClient1: About to BeginConnect to 96.127.154.202:843

SocketPolicyClient1: About to WaitOne

SocketPolicyClient1: Socket connected



Log of a normal machine that successfully connects to the server:

Code: Select all
110815 23:54:44 ------------------------------------------------------------
110815 23:54:44 Instance starting, version 3.3.0f4_63135
110815 23:54:44 Datafile http://ourserver.com.br/plasmacore/WebPlayer.unity3d
web: player version 3.3.0f4
Direct3D:
    Version:  Direct3D 9.0c [nvd3dum.dll 7.15.11.5669]
    Renderer: NVIDIA GeForce 8400M GS
    Vendor:   NVIDIA
    VRAM:     128 MB
    Caps:     Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 DF24=0 INTZ=1 RAWZ=0 NULL=1 RESZ=0 SlowINTZ=0
web: load mono
Mono path[0] = 'C:/Users/UserName/AppData/LocalLow/Unity/WebPlayer/player/3.x.x/Data/lib'
Mono path[1] = 'C:/Users/UserName/AppData/LocalLow/Unity/WebPlayer/mono/3.x.x/Data/lib'
Waiting for connection from host...
Timed out. Continuing without host connection.
web: start, src=WebPlayer.unity3d abs=http://ourserver.com.br/plasmacore/WebPlayer.unity3d
Player: init engine
web: sucessfully initialized
110815 23:54:50 loader: start ok
web: parent window change: 37c0758 850x525
110815 23:55:05 Times: download 0.8 load 21.0
Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Data\lib\UnityEngine.dll (this message is harmless)
Non platform assembly: data-0D5A0D50 (this message is harmless)
Non platform assembly: data-0D594270 (this message is harmless)
Non platform assembly: data-0D5BF348 (this message is harmless)
Non platform assembly: data-0E650048 (this message is harmless)
Non platform assembly: data-0D601640 (this message is harmless)
<I> Initializing (RawInput).

<RI> Input initialized.

desktop: 1280x800 60Hz; virtual: 2560x800 at -1280,0
Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\mono\3.x.x\Data\lib\System.Core.dll (this message is harmless)
Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Data\lib\CrossDomainPolicyParser.dll (this message is harmless)
Successfully connected to Player.IO!
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
<ConnectToLobby>c__AnonStorey9:<>m__14(Client)
PlayerIOClient.<>c__DisplayClass3:<Connect>b__2(ConnectOutput)
PlayerIOClient.Internal.<>c__DisplayClass3:<Connect>b__2(ConnectOutput)
PlayerIOClient.Internal.<call>d__ff`3:MoveNext()

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Platform assembly: C:\Users\UserName\AppData\LocalLow\Unity\WebPlayer\mono\3.x.x\Data\lib\System.dll (this message is harmless)
SocketPolicyClient1: Incoming GetPolicyStreamForIP

SocketPolicyClient1: About to BeginConnect to 96.127.166.106:843

SocketPolicyClient1: About to WaitOne

SocketPolicyClient1: Socket connected

Message Received: LoginSuccess

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Joined The Lobby.

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Message Received: AllPlayers

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Message Received: PlayerName

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Message Received: PlayerJoined

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

Changing state: LobbyState
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
StateMachine:UpdateMachine()
GameGUI:Update()

(Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/ExportGenerated/WebPlayer/BaseClass.cpp Line: 2505)

110815 23:55:38 Closing plugin window
web: shutdown player
web: shutdown finished
110815 23:55:38 loader: final cleanup
110815 23:55:38 loader: unload unity dll


Thanks in advance o/
Bruno.
fakersp
 
Posts: 11
Joined: March 10th, 2011, 10:00 pm

Re: Connection error in Unity

Postby Oliver » August 29th, 2011, 9:38 pm

Hey Bruno,

From the looks of it, it seems more like some sort of weird internal timing issue inside Unity at the point where we interact with it.

Is it possible to get some sort of access to a machine that always reproduces this error, or is there a way that i can force my own machine into behaving like this. If we can reproduce it, we can fix it.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Connection error in Unity

Postby fakersp » August 29th, 2011, 10:02 pm

Hey Oliver,

I tried to reproduce this error in my computer, but I couldn't. Since we are from Brazil, the only way of giving you access to a machine that allways reproduce this error is through remote access.

If you want to try this approach, I will contact one of the owners of a machine that reproduces this error. Remembering that these machines were only testing the game, it would be great if you could give me a list of softwares to install before we try anything.

If remote access is not a viable option, you could test our game in your machines and hope that one of them reproduces the error =P

You can access our latest build in http://nuclearsquad.com.br/plasmacore/

Not sure if this will work, but thanks for your concern.
Bruno.

Edit: Lately we've confirmed that the machines can connect to regular PlayerIO services (BigDB, GameFS), but they fail to connect to the game rooms.
fakersp
 
Posts: 11
Joined: March 10th, 2011, 10:00 pm

Re: Connection error in Unity

Postby Oliver » August 29th, 2011, 10:37 pm

Hey,

It seems like we might be in luck, when i register and click the newGame button, it just hangs. Although, i can chat in the lobby... How do i know if it works or not?

Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Connection error in Unity

Postby fakersp » August 29th, 2011, 10:46 pm

Hey,

Unfortunately we have changed our game structure in this last build and you cannot create game rooms, which means that if you can access the lobby, you are not experiencing the error =/

Bruno.
fakersp
 
Posts: 11
Joined: March 10th, 2011, 10:00 pm

Re: Connection error in Unity

Postby Oliver » August 29th, 2011, 10:50 pm

Are you printing out "Message Received: LoginSuccess" ? Ie, is "LoginSuccess" a message you're sending out?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Connection error in Unity

Postby fakersp » August 30th, 2011, 1:24 am

Yes, that's a message that I print when the user connects to the lobby room.

Bruno.
fakersp
 
Posts: 11
Joined: March 10th, 2011, 10:00 pm

Re: Connection error in Unity

Postby Oliver » August 31st, 2011, 8:09 pm

Could it be possible that some sort of logic in your serverside code is preventing the LoginSuccess message from being sent?

Could you try adding a player.Send("UserJoined") as the very first thing inside the UserJoined(...) method on the serverside ?

Just an idea

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to General



cron