Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2002, 01:05 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default 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
	delete command; <-- Here
	delete temp; <-- Here
	#endif

linked_list.h

Code:
  current_element->SetNext(0);
  current_element->SetPrev(0);
  if (!DeleteData)
	  current_element->SetData(0);
  delete current_element; <-- Here
The marked lines cause crashes. Oddly enough, the linked_list.h crash only appears occasionaly, while the quest crash appears every time.

I am seriously confused by this, it's making no sense. Can anyone help?
Reply With Quote
  #2  
Old 09-27-2002, 02:23 AM
DeletedUser
Fire Beetle
 
Join Date: Sep 2002
Posts: 0
Default

you cant delete something that has already been deleted or does not exist, thats the reasons it would crash
Reply With Quote
  #3  
Old 09-27-2002, 02:43 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Not a very good linked list if it doesnt account for hitting the end of the list traversal...
Reply With Quote
  #4  
Old 09-27-2002, 06:45 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

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.
Reply With Quote
  #5  
Old 09-27-2002, 07:39 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

Code:
 cout<<"Next: "<<current_element->GetNext()<<endl;
  cout<<"Prev: "<<current_element->GetPrev()<<endl;
  current_element->SetNext(0);
  current_element->SetPrev(0);
  if (!DeleteData)
	  current_element->SetData(0);
  cout<<"Current: "<<current_element->GetData()<<endl;
  delete current_element;
  cout<<"Completed delete!"<<endl;
That's the current code.

This is the error report before crash:

Code:
Message:----SERVER SHUTDOWN----
Zone shutdown: going to sleep
Deleting Nemmy the Mad`s_pet001
Next: 0x0103EE70
Prev: 0x00000000
Current: 0x01041C80
Completed delete!
Done
Deleting Lady Rosaline000
Next: 0x0103D7D0
Prev: 0x00000000
Current: 0x0103D3A0
Completed delete!
Done
Deleting Adrecia Tru`Ril000
Next: 0x0103DFE0
Prev: 0x00000000
Current: 0x0103DB80
Completed delete!
Done
Deleting Lord Za`Yth000
Next: 0x0103C8D0
Prev: 0x00000000
Current: 0x0103C490
Completed delete!
Done
Deleting Liam the Destroyer000
Next: 0x0103B080
Prev: 0x00000000
Current: 0x0103CC80
Completed delete!
Done
Deleting Nemmy the Mad000
Next: 0x0103BB30
Prev: 0x00000000
Current: 0x0103B670
Completed delete!
Done
Deleting Lady Lazuli000
Next: 0x0103A420
Prev: 0x00000000
Current: 0x0103BC80
Completed delete!
Done
Deleting Demitri Eto000
Next: 0x0103AD40
Prev: 0x00000000
Current: 0x0103A9C0
Completed delete!
Done
Deleting an azure drake014
Next: 0x010395C0
Prev: 0x00000000
Current: 0x01039190
Completed delete!
Done
Deleting a skyripper wyvern011
Next: 0x01038050
Prev: 0x00000000
Current: 0x01039A40
Completed delete!
Done
Deleting a crystal wyrm014
Next: 0x01038620
Prev: 0x00000000
Current: 0x010382A0
Completed delete!
Done
Deleting a crystal wyrm013
Next: 0x01038E90
Prev: 0x00000000
Current: 0x01038A60
Completed delete!
Done
Deleting an ancient rhino020
Next: 0x010373D0
Prev: 0x00000000
Current: 0x01037050
Completed delete!
Done
Deleting an ice burrower000
Next: 0x01037BE0
Prev: 0x00000000
Current: 0x01037860
Completed delete!
Done
Deleting a stormwolf025
Next: 0x01036430
Prev: 0x00000000
Current: 0x010360B0
Completed delete!
Done
Deleting a stormwolf024
Next: 0x01036C70
Prev: 0x00000000
Current: 0x010368F0
Completed delete!
Done
Deleting a stormwolf023
Next: 0x01035490
Prev: 0x00000000
Current: 0x01035110
Completed delete!
Done
Deleting a stormwolf022
Next: 0x01035CD0
Prev: 0x00000000
Current: 0x01035950
Completed delete!
Done
Deleting an ancient rhino019
Next: 0x01034550
Prev: 0x00000000
Current: 0x01034120
Completed delete!
Done
Deleting an ancient rhino018
Next: 0x01034D80
Prev: 0x00000000
Current: 0x01034A00
Completed delete!
Done
Deleting an ancient rhino017
Next: 0x010335E0
Prev: 0x00000000
Current: 0x01033260
Completed delete!
Done
Deleting a skyripper wyvern010
Next: 0x010320A0
Prev: 0x00000000
Current: 0x01033A20
Message:ZONEWIDE_MESSAGE: This zone caused a fatal error and will shut down now.
 Your character will be restored to the last saved status. We are sorry for any
inconvenience!
So as you can see, it's not caused by missing data. And it's crashing exactly on the delete line.

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:
Reply With Quote
  #6  
Old 09-27-2002, 07:58 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

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.
Reply With Quote
  #7  
Old 09-27-2002, 09:03 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

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.
Reply With Quote
  #8  
Old 09-27-2002, 09:21 AM
DeletedUser
Fire Beetle
 
Join Date: Sep 2002
Posts: 0
Default

is it possible its a corpse or theres something different?
Reply With Quote
  #9  
Old 09-27-2002, 09:23 AM
DeletedUser
Fire Beetle
 
Join Date: Sep 2002
Posts: 0
Default

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
Reply With Quote
  #10  
Old 09-27-2002, 09:54 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

Not a corpse. An NPC.

Where is delete defined? Gonna see if updating said file works.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:15 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3