Problem running T2D after building it
by Manuel F. Lara · in Torque Game Builder · 06/16/2006 (1:16 am) · 12 replies
I compiled T2D in debug mode using VC 2005 Express, but after building it, I try to run it and it crashes:
consoleInternal.cc : 767 (" for(Entry *walk = mEntryList; walk; walk = walk->mNext)")
Stack Trace:
Namespace::createLocalEntry(const char * name=0x01512c20) Line 767
Namespace::markGroup(const char * name=0x00b4f980, const char * usage=0x00b4f990) Line 893
Con::markCommandGroup(const char * nsName=0x00000000, const char * name=0x00b4f980, const char * usage=0x00b4f990) Line 750
ConsoleConstructor::setup() Line 94
Con::init() Line 233
initLibraries() Line 125
DemoGame::main(int argc=1, const char * * argv=0x01210830) Line 294
run(int argc=1, const char * * argv=0x01210830) Line 1391
I must say I had to make some changes in the code in order to get it to compile. First, the compiler said 'strcpy' didn't exist (?), so I changed all those to use dStrncpy.
Then at T2D SDK.rc it didn't find the "mfc/afxres.h" file. In another thread I've seen the guy solved it by installing Platform SDK, but I already have it (although a bit old). So I commented that line. But then a couple of problems more occured in this file so I just commented everything but the 31th line:
IDI_ICON1 ICON DISCARDABLE "t2d.ico"
Since I remembered that in an old game of mine I only needed that line to make the icon appear.
Have I broken something? It's just an X-Files kind of problem, here? Any other ideas?
EDIT: I'm trying to build RC1, as I'm having some problems with RC3 and I prefer to stick to RC1 while final is not here yet.
consoleInternal.cc : 767 (" for(Entry *walk = mEntryList; walk; walk = walk->mNext)")
Stack Trace:
Namespace::createLocalEntry(const char * name=0x01512c20) Line 767
Namespace::markGroup(const char * name=0x00b4f980, const char * usage=0x00b4f990) Line 893
Con::markCommandGroup(const char * nsName=0x00000000, const char * name=0x00b4f980, const char * usage=0x00b4f990) Line 750
ConsoleConstructor::setup() Line 94
Con::init() Line 233
initLibraries() Line 125
DemoGame::main(int argc=1, const char * * argv=0x01210830) Line 294
run(int argc=1, const char * * argv=0x01210830) Line 1391
I must say I had to make some changes in the code in order to get it to compile. First, the compiler said 'strcpy' didn't exist (?), so I changed all those to use dStrncpy.
Then at T2D SDK.rc it didn't find the "mfc/afxres.h" file. In another thread I've seen the guy solved it by installing Platform SDK, but I already have it (although a bit old). So I commented that line. But then a couple of problems more occured in this file so I just commented everything but the 31th line:
IDI_ICON1 ICON DISCARDABLE "t2d.ico"
Since I remembered that in an old game of mine I only needed that line to make the icon appear.
Have I broken something? It's just an X-Files kind of problem, here? Any other ideas?
EDIT: I'm trying to build RC1, as I'm having some problems with RC3 and I prefer to stick to RC1 while final is not here yet.
#2
06/16/2006 (9:05 am)
Same here... I only use VC 2003.
#3
06/16/2006 (9:08 am)
Manuel, instead you can install GCC-MinGW for Windows and use the "make" compiler. I have done that on windows before to build Torque but now I have VC 2003.
#4
The mfc/afxres problem can be solved by replacing that with windows.h. RC3 has this change in it.
06/16/2006 (1:49 pm)
I've been dev'ing TGB on VC Express for the last 6 months and I'm fairly sure we have several users using it without problems. You definitely are having some configuration issues if 'strcpy' wasn't found. Try reinstalling Visual Studio.The mfc/afxres problem can be solved by replacing that with windows.h. RC3 has this change in it.
#5
"Invalid evaluator state - trying to set null variable".
Platform::debugBreak() Line 15 + 0x8 bytes C++
PlatformAssert::process(PlatformAssert::Type assertType=Fatal, const char * filename=0x00aee428, unsigned int lineNumber=161, const char * message=0x00aee928) Line 93 C++
PlatformAssert::processAssert(PlatformAssert::Type assertType=Fatal, const char * filename=0x00aee428, unsigned int lineNumber=161, const char * message=0x00aee928) Line 113 + 0x25 bytes C++
ExprEvalState::setIntVariable(int val=2) Line 161 + 0x2b bytes C++
CodeBlock::exec(unsigned int ip=5, const char * functionName=0x00000000, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 760 C++
CodeBlock::compileExec(const char * fileName=0x00000000, const char * string=0x0012e840, bool noCalls=false, int setFrame=0) Line 545 C++
Con::evaluatef(const char * string=0x00af4640, ...) Line 864 C++
TelnetDebugger::TelnetDebugger() Line 131 + 0xc bytes C++
TelnetDebugger::create() Line 162 + 0x35 bytes C++
initLibraries() Line 130 C++
DemoGame::main(int argc=1, const char * * argv=0x01220830) Line 294 + 0x5 bytes C++
Seems like the assert is produced when trying to evaluatef the string ""$dbgVersion = 2;". Sounds very weird to me why this could be happening, as I'm not an expert in the Torque Platform at all. Any ideas?
06/20/2006 (1:25 am)
I've tried building and running RC3. It compiles successfully after replacing all 'strcpy' occurences to 'strcpy_s' (the more secure version included in VS 2005). But when I try to run it, I get a Torque fatal DebugError:"Invalid evaluator state - trying to set null variable".
Platform::debugBreak() Line 15 + 0x8 bytes C++
PlatformAssert::process(PlatformAssert::Type assertType=Fatal, const char * filename=0x00aee428, unsigned int lineNumber=161, const char * message=0x00aee928) Line 93 C++
PlatformAssert::processAssert(PlatformAssert::Type assertType=Fatal, const char * filename=0x00aee428, unsigned int lineNumber=161, const char * message=0x00aee928) Line 113 + 0x25 bytes C++
ExprEvalState::setIntVariable(int val=2) Line 161 + 0x2b bytes C++
CodeBlock::exec(unsigned int ip=5, const char * functionName=0x00000000, Namespace * thisNamespace=0x00000000, unsigned int argc=0, const char * * argv=0x00000000, bool noCalls=false, const char * packageName=0x00000000, int setFrame=0) Line 760 C++
CodeBlock::compileExec(const char * fileName=0x00000000, const char * string=0x0012e840, bool noCalls=false, int setFrame=0) Line 545 C++
Con::evaluatef(const char * string=0x00af4640, ...) Line 864 C++
TelnetDebugger::TelnetDebugger() Line 131 + 0xc bytes C++
TelnetDebugger::create() Line 162 + 0x35 bytes C++
initLibraries() Line 130 C++
DemoGame::main(int argc=1, const char * * argv=0x01220830) Line 294 + 0x5 bytes C++
Seems like the assert is produced when trying to evaluatef the string ""$dbgVersion = 2;". Sounds very weird to me why this could be happening, as I'm not an expert in the Torque Platform at all. Any ideas?
#6
'strcpy' ?
06/20/2006 (6:06 am)
It compiles successfully without any changes to source code.(VS 2005 Prof.) Do you really need to replace 'strcpy' ?
#7
06/20/2006 (6:49 am)
I really need to, it doesn't find it. I'll try installing the latest Platform SDK, maybe TGB needs a newer version than the one I have.
#8
06/20/2006 (7:35 am)
Well, I've downloaded TGB RC3, run "engine/compilers/VisualStudio 2005/T2D SDK.sln" file and compile it. Nothing more. So try it(I mean PSDK).
#9
06/22/2006 (1:05 am)
I tried with the latest Platform SDK, but no luck, so I'll try reinstalling VS 2005. I really hope this thing runs once I get to compile it successfully without any changes!
#10
Are the directories that contain the Platform SDK include and library files first in the list of directories vs05 should search for *.h/*.lib files?
HTH
06/22/2006 (7:40 pm)
I've had no glitches compiling with vs2005 Express: As Igor, just opened up the *.sln file and hit "compile".Are the directories that contain the Platform SDK include and library files first in the list of directories vs05 should search for *.h/*.lib files?
HTH
#11
06/23/2006 (9:23 am)
Same with VS6 and with VS-2005 Express it compiles for me out of the box with no problems.
#12
06/26/2006 (6:17 am)
Ok, so with a fresh install of VS 2005 Express everything works, so I probably had a modified string.h header or something. Thanks everybody :)
Torque Owner Alex Rice
Default Studio Name