Page 3 of 9
Posted: 19 Nov 2010, 15:19
by tpenn
For what it's worth, I just started implementing UDP in my own project after updating to RC-1a.
The unity shutdown problem exists only if SmartFox.InitUDP is called. It doesn't matter if anything is actually sent via UDP, just initting it is enough for the issue to occur. If I do not init UDP, it shuts down fine.
I've noticed that although I only call InitUDP once, I am seeing the UDP_INIT event firing 2-3 times. While I wasn't using UDP before so I can't say what was normal, that doesn't seem quite right.
Posted: 19 Nov 2010, 17:31
by ThomasLund
When I get back from my trip, I will take a closer look at the UDP part.
Something you can do in your end for testing is to comment out the UDP.
This is done simply by commenting the InitUDP in the lobby code, and then for the networkmanager, remove the "true" boolean for transformation sending.
If that makes things non-crashy, then we found the culprit. I wont have time until next weekend to trace it deeper though. Thanks for your understanding, and test away while I'm gone!! Already several good findings that will make the example even better
/Thomas
Posted: 19 Nov 2010, 23:30
by GRIM2594
ThomasLund wrote:Something you can do in your end for testing is to comment out the UDP.
This seems to prevent the crash for me... Although more testing is needed.

Posted: 20 Nov 2010, 02:45
by appels
yes, disabled udp and works fine now.
Posted: 20 Nov 2010, 08:01
by ThomasLund
OK - thanks for quick tests. Seems I fucked up the disconnect code for UDP in the API.
Will take a closer look at that ASAP (after this weeks trip most likely)
/Thomas
Posted: 20 Nov 2010, 09:38
by appels
enjoy the trip

Posted: 21 Nov 2010, 09:07
by vooood
I don't get one thing though. Why is the player jumping when walking forward and looking up?

Posted: 21 Nov 2010, 09:16
by ThomasLund
He thinks he is playing Tribes 2, but too dump to realize his jump pack is out of juice?

Posted: 29 Nov 2010, 10:29
by luxe001
Ciao Lapo sono un connazionale

(per condivisione pero' scrivero' in inglese)...
I use the version of Unity 3.1, and I must say that I can not start your demo because, when I go to run-time in Game panel gives me the login screen, it connects, it connects, but it goes stops them.
...what i can do ?
Posted: 29 Nov 2010, 11:03
by ThomasLund
tpenn wrote:I've noticed that although I only call InitUDP once, I am seeing the UDP_INIT event firing 2-3 times. While I wasn't using UDP before so I can't say what was normal, that doesn't seem quite right.
Issue fixed in next release! Thanks
/Thomas
Posted: 29 Nov 2010, 14:23
by ThomasLund
luxe001 wrote:Ciao Lapo sono un connazionale

(per condivisione pero' scrivero' in inglese)...
I use the version of Unity 3.1, and I must say that I can not start your demo because, when I go to run-time in Game panel gives me the login screen, it connects, it connects, but it goes stops them.
...what i can do ?
Are you running in editor or webplayer? For webplayer did you add the Security.PrefetchPolicy? Any errors in the console?
Etc
/Thomas
Posted: 29 Nov 2010, 20:41
by luxe001
ThomasLund wrote:luxe001 wrote:Ciao Lapo sono un connazionale

(per condivisione pero' scrivero' in inglese)...
I use the version of Unity 3.1, and I must say that I can not start your demo because, when I go to run-time in Game panel gives me the login screen, it connects, it connects, but it goes stops them.
...what i can do ?
Are you running in editor or webplayer? For webplayer did you add the Security.PrefetchPolicy? Any errors in the console?
Etc
/Thomas
Well,
i' into Unity Editor, and when i go on Debug (Play) on game window i write nickname, but gam not start..... System write:
Code: Select all
UDP error:
UnityEngine.Debug:Log(Object)
LobbyGUI:OnUdpInit(BaseEvent) (at Assets/Lobby/Scripts/LobbyGUI.cs:141)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LobbyGUI:FixedUpdate() (at Assets/Lobby/Scripts/LobbyGUI.cs:83)
Posted: 29 Nov 2010, 20:43
by ThomasLund
Did you enable UDP on the server as described in the tutorial documentation?
It seems as if there is no UDP connection to the server, which could be because the server isnt UDP enabled.
/Thomas
Posted: 01 Dec 2010, 05:51
by ThomasLund
There is a new temporary dll build, which seems to fix crashes on shutting down.
Its still not fully tested - but you can download and give it a spin here:
http://www.fullcontrol.dk/downloads/SFS ... 101130.dll
As soon as its confirmed from more people that the issue is solved, then the original demo will be repackaged with this fix.
Thanks and sorry for the trouble
/Thomas
Posted: 03 Dec 2010, 06:45
by belltzaser
PAX wrote:This code exists in SmartFoxConnection.cs in game scene.
Then I try to start new game, I see next screen:

And console show error:
Code: Select all
[SFS DEBUG] TCPSocketLayer: General error reading data from socket: Read failure at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
at Sfs2X.Core.Sockets.TCPSocketLayer.Read () [0x00000] in <filename unknown>:0
I have exactly the same screen as soon as I Join a room from any of the instances. I am running it from Windows 7.
The debug log shows the Scene "game" loading, but, I get the crosshair on top of the gui, and a countdown in gray on the top left as per PAXs' screen.