Run time Error

Terradive

Warlord
Joined
Jun 4, 2009
Messages
186
Assert Failed

File: CvXMLLoadUtilitySet.cpp
Line: 1605
Expression: bSuccess
Message: OWN TYPE - dependency not found: (null), in file: "NONE"

I don't really understand what the none is doing in here. Any ideas? Code below.

if ( !GC.isAnyDependency() )
{
CvString szAssertBuffer;
szAssertBuffer.Format("OWN TYPE - dependency not found: %s, in file: \"%s\"", pClassInfo->getType(), GC.getModDir().c_str());
FAssertMsg(bSuccess, szAssertBuffer.c_str());
if (!bSuccess)
{
//#ifdef _DEBUG
logXmlDependencyTypes("\n\nOWN TYPE - dependency not found: %s, in file: \"%s\"", pClassInfo->getType(), GC.getModDir().c_str());
logXmlDependencyTypes("My new check!");
//#endif
delete pClassInfo;
break;
}
}
else
 
I don't I included enough code. It looks like it is looking for something, but I don't know what. edit Ok I'm missing some XML tags. Is there an easy way to find out which ones and where?


template <class T>
void CvXMLLoadUtility::SetGlobalClassInfo(std::vector<T*>& aInfos, const char* szTagName, bool bTwoPass)
{
char szLog[256];
sprintf(szLog, "SetGlobalClassInfo (%s)", szTagName);
PROFILE(szLog);
logMsg(szLog);

// if we successfully locate the tag name in the xml file
if (gDLL->getXMLIFace()->LocateNode(m_pFXml, szTagName))
{
// loop through each tag
do
{
SkipToNextVal(); // skip to the next non-comment node

T* pClassInfo = new T;

FAssert(NULL != pClassInfo);
if (NULL == pClassInfo)
{
break;
}

bool bSuccess = pClassInfo->read(this);
/************************************************************************************************/
/* MODULAR_LOADING_CONTROL 02/20/08 MRGENIE */
/* */
/* If a Type is dependent on it's existence(i.e. a modder adds something to an existing */
/* Type but doesn't want to actual initialize it in case the Type didn't exist previously) */
/* this check here makes sure that the file will be skipped then and not used to create the */
/* object */
/************************************************************************************************/
/*
FAssert(bSuccess);
if (!bSuccess)
{
delete pClassInfo;
break;
}
*/
if ( !GC.isAnyDependency() )
{
CvString szAssertBuffer;
szAssertBuffer.Format("OWN TYPE - dependency not found: %s, in file: \"%s\"", pClassInfo->getType(), GC.getModDir().c_str());
FAssertMsg(bSuccess, szAssertBuffer.c_str());
if (!bSuccess)
{
//#ifdef _DEBUG
logXmlDependencyTypes("\n\nOWN TYPE - dependency not found: %s, in file: \"%s\"", pClassInfo->getType(), GC.getModDir().c_str());
logXmlDependencyTypes("My new check!");
//#endif
delete pClassInfo;
break;
}
}
else
{
int iTypeIndex = -1;
if (NULL != pClassInfo->getType())
{
iTypeIndex = GC.getInfoTypeForString(pClassInfo->getType(), true);
}

// TYPE dependency? (Condition 1)
if ( GC.getTypeDependency() && (-1 == iTypeIndex))
{
//#ifdef _DEBUG
logXmlDependencyTypes("\n\nOWN TYPE - dependency not found: %s, in file: \"%s\"", pClassInfo->getType(), GC.getModDir().c_str());
logXmlDependencyTypes("Possible reasons: missing module, wrong MLF order, bLoad set to 0?");
//#endif
delete pClassInfo;
GC.resetDependencies(); // make sure we always reset once anydependency was true!
continue;
}

// OR Dependencies (Condition 2)
GC.setTypeDependency(false);
if ( GC.getOrNumDependencyTypes() > 0 )
{
// if we have Or dependencies, set to dependend by default(this will prevent loading)
// the moment ANY condition is met, we can safely load the ClassInfo and set the
// dependency to false
GC.setTypeDependency(true);
//#ifdef _DEBUG
logXmlDependencyTypes("\n\nOR - dependencies will be checked here for, TYPE: %s, in file: \"%s\"", pClassInfo->getType(), GC.getModDir().c_str());
//#endif
}
for ( int iI = 0; iI < GC.getOrNumDependencyTypes(); iI++ )
{
iTypeIndex = GC.getInfoTypeForString( GC.getOrDependencyTypes(iI), true );
if ( iTypeIndex == -1 )
{
//#ifdef _DEBUG
logXmlDependencyTypes("OR - Dependency not found, TYPE: %s", GC.getOrDependencyTypes(iI).c_str());
//#endif
}
else
{
// we found a OR dependent Type, so we can load safely!
// dependency will be set disabled(false)
#ifdef _DEBUG
logXmlDependencyTypes("OR - Dependency found, TYPE: %s", GC.getOrDependencyTypes(iI).c_str());
#endif
GC.setTypeDependency(false);
}
}

// AND Dependencies (Condition 3)
if (!(GC.getAndNumDependencyTypes() > 0 ))
{
#ifdef _DEBUG
logXmlDependencyTypes("\n\n");
#endif
}
 
Back
Top Bottom