• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

assert failed:"it.type == type && it.count > 0" in file item_list.h:852

Junior Spellweaver
Joined
Aug 17, 2021
Messages
144
Reaction score
31
Hello ragezoners,
i have an issue where a map crashes, everytime that happens, it gives this following error
assert failed:"it.type == type && it.count > 0" in file item_list.h:852

1708798872061 - assert failed:"it.type == type && it.count > 0" in file item_list.h:852 - RaGEZONE Forums

can anyone please shed some light to help me resolve this problem?
Thank you
 

Attachments

You must be registered for see attachments list
Last edited:
Shh, quiet, you might piss somebody off
Developer
Joined
Dec 23, 2011
Messages
1,797
Reaction score
2,169
well, its clearly something on the specific server you're running atm.

int UseItem(int index,gactive_imp * obj, size_t & count)
{
if(_list[index].type == -1)
{
return -1;
}
item & it = _list[index];
int type = it.type;
if(!it.CanUse(GetLocation()))
{
return -2;
}
if(count > it.count) count = it.count;
int rst = it.Use(GetLocation(),index,obj,count);
if(rst < 0) return -3;
ASSERT(it.type == type && it.count > 0);
count = rst;
if(rst > 0)
{
if(it.count <= (size_t)rst)
{
it.TakeOut(_location,index,_owner);
it.Release();
_empty_slot_count ++;
}
else
{
it.count -= rst;
}
}
return type;
}

int UseItemWithArg(int index,gactive_imp * obj,int &count, const char * arg, size_t arg_size)
{
if(_list[index].type == -1)
{
return -1;
}
item & it = _list[index];
int type = it.type;
if(!it.CanUseWithArg(GetLocation(), arg_size))
{
return -2;
}
int rst = it.Use(GetLocation(), index, obj, arg, arg_size);
if(rst < 0) return -3;
ASSERT(it.type == type && it.count > 0);
count = rst;
if(rst > 0)
{
if(it.count <= (size_t)rst)
{
it.TakeOut(_location,index,_owner);
it.Release();
_empty_slot_count ++;
}
else
{
it.count -= rst;
}
}
return type;
}
 
Upvote 0
Junior Spellweaver
Joined
Aug 17, 2021
Messages
144
Reaction score
31
Thanks for the reply!
I am not sure which item causes the crash, at the moment i am trying to find something in the world2.log that may help me find and fix it. this has happened couple times, i am assuming someone is trying to use an item and in return it crashes the map. so it may continue to happen.

if you can direct me to how i can quickly find such error, i'll be grateful.
 
Upvote 0
Junior Spellweaver
Joined
Aug 17, 2021
Messages
144
Reaction score
31
I am using files from 343's complete package, i think they are not custom
 
Upvote 0
Junior Spellweaver
Joined
Aug 17, 2021
Messages
144
Reaction score
31
Alright, i will do, thank you
newbie question: should it be run on the prod server to capture the error or just emulate it on a test server?
i am assuming it's the prod one, just making sure i got the instruction right
 
Upvote 0
Back
Top