Game Development Community

T3D 1.2 - Full PhysX Template Crashes When Host Exits - LOGGED (THREED-3128)

by CSMP · in Torque 3D Professional · 12/13/2011 (2:47 pm) · 6 replies

Build: 1.2 Pro

Platform: Windows 7 64

Target: Game

Issues: Whenever the host of a game exits the level it crashes any clients that are connected.

Steps to Repeat:
1. Host a Full PhysX template game
2. Join the game via a second instance of T3D
3. Exit the Host instance of the game
4. Notice that the client has crashed because the Host left


#1
12/13/2011 (4:33 pm)
I've gone ahead and logged this under ticket THREED-3128.
#2
01/20/2012 (4:37 pm)
Just as a note, I've been forced to use a dedicated server for network testing PhysX enabled projects because of the crash when the Host exits.
#3
02/13/2012 (12:28 pm)
I have fixed this issue for the next released version. Since it is a simple script only change, here it is for those who do not wish to wait...

-gamescriptsclientserverConnection.cs,
-function disconnectedCleanup()
-At the end of the function, before calling physicsDestroyWorld, add a call to ServerConnection.deleteAllObjects()

// Before we destroy the client physics world
// make sure all ServerConnection objects are deleted.
ServerConnection.deleteAllObjects();
   
// We can now delete the client physics simulation.
physicsDestroyWorld( "client" );
#4
02/22/2012 (3:01 pm)
Thanks James, I saw an error when not connected with anyone and added a check:
// Before we destroy the client physics world   
   // make sure all ServerConnection objects are deleted.   
   if (isObject(ServerConnection))
      ServerConnection.deleteAllObjects();  //mp: add a check to avoid errors
#5
09/29/2012 (12:14 pm)
Just want to bump this and say that I had the same issue with other templates (not just Full PhysX) and this script change fixed the issue. Thanks James and CSMP!
#6
10/03/2012 (1:05 pm)
This fix has been checked into the GitHub development branch. github.com/GarageGames/Torque3D/issues/54

- Dave