DumpConsoleFunctions() bug?
by Tom Spilman · in Torque Game Engine · 10/08/2005 (12:05 pm) · 1 replies
Ok i'm using this minimal main.cs script:
This works fine in debug builds once the logger bug is fixed.
In release dumpConsoleClasses() works, but dumpConsoleFunctions() returns the following:
For some reason it doesn't find any console functions to dump. Looking in consoleDoc.cc i found this:
When i change that first statement to not grab the parent of the null namespace, but just use the null namespace itself i get the correct dump of global console functions. So am i missing some critical "init" code in my minimal main.cs or is this some sort of bug?
// Do the minimum we need to for running the engine.
setLogMode(6);
setModPaths("");
// Dump all the functions and classes.
new ConsoleLogger( logger, $game::argv[2] @ "_exports.txt", false );
dumpConsoleFunctions();
echo( "" );
dumpConsoleClasses();
logger.delete();
quit();This works fine in debug builds once the logger bug is fixed.
In release dumpConsoleClasses() works, but dumpConsoleFunctions() returns the following:
namespace Global {
};For some reason it doesn't find any console functions to dump. Looking in consoleDoc.cc i found this:
void Namespace::dumpFunctions()
{
// Get the global namespace.
Namespace* g = find(NULL)->mParent; // WHY PARENT?
printClassHeader(NULL,NULL, false);
while(g)
{
printNamespaceEntries(g);
g = g->mParent;
}
printClassFooter();
}When i change that first statement to not grab the parent of the null namespace, but just use the null namespace itself i get the correct dump of global console functions. So am i missing some critical "init" code in my minimal main.cs or is this some sort of bug?
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
Associate Kyle Carter