Seg fault with tnltest
by Kad · in Torque Game Engine · 05/14/2005 (4:16 am) · 5 replies
Hi,
i'm new to tnl and want some help please
after compiling tnltest (server and client)
I launched the server then the client (at this point averythink seems to be ok)
but when i try to move the player (by clicking somewhere) the server stops with a segmentation fault !!!!!
another thing, I think that Hello World example is out of date, i tried to get it running without success, if someone have a working hello world example or something else please contact me, cause I didn't found any example of tnl on the web :(
i'm new to tnl and want some help please
after compiling tnltest (server and client)
I launched the server then the client (at this point averythink seems to be ok)
but when i try to move the player (by clicking somewhere) the server stops with a segmentation fault !!!!!
another thing, I think that Hello World example is out of date, i tried to get it running without success, if someone have a working hello world example or something else please contact me, cause I didn't found any example of tnl on the web :(
#2
05/14/2005 (11:30 am)
What platform are you running on (compiler/OS)? Also, where did the test program crash?
#3
when i try to compil the original tnltest source code (make tnltest) i get this warning message :
--------------------------
testGame.cpp: Dans member function « virtual void
TNLTest::Player::rpcPlayerWillMove_remote(TNL::StringPtr) »:
testGame.cpp:303: attention : cannot pass objects of non-POD type 'class
TNL::StringPtr' through '...'; call will abort at runtime
---------------------------
now if i run tnltest and try to move the player, the server crashes with segmentation fault
i commented the line 303 causing the error :
303: TNL::logprintf("Expecting a player move from the connection: %s", testString);
and recompiled and now everything is working well
but there is also a problem with StringPtr in hello world example : when i try to exchange messages (StringPtr) the compilation fail, but when i change strings to integers for example, everything works well.
my problem now is to run server on a remote machine and connect to it, i tried in 3 different machines (linuxboxes) whithout success : the client continue pinging but the server doesn't receive anything
05/14/2005 (11:52 am)
I'm using gentoo linux with 2.6.11 kernel and gcc 3.3.5when i try to compil the original tnltest source code (make tnltest) i get this warning message :
--------------------------
testGame.cpp: Dans member function « virtual void
TNLTest::Player::rpcPlayerWillMove_remote(TNL::StringPtr) »:
testGame.cpp:303: attention : cannot pass objects of non-POD type 'class
TNL::StringPtr' through '...'; call will abort at runtime
---------------------------
now if i run tnltest and try to move the player, the server crashes with segmentation fault
i commented the line 303 causing the error :
303: TNL::logprintf("Expecting a player move from the connection: %s", testString);
and recompiled and now everything is working well
but there is also a problem with StringPtr in hello world example : when i try to exchange messages (StringPtr) the compilation fail, but when i change strings to integers for example, everything works well.
my problem now is to run server on a remote machine and connect to it, i tried in 3 different machines (linuxboxes) whithout success : the client continue pinging but the server doesn't receive anything
#4
TNL::logprintf("Expecting a player move from the connection: %s", testString.getString());
which it does in the HEAD revision in CVS.
I also checked in a fix for the hello world example, which will show up in the docs the next time they're regenerated.
As for getting it to work over the network... are you experiencing this problem with Zap as well?
Zap and tnltest have been tested to run over a LAN, though Zap much more recently.
05/15/2005 (3:51 pm)
Ah, that line should read: TNL::logprintf("Expecting a player move from the connection: %s", testString.getString());
which it does in the HEAD revision in CVS.
I also checked in a fix for the hello world example, which will show up in the docs the next time they're regenerated.
As for getting it to work over the network... are you experiencing this problem with Zap as well?
Zap and tnltest have been tested to run over a LAN, though Zap much more recently.
#5
>Zap and tnltest have been tested to run over a LAN, though Zap much more recently.
I was able to run a chat example over internet and another client/server
but tnl test doesn't work (I think because of the ping) because I tested it on 3 different machines, and the three machines was using a rooter (maybe it blocks incoming pings ?!)
I cant test Zap example since there is no Makefile to compile it on a linux box ;) , I tried to compile it manually but I did not have enought patience (and time :D )
anyway, I begin understanding how all this work, and i'm writing a first (trash) clients/server example ... I'll maybe write a step by step tutorial showing how to build a client/server with TNL if I decide to use it for my project (and i think i'll do )
05/16/2005 (12:15 am)
>As for getting it to work over the network... are you experiencing this problem with Zap as well?>Zap and tnltest have been tested to run over a LAN, though Zap much more recently.
I was able to run a chat example over internet and another client/server
but tnl test doesn't work (I think because of the ping) because I tested it on 3 different machines, and the three machines was using a rooter (maybe it blocks incoming pings ?!)
I cant test Zap example since there is no Makefile to compile it on a linux box ;) , I tried to compile it manually but I did not have enought patience (and time :D )
anyway, I begin understanding how all this work, and i'm writing a first (trash) clients/server example ... I'll maybe write a step by step tutorial showing how to build a client/server with TNL if I decide to use it for my project (and i think i'll do )
Kad
now my tnltest clients and servers works perfectly on my local machine, but I can't connect to remote machine ??