Loading datablocks
by Jon Uhal · in Torque Game Engine · 10/04/2003 (1:58 pm) · 4 replies
I am trying to load a script through the console. When I run the exec command on the script, it says that it is loading, but immediately seg faults. There is no messages, so I have no clue what is not working.
This is not a complicated script, but the tutorial I am using doesn't give me anymore than this and I can't find an answer within the other scripts in the engine.
Here is some of the code and results I am getting:
% exec( "fps/server/scripts/datablocktest.cs" );
Compiling fps/server/scripts/datablocktest.cs...
Loading compiled script fps/server/scripts/datablocktest.cs.
% Segmentation fault
This is not a complicated script, but the tutorial I am using doesn't give me anymore than this and I can't find an answer within the other scripts in the engine.
Here is some of the code and results I am getting:
% exec( "fps/server/scripts/datablocktest.cs" );
Compiling fps/server/scripts/datablocktest.cs...
Loading compiled script fps/server/scripts/datablocktest.cs.
% Segmentation fault
datablock PlayerData(NewPlayerData)
{
//bla = 5;
//runspeed = 10;
splashAngle = 30.0;
};
%p = new Player(){
dataBlock = NewPlayerData;
};
#2
Oct 4 18:00:26 www kernel: grsec: From 127.0.0.1: signal 11 sent to (torqueDemod_DEB:17952) UID(0) EUID(0), parent (bash:25950) UID(0) EUID(0)
Oct 4 18:00:26 www kernel: grsec: From 127.0.0.1: signal 11 sent to (torqueDemod_DEB:17952) UID(0) EUID(0), parent (bash:25950) UID(0) EUID(0)
Oct 4 18:00:26 www kernel: grsec: From 127.0.0.1: attempted resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 by (torqueDemod_DEB:17952) UID(0) EUID(0), parent (bash:25950) UID(0) EUID(0)
10/04/2003 (2:37 pm)
I've also got this error from my /var/log/messages file (IP address changed on purpose, it wasn't 127.0.0.1):Oct 4 18:00:26 www kernel: grsec: From 127.0.0.1: signal 11 sent to (torqueDemod_DEB:17952) UID(0) EUID(0), parent (bash:25950) UID(0) EUID(0)
Oct 4 18:00:26 www kernel: grsec: From 127.0.0.1: signal 11 sent to (torqueDemod_DEB:17952) UID(0) EUID(0), parent (bash:25950) UID(0) EUID(0)
Oct 4 18:00:26 www kernel: grsec: From 127.0.0.1: attempted resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 by (torqueDemod_DEB:17952) UID(0) EUID(0), parent (bash:25950) UID(0) EUID(0)
#3
Here is the end of my console.log file:
--------- Starting Dedicated Server ---------
Exporting server prefs...
Starting multiplayer mode
Binding server port to default IP
UDP initialized on port 28000
Unable to initialize IPX - error 5
Loading compiled script fps/server/scripts/audioProfiles.cs.
Loading compiled script fps/server/scripts/camera.cs.
Loading compiled script fps/server/scripts/markers.cs.
... Shape with old version.
Loading compiled script fps/server/scripts/triggers.cs.
Loading compiled script fps/server/scripts/inventory.cs.
Loading compiled script fps/server/scripts/shapeBase.cs.
Loading compiled script fps/server/scripts/item.cs.
Loading compiled script fps/server/scripts/staticShape.cs.
Loading compiled script fps/server/scripts/health.cs.
Loading compiled script fps/server/scripts/weapon.cs.
Loading compiled script fps/server/scripts/radiusDamage.cs.
Loading compiled script fps/server/scripts/rifle.cs.
Loading compiled script fps/server/scripts/crossbow.cs.
Loading compiled script fps/server/scripts/player.cs.
Loading compiled script fps/data/shapes/player/player.cs.
Validation required for shape: fps/data/shapes/player/player.dts
Loading compiled script fps/server/scripts/aiPlayer.cs.
*** LOADING MISSION: fps/data/newMission.mis
*** Stage 1 load
*** Stage 2 load
Executing fps/data/newMission.mis.
*** Mission loaded
Engine initialized...
Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].
10/04/2003 (2:44 pm)
It seems to be starting the dedicated server correctly, and when I try to exec the command, it just stops. Of course, I'm running this on Linux and not Windows, but that shouldn't make a difference...Here is the end of my console.log file:
--------- Starting Dedicated Server ---------
Exporting server prefs...
Starting multiplayer mode
Binding server port to default IP
UDP initialized on port 28000
Unable to initialize IPX - error 5
Loading compiled script fps/server/scripts/audioProfiles.cs.
Loading compiled script fps/server/scripts/camera.cs.
Loading compiled script fps/server/scripts/markers.cs.
... Shape with old version.
Loading compiled script fps/server/scripts/triggers.cs.
Loading compiled script fps/server/scripts/inventory.cs.
Loading compiled script fps/server/scripts/shapeBase.cs.
Loading compiled script fps/server/scripts/item.cs.
Loading compiled script fps/server/scripts/staticShape.cs.
Loading compiled script fps/server/scripts/health.cs.
Loading compiled script fps/server/scripts/weapon.cs.
Loading compiled script fps/server/scripts/radiusDamage.cs.
Loading compiled script fps/server/scripts/rifle.cs.
Loading compiled script fps/server/scripts/crossbow.cs.
Loading compiled script fps/server/scripts/player.cs.
Loading compiled script fps/data/shapes/player/player.cs.
Validation required for shape: fps/data/shapes/player/player.dts
Loading compiled script fps/server/scripts/aiPlayer.cs.
*** LOADING MISSION: fps/data/newMission.mis
*** Stage 1 load
*** Stage 2 load
Executing fps/data/newMission.mis.
*** Mission loaded
Engine initialized...
Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].
#4
I noticed that the end of the console file stopped like it did above. But my output shows differently. The end of the output I received at the command line was:
Sending heartbeat to master server [IP:216.116.32.49:28002]
% exec( "fps/server/scripts/testPlayer.cs" );
Compiling fps/server/scripts/testPlayer.cs...
Loading compiled script fps/server/scripts/testPlayer.cs.
% Segmentation fault
This is confusing me cause it looks like it is loading in the datablock properly, but it throws the seg fault after I have loaded the compiled script (with no errors). Is there anyplace to look at the core output error messages?
10/04/2003 (2:57 pm)
There is something weird here... I noticed that the end of the console file stopped like it did above. But my output shows differently. The end of the output I received at the command line was:
Sending heartbeat to master server [IP:216.116.32.49:28002]
% exec( "fps/server/scripts/testPlayer.cs" );
Compiling fps/server/scripts/testPlayer.cs...
Loading compiled script fps/server/scripts/testPlayer.cs.
% Segmentation fault
This is confusing me cause it looks like it is loading in the datablock properly, but it throws the seg fault after I have loaded the compiled script (with no errors). Is there anyplace to look at the core output error messages?
Torque 3D Owner Robert Blanchet Jr.
Strange though, unless I'm missing a glaring problem in the script you posted above (cause it is early in the morning ;p) I dont see why it would seg fault =/