Game Development Community

Error when joining a server

by Jon · in Torque Game Engine · 04/15/2004 (6:09 pm) · 5 replies

Hey, when I click to join a server I get a fatal error that reads
Fatal: (core/resManager.cc @ 723) ResourceObject::construct: NULL resource create function.

I have downloaded the head version of tge. I have a file of the stack trace when i do "torqueDemo_DEBUG.bin -console > serverCrash.txt"
if you would think it is helpfull. Below is the last part of that file.

Entering onDataBlockObjectReceived(28, 95)
%
Entering onPhase1Progress(0.294737)
%
Leaving onPhase1Progress() - return
%
Leaving onDataBlockObjectReceived() - return
%
Entering onDataBlockObjectReceived(29, 95)
%
Entering onPhase1Progress(0.305263)
%
Leaving onPhase1Progress() - return
%
Leaving onDataBlockObjectReceived() - return
%
Could not locate texture:
%
Fatal: (core/resManager.cc @ 723) ResourceObject::construct: NULL resource create function.
%
Platform::debugBreak: triggering SIGSEGV for core dump


Any suggestions would be nice :)
i also get the same crash when i start up the -mod starter.racing and try to join a server.

should i just download the stable version of tge?(which i probably should have done in the first place?)

#1
04/15/2004 (6:28 pm)
There is a "bug" in Torque in that the texture loading code doesn't do as good a job error checking as it should.

in engine/dgl/gTextManager.cc in the loadTexture function we added some code to error check a bit better
TextureObject *TextureManager::loadTexture(const char* textureName, TextureHandleType type, bool clampToEdge)
{
   // case of assigning texture to NULL
   if(!textureName)
      return NULL;

   // JWV BEGIN fix for more robust error checking
	if (dStrlen(textureName) == 0)
		return NULL;
   // JWV END fix for more robust error checking
		   
   textureName = StringTable->insert(textureName);
   
   TextureObject *ret = TextureDictionary::find(textureName, type, clampToEdge);
#2
04/15/2004 (7:39 pm)
Thanks for the code it seemed to fix the error i was getting. But now i get a new error and I have just checked the torque sdk bugs thread about the out of range read and there seems to be no fix for it yet. But thanks a lot for such a speedy reply I believe that has been the fastest reply that I have ever experienced! :)
#3
04/15/2004 (7:44 pm)
Are you running the stock Torque demo or your own mod?

I experienced the out of range errors once, and it ended up being some bad script code that I had written. A bad datablock if I Recall, but I never managed to track it all the way down. I ripped it all apart and started over and the problem went away :) Here is my thread on that issue if you want to reference it. Interestingly as I was just reading that, it is that issue when I ran into the texture "" issue as you did above. So I think you are are having the exact same script problem.
#5
04/16/2004 (3:58 pm)
Im running the stock code... haven't implemeted my own mod yet and was testing if everything was working fine... Up until now i was looking over the documentation learning about the engine. I hope that a remedy for this will be found soon because we are using this same feature in our game that we are creating. When I do start using my own mods I will try to avoid or if i do get this error try to fix it and hopefully add my own contribution to the community like all of the other dedicated tge people have been doing.

Hey ben thanks for the link! It is always appreciated when I can learn how to better optimize code! :)
and also your link John, I read that thread to its end and thanks for all your hard work! I have only owned this engine for about a week now and I'm starting to realize that this is one of the best communities out there today, thanks! :)