CItemBase::SetTexture GetProp() NULL Return 0

12/20/2012 13:46 raventh1984#1
Hi Epvpers

I have an problem today i was recompiling my source cause i did an modification on an small part.

When launching the server files everything went ok.
But when launching the neuz.exe it crashes and its providing me with the following error.

CItemBase::SetTexture GetProp() NULL Return 0
CItemBase::SetTexture()+0114 byte(s), official source\_common\item.cpp, line 0092+0003 byte(s)

Well i opend up the Item.cpp and went to the line
This is the part

Now what i did was looking up the log (CItemBase::SetTexture)
And its posted above the # __CLIENT
Now i changed the if (!pProp) to if(pProp)
Recompiling and getting the error again but this time with the item id uppon crashing

CItemBase::SetTexture GetProp() NULL Return 2801 <--See

I have checked 2801 in defineitem.h and its the bisquit you get when making an new char.

What i did next was remove the change i had make recompiling again. But its no use the problem still exist.

Now how can i fix it.
I have searched for it but there was never an clear solotion and or why it was happening.

Can someone help me with it and proberly give me also an explination of why this is happening?

With kind regards.
05/12/2014 13:11 Wharsh#2
Got same problem :3 anyone know about this one?
05/12/2014 13:56 Drabur#3
Quote:
void CItemBase::SetTexture()
{
#ifdef __CLIENT
ItemProp* pProp =GetProp();
if (!pProp)
{
LPCTSTR szErr = Error("CItemBase::SetTexture GetProp() NULL Return %d", m_dwItemId);
ADDERRORMSG( szErr );
return;
}

#if __VER >= 9 // __PET_0410
CString strIcon = pProp->szIcon;
if( pProp->dwItemKind3 == IK3_EGG )
This should work.
05/12/2014 13:59 Wharsh#4
Quote:
Originally Posted by Drabur View Post
This should work.
Lemme try it. :) tnx :D



I can enter to the world but without npc's and items .. im trying to fix it in my client ..



Got this error
05/12/2014 17:30 .Trotex.#5
Quote:
Originally Posted by Drabur View Post
This should work.
@Drabur
The function is a void-function, so it havn't got an regulary return.. There isn't the problem because i think you don't have to cancel the func on this place.. Maybe its a solution to abort at the m_dwItemId-value 0 like:

Quote:
if (m_dwItemId <= 0)
{
return;
}

if (!pProp)
{
LPCTSTR szErr = Error("CItemBase::SetTexture GetProp() NULL Return %d", m_dwItemId);
ADDERRORMSG( szErr );
}
but i dont think that thats the right way

@Whrash
The problem is in the GetProp()-function, at the m_dwItemId 0 and 1... I think its an error because of ressource things.. in the CItemBase::SetTexture()-func is the answer. The if-part say "write this error if there isnt a pProp" and its at the m_dwItemId 0 and 1..
What for a kind of modification did you do? Maybe im totaly wrong with my idea.. And sorry for my bad english :D
05/12/2014 18:10 Mognakor#6
Nice necro posting...

Remove the return and try debugging your client and check the function stack.
05/12/2014 21:47 Drabur#7
I had the problem and this fixed it.
05/12/2014 22:09 Mognakor#8
Quote:
Originally Posted by Drabur View Post
I had the problem and this fixed it.
Returning from a function and ignoring an error-message is not what i would call a fix.