Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - masterhyjinx

Pages: [1] 2
1
Of course it occurs to me AFTER I post that perhaps I should unplug my Oculus Rift.  It IS off but I wonder if... oh son of a.  The texture picking window was popping up on my Oculus rift display (That wasn't even on) and not on my other two monitors I was actually using.  Nothing to see here people.  Sorry about the post.

2
NGUI 3 Support / Can't select any atlas images in Widget Tool (Solved)
« on: August 10, 2013, 04:53:54 AM »
I'm having an odd issue I can't figure out and I don't see it posted anywhere.  I cannot select any images to use in the Widget Tool when creating widgets.  I've created my UI, set up layers and tagged the appropriate items.  I created an atlas and when I go to the widget tool, select progress bar (or anything where you pick the image) and when I click the drop downs, nothing drops down.  I've tried recreating the atlases, re-installing NGUI and Unity.  I even opened the example scenes and attempted to create new widgets there and those are broken in the same way.  The following images show what I mean.  One field says "Dark" but I can't change it (Using the Sci Fi atlas) and the other field is blank.  If I click either one, nothing happens.

I rolled back to a project using NGUI 2.6.2 where I knew it was working and it's the same issue.  Is this a problem with Unity 4.2?  I'm going to try to boot my broken laptop and try on that.

I have Unity 4.2 and NGUI 2.6.4 running on OS X.

3
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 09, 2013, 05:19:45 PM »
I understand.  Right now my naughty DLink router is just sitting there because I've replaced it.  Where do you live?  Would you like me to ship you a router that doesn't play well with TNet so that you have a better chance of diagnosing problems and fixing them?  I'd only ask that you ship it back to me when you're done :)

4
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 09, 2013, 01:08:11 PM »
Well luckily for me I can't tell my clients the same thing if they don't have supported hardware.  I understand networking is probably one of the most difficult programming endeavors to get right.  I understand a lot of work has been put into TNet on topics I'm not completely familiar with and I like the ease of use of TNet but I have to ask, how many other devices are unsupported?  It would be unfortunate if we chose TNet to deploy a match making server after this demo and find that multiple users cannot connect and start a network game when pretty much every other piece of software on their machine works fine.

5
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 08, 2013, 02:59:45 AM »
I was at a friend's house doing some programming.  This issue cropped up again.  I was using my Macbook Pro in OS X, he uses the brand new Apple Airport Extreme as his router.  Verified it in the example menu project as well.  If I launch the server in the Example Menu, stopping the server caused an indefinite hang.  Launching the server via terminal in OS X would result in the External IP and Internal IP being displayed but then the program would stop there.  The gateway would never resolve and no client could actually connect to it.  Oddly enough, if I booted into Windows 8, and launched the server via command prompt, it worked fine.

Aside from that we were having a myriad of issues all around.  Including if one computer starts the server we can all connect, but if another were to start it, no one can connect.  Is there something hardware wise we need to be looking for that would prevent TNet from working?  Is there something on my system that could be screwing TNet up?

6
TNet 3 Support / Re: Questions about Auto Starting a Server
« on: August 07, 2013, 10:44:53 PM »
Right.  I never explicitly said that this was going be a LAN situation.  That's my bad.  Thanks for the replies pyscho2day, I need to stop posting at 4 a.m.  4 stations are going to be set up on their own network at a trade show.  I've been working with TNet and it seems the best way is to  just:
  • When the game starts, wait for a small amount of time, say 10 seconds,
  • During that time, wait to see the lobby server reports a server running,
  • If a server shows up, just join it and either set up a new game or join one,
  • If the 10 second timer expires, so no server has been detected, start one up.

I'm still pretty sure that there will be race conditions doing it this way. 

pyscho2day, you are right if this was going to be running over the internet.  Fortunately, we aren't doing that for this demo, ESPECIALLY at a trade show where a reliable internet connection is as rare as a Unicorn.  Thanks.

7
TNet 3 Support / Re: Questions about Auto Starting a Server
« on: August 06, 2013, 03:31:40 PM »
I created a scrip that does this.  You just need to have a master server ( the standalone server ) running. then you set the script to query the MS to see if any games are running. If it doesn't find one it will then create one.  You can change how many players can join as well.  Its not a masterpiece but it will do what you are looking for.  If you have any questions about it just ask in the thread and i will do my best to help.

http://www.tasharen.com/forum/index.php?topic=5089.0

As I stated above, I am attempting to set it up so that the first client starts the server (Lobby and Game) and use a paradigm where the clients won't accidentally do it themselves after the server has been started.  I cannot assume the people showing the demo even know how to launch a server via terminal so I don't want to rely on that.  I will if I have to but it would be optimal the way I describe in the original post.

8
TNet 3 Support / Questions about Auto Starting a Server
« on: August 06, 2013, 02:01:39 AM »
So what I'm trying to do is set up multiple stations (at least 4) so that the following happens:

  • The first computer to fire up the game and starts it, detects that there is no server (or lobby) and then fires up both
  • The next computer that starts the game will check to see if the server has been started.  Since it has, it joins it and joins the first player in a game
  • The third computer starts the game and after checking, sees that a server has been started but the first game has two players already so it starts a new channel with a new multiplayer game
  • The forth computer starts the game, sees the server and sees player 3 waiting for an opponent so it joins that game.
  • After a game is done, the game will return to the title screen and wait for anyone to "start" the game again in which the process continues pairing up players to play a multiplayer game

This is for a trade show event where we will not be present so it would be optimal if they didn't have to fire up the server themselves and instead the game would do it.  The issues I've been running into so far is that I notice that if I check for a lobby OnStart(), any given client doesn't see the lobby running right away.  I was thinking of putting a timer for each client to wait for the network to initialize before querying the lobby, but I'm nervous about this solution because if the network is busy, I wouldn't know how long to wait.  If I screw it up, two clients start servers which is bad.  I'm sure there is a more elegant solution to this but I don't know what it is quite yet.  This is my first network programming project so I would appreciate any help/advice.


9
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 05, 2013, 01:54:21 AM »
I'm not sure.  The pause is before the DeletePortMapping occurs.  I wish I understood more networking at this point because swapping out routers fixes the issue so the after mucking with it and experimenting the Scientific Method leaves me to believe that the DLink router is the issue or it's interaction with my two particular computers is the issue.

So at this point we either move on (which is a total bummer because it isn't solved), continue to debug like this if you have any ideas, OR I send you this router so you can look at it yourself.  I'm starting to get the feeling after all this that the problem is external to your code.

10
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 04, 2013, 02:54:48 PM »
So what is your assessment Arenmook?  Is the DLink DIR-826L a piece of junk?  It's brand new unfortunately.  I don't invest TOO much into routers because it seems I have to replace them each year.

The guys I'm doing this for replaced my router for the time being with an Asus Dual-Band Wireless-AC1750 router:  http://www.asus.com/us/Networking/RTAC66U

After hooking it up and doing basic configuration I tested it.  Works great, server in terminal and in Unity.  No hangs.  Here's the output:

  1. AddPortMapping -- Time Before Response: 08/04/2013 12:44:34.041 PM
  2.  
  3. AddPortMapping -- Time Before Response: 08/04/2013 12:44:34.044 PM
  4.  
  5. AddPortMapping -- Time Before Response: 08/04/2013 12:44:34.041 PM
  6.  
  7.  
  8. AddPortMapping -- Response:
  9. <?xml version="1.0"?>
  10. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body></s:Envelope>
  11.  Time After Response: 08/04/2013 12:44:34.049 PM
  12.  
  13.  
  14. AddPortMapping -- Response:
  15. <?xml version="1.0"?>
  16. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body></s:Envelope>
  17.  Time After Response: 08/04/2013 12:44:34.049 PM
  18.  
  19.  
  20. AddPortMapping -- Response:
  21. <?xml version="1.0"?>
  22. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body></s:Envelope>
  23.  Time After Response: 08/04/2013 12:44:34.054 PM
  24.  
  25.  
  26. Stop the server a few seconds later:
  27.  
  28.  
  29. DeletePortMapping -- Time Before Response: 08/04/2013 12:44:41.565 PM
  30. UnityEngine.Debug:Log(Object)
  31.  
  32.  
  33. DeletePortMapping -- Response:
  34. <?xml version="1.0"?>
  35. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:DeletePortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:DeletePortMappingResponse></s:Body></s:Envelope>
  36.  Time After Response: 08/04/2013 12:44:41.570 PM
  37.  
  38. DeletePortMapping -- Time Before Response: 08/04/2013 12:44:41.572 PM
  39.  
  40.  
  41. DeletePortMapping -- Response:
  42. <?xml version="1.0"?>
  43. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:DeletePortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:DeletePortMappingResponse></s:Body></s:Envelope>
  44.  Time After Response: 08/04/2013 12:44:41.579 PM
  45.  
  46.  
  47. DeletePortMapping -- Time Before Response: 08/04/2013 12:44:41.581 PM
  48.  
  49.  
  50. DeletePortMapping -- Response:
  51. <?xml version="1.0"?>
  52. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:DeletePortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:DeletePortMappingResponse></s:Body></s:Envelope>
  53.  Time After Response: 08/04/2013 12:44:41.585 PM

From terminal:

  1. $ mono TNServer.exe -name "Jay Server" -tcp 5127 -udp 5128 -udpLobby 5129
  2. IP Addresses
  3. ------------
  4. External: 67.5.151.146
  5. Internal: 192.168.1.9
  6. Gateway:  192.168.1.1
  7.  
  8. UDP Lobby Server started on port 5129
  9. Game server started on port 5127
  10. Press 'q' followed by ENTER when you want to quit.
  11. UPnP: UDP port 5129 was opened successfully.
  12. UPnP: TCP port 5127 was opened successfully.
  13. UPnP: UDP port 5128 was opened successfully.
  14. q
  15. Shutting down...
  16. There server has shut down. Press ENTER to terminate the application.

11
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 04, 2013, 02:19:55 PM »
So now the code reads as:
  1. try
  2.                 {
  3.                         for (int i = 0; i < repeat; ++i)
  4.                         {
  5.                                 WebRequest web = HttpWebRequest.Create(mControlURL);
  6.                                 web.Timeout = timeout;
  7.                                 web.Method = "POST";
  8.                                 web.Headers.Add("SOAPACTION", "\"urn:schemas-upnp-org:service:" + mServiceType + ":1#" + action + "\"");
  9.                                 web.ContentType = "text/xml; charset=\"utf-8\"";
  10.                                 web.ContentLength = b.Length;
  11.                                 web.GetRequestStream().Write(b, 0, b.Length);
  12.                                 UnityEngine.Debug.Log(action + " --" + " Time Before Response: " + DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
  13.                                 response = Tools.GetResponse(web);
  14.                                 UnityEngine.Debug.Log(action + " --" +" Response:\n" + response + "\n Time After Response: " + DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
  15.                                 if (!string.IsNullOrEmpty(response))
  16.                                         return response;
  17.                         }
  18.                 }

This morning, with everyone asleep and no on on the router.  I noticed that the hang wasn't as long as it was yesterday, maybe 30-45 seconds?  Maybe current use has some factor (Starting to think I should just chuck the old router out the window).  So two things happened.  This morning after putting those prints in, I noticed that if I start the server, then waited a few seconds, then stopped it I didn't receive any more output, there was still a hang but no more output.  The "DeletePortMapping" events never occurred.  So this time I waited until I saw a few more AddPortMappings to my output, THEN I stopped the server and the game hung.

Here's all the output:

  1. AddPortMapping -- Time Before Response: 08/04/2013 12:04:25.349 PM
  2.  
  3.  
  4. AddPortMapping -- Time Before Response: 08/04/2013 12:04:25.354 PM
  5.  
  6.  
  7. AddPortMapping -- Time Before Response: 08/04/2013 12:04:25.349 PM
  8.  
  9.  
  10. AddPortMapping -- Response:
  11.  Time After Response: 08/04/2013 12:04:25.357 PM
  12.  
  13.  
  14. AddPortMapping -- Response:
  15.  Time After Response: 08/04/2013 12:04:35.361 PM
  16.  
  17.  
  18. AddPortMapping -- Response:
  19.  Time After Response: 08/04/2013 12:04:35.361 PM
  20.  
  21.  
  22. AddPortMapping -- Time Before Response: 08/04/2013 12:04:35.363 PM
  23.  
  24.  
  25. AddPortMapping -- Time Before Response: 08/04/2013 12:04:35.364 PM
  26.  
  27. AddPortMapping -- Response:
  28.  Time After Response: 08/04/2013 12:04:35.368 PM
  29.  
  30.  
  31. AddPortMapping -- Time Before Response: 08/04/2013 12:04:35.369 PM
  32.  
  33.  
  34. AddPortMapping -- Response:
  35. <?xml version="1.0" encoding="UTF-8"?>
  36. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body></s:Envelope>
  37.  
  38.  Time After Response: 08/04/2013 12:04:35.376 PM
  39.  
  40.  
  41. AddPortMapping -- Response:
  42.  Time After Response: 08/04/2013 12:04:45.371 PM
  43.  
  44.  
  45. DeletePortMapping -- Time Before Response: 08/04/2013 12:04:54.623 PM
  46. UnityEngine.Debug:Log(Object)
  47. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  48. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  49. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  50. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  51. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  52. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  53. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  54. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  55. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  56. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  57.  
  58.  
  59. DeletePortMapping -- Response:
  60.  Time After Response: 08/04/2013 12:05:04.629 PM
  61. UnityEngine.Debug:Log(Object)
  62. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  63. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  64. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  65. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  66. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  67. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  68. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  69. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  70. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  71. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  72.  
  73.  
  74. DeletePortMapping -- Time Before Response: 08/04/2013 12:05:04.638 PM
  75. UnityEngine.Debug:Log(Object)
  76. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  77. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  78. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  79. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  80. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  81. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  82. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  83. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  84. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  85. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  86.  
  87.  
  88. DeletePortMapping -- Response:
  89.  Time After Response: 08/04/2013 12:05:14.639 PM
  90. UnityEngine.Debug:Log(Object)
  91. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  92. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  93. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  94. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  95. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  96. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  97. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  98. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  99. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  100. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  101.  
  102.  
  103. DeletePortMapping -- Time Before Response: 08/04/2013 12:05:14.657 PM
  104. UnityEngine.Debug:Log(Object)
  105. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  106. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  107. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  108. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  109. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  110. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  111. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  112. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  113. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  114. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  115.  
  116.  
  117. DeletePortMapping -- Response:
  118.  Time After Response: 08/04/2013 12:05:24.659 PM
  119. UnityEngine.Debug:Log(Object)
  120. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  121. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  122. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  123. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  124. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  125. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  126. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  127. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  128. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  129. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  130.  
  131.  
  132. DeletePortMapping -- Time Before Response: 08/04/2013 12:05:24.663 PM
  133. UnityEngine.Debug:Log(Object)
  134. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  135. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  136. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  137. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  138. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  139. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  140. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  141. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  142. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  143. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  144.  
  145.  
  146. DeletePortMapping -- Response:
  147. <?xml version="1.0" encoding="UTF-8"?>
  148. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:DeletePortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:DeletePortMappingResponse></s:Body></s:Envelope>
  149.  
  150.  Time After Response: 08/04/2013 12:05:24.673 PM
  151. UnityEngine.Debug:Log(Object)
  152. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  153. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  154. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  155. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  156. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  157. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  158. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  159. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  160. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  161. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  162.  
  163.  
  164. DeletePortMapping -- Time Before Response: 08/04/2013 12:05:24.691 PM
  165. UnityEngine.Debug:Log(Object)
  166. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  167. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  168. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  169. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  170. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  171. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  172. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  173. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  174. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  175. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  176.  
  177.  
  178. DeletePortMapping -- Response:
  179.  Time After Response: 08/04/2013 12:05:34.693 PM
  180. UnityEngine.Debug:Log(Object)
  181. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  182. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  183. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  184. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  185. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  186. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  187. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  188. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  189. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  190. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  191.  
  192.  
  193. DeletePortMapping -- Time Before Response: 08/04/2013 12:05:34.697 PM
  194. UnityEngine.Debug:Log(Object)
  195. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  196. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  197. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  198. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  199. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  200. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  201. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  202. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  203. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  204. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  205.  
  206.  
  207. DeletePortMapping -- Response:
  208.  Time After Response: 08/04/2013 12:05:44.699 PM
  209. UnityEngine.Debug:Log(Object)
  210. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  211. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  212. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  213. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  214. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  215. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  216. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  217. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  218. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  219. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  220.  
  221.  
  222. DeletePortMapping -- Time Before Response: 08/04/2013 12:05:44.708 PM
  223. UnityEngine.Debug:Log(Object)
  224. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:314)
  225. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  226. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  227. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  228. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  229. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  230. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  231. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  232. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  233. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  234.  
  235.  
  236. DeletePortMapping -- Response:
  237.  Time After Response: 08/04/2013 12:05:54.709 PM
  238. UnityEngine.Debug:Log(Object)
  239. TNet.UPnP:SendRequest(String, String, Int32, Int32) (at Assets/TNet/Common/TNUPnP.cs:316)
  240. TNet.UPnP:SendRequest(ExtraParams) (at Assets/TNet/Common/TNUPnP.cs:465)
  241. TNet.UPnP:CloseRequest(Object) (at Assets/TNet/Common/TNUPnP.cs:457)
  242. TNet.UPnP:Close(Int32, Boolean, OnPortRequest) (at Assets/TNet/Common/TNUPnP.cs:435)
  243. TNet.UPnP:Close() (at Assets/TNet/Common/TNUPnP.cs:134)
  244. TNServerInstance:Disconnect() (at Assets/TNet/Client/TNServerInstance.cs:263)
  245. TNServerInstance:Stop() (at Assets/TNet/Client/TNServerInstance.cs:229)
  246. TNServerInstance:Stop(String) (at Assets/TNet/Client/TNServerInstance.cs:240)
  247. ExampleMenu:DrawConnectMenu() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:128)
  248. ExampleMenu:OnGUI() (at Assets/TNet/Examples/Scripts/ExampleMenu.cs:77)
  249.  

12
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 04, 2013, 03:49:13 AM »
Inside the try block in SendRequest I put a Debug.Log for the response like so:
  1. try
  2.                 {
  3.                         for (int i = 0; i < repeat; ++i)
  4.                         {
  5.                                 WebRequest web = HttpWebRequest.Create(mControlURL);
  6.                                 web.Timeout = timeout;
  7.                                 web.Method = "POST";
  8.                                 web.Headers.Add("SOAPACTION", "\"urn:schemas-upnp-org:service:" + mServiceType + ":1#" + action + "\"");
  9.                                 web.ContentType = "text/xml; charset=\"utf-8\"";
  10.                                 web.ContentLength = b.Length;
  11.                                 web.GetRequestStream().Write(b, 0, b.Length);
  12.                                 response = Tools.GetResponse(web);
  13.                                 UnityEngine.Debug.Log("Response:\n" + response);
  14.                                 if (!string.IsNullOrEmpty(response))
  15.                                         return response;
  16.                         }
  17.                 }

Here's the list of responses I got for opening MainMenu, starting the server and then stopping it.

  1. Response:
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body></s:Envelope>
  4.  

  1. Response:
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body></s:Envelope>
  4.  

Then I clicked stop the local server.  None of the following messages appeared until after Unity un-froze.

  1. Response:
  2.  

  1. Response:
  2.  

  1. Response:
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:DeletePortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:DeletePortMappingResponse></s:Body></s:Envelope>
  4.  

  1. Response:
  2.  

  1. Response:
  2.  

  1. Response:
  2.  

  1. Response:
  2.  

  1. Response:
  2.  

  1. Response:
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:DeletePortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:DeletePortMappingResponse></s:Body></s:Envelope>
  4.  

I tried this a couple more times and it seems the order I get them in is a little different.  Is this the sort of output you expect?  Can I get some more information?  The guys I'm doing this for already got me a new router to use for this project.  I'll be setting this one up but I'll leave the old one here just in case I need to test something for you.

13
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 03, 2013, 09:19:18 PM »
Ok, status update.  After mucking with it all day, it appears that the culprit is the way the server interacts with my router.  My router, the DLink DIR-826L and its line of routers apparently have a spotty record when it comes to uPnP.  (Maybe all routers do?)  Anyways, I tested 2 other routers and the hangs do not occur.  Everything runs fine.  One router isn't mine and the other router is the last one I replaced because it fails after running for an hour or so.

Here's the output if I run the server from terminal on my DLink DIR-826L
  1. Wenceslaos-iMac:Debug wenceslaovillanueva$ mono TNServer.exe -name "Jay Server" -tcp 5127 -udp 5128 -udpLobby 5129
  2. IP Addresses
  3. ------------
  4. External: 97.120.193.31
  5. Internal: 192.168.1.9
  6. Gateway:  192.168.1.1
  7.  
  8. UDP Lobby Server started on port 5129
  9. Game server started on port 5127
  10. Press 'q' followed by ENTER when you want to quit.
  11.  
  12. ** (TNServer.exe:5345): WARNING **: _wapi_connect: error looking up socket handle 0xa (error 10050)
  13. UPnP: Unable to open TCP port 5127
  14. UPnP: Unable to open UDP port 5129
  15. UPnP: Unable to open UDP port 5128

If I stop the server running in terminal, the terminal hangs for a couple minutes before it actually exits.  Similar to the way Unity hangs when I stop it.  For my purposes, it's ok if UPnP fails.  I'm targeting only running this demo on LAN at a show.  The only thing that is killing me is the fact that the server hangs thus killing my workflow.  So, to get things done in the short run, I think I'm going to go buy another router unless there's a way to disable UPnP or correct the way it interacts with my router.

14
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 03, 2013, 05:50:24 PM »
Commenting out the line
  1. if (mStatus != Status.Success)
results in no change in behavior.

I replaced
  1. public void WaitForThreads () { while (mThreads.size > 0) Thread.Sleep(1); }
in UPnP with:
  1.     public void WaitForThreads ()
  2.     {
  3.         for (int i = 0; mThreads.size > 0 && i < 2000; ++i)
  4.             Thread.Sleep(1);
  5.     }

again with no change in behavior.  Unity will still lock up for a minute or two and it either comes back or complete locks up until I terminate it.

15
TNet 3 Support / Re: Unity hangs when TNet server is stopped
« on: August 03, 2013, 06:50:56 AM »
Vanilla project with just TNet in it.  Still hangs.  So I went a different direction.  I turned off my WiFi.  The server starts up no problem but of course throws warnings about no route to host and uPnP.  So I connect to the public WiFi here at my apartment complex and try.  The server start up and shut down works great.  Huh...

After poking around with my router, I turn off uPnP on it.  Now I can start and stop a server with no problem at all.  The only warning I get is "UPnP discovery failed (Operation timed out)".  So I'm assuming that the locations of the hangs I was getting before just coincided with something else?  At this point it's almost 5 a.m. so I'm going to sleep.  I'll try again tomorrow.

I've also attached a screenshot of my router model number and firmware just to provide the most information.

Pages: [1] 2