Delete crashes?!
Alright... I'm having the weirdest problem. Several code snippets are crashing when they use the delete function. I posted about this a bunch of times earlier, though I didn't figure out exactly what was causing it until now.
Examples: WesQuests.cpp Code:
#ifdef WIN32 linked_list.h Code:
current_element->SetNext(0); I am seriously confused by this, it's making no sense. Can anyone help? |
you cant delete something that has already been deleted or does not exist, thats the reasons it would crash
|
Not a very good linked list if it doesnt account for hitting the end of the list traversal...
|
Image - I know. It exists. I even had the program cout some values right before the deleting to make sure it existed.
Last crash time, the entity was a_kobold04 (warrens) and the WesQuests entries were: SAY: and SAY:Good job! That giant won't cause us any more problems. |
Code:
cout<<"Next: "<<current_element->GetNext()<<endl; This is the error report before crash: Code:
Message:----SERVER SHUTDOWN---- Oh, and here's the crash code: 2002/09/27 19:37:43 GMT: Zone 7995 crashed. Errorcode: 2/0. Current zone loaded:westwastes. Current clients:0. Caused by: |
Is that the last member of the linked list?
I'd write out a quick function to transverse the list till it hit null, and list the L.L. 's contents, then verify where it's bombing at. |
I've already verified where it's bombing. Exactly at the delete line of a random npc... tends to be any god damn npc in the zone really.
|
is it possible its a corpse or theres something different?
|
Btw: Recently with 0.3.8 dev code, I have not seen this error occur, and it use to happen quite often for me :P
|
Not a corpse. An NPC.
Where is delete defined? Gonna see if updating said file works. |
All times are GMT -4. The time now is 01:43 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.