Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-08-2006, 08:12 AM
BatCountry
Fire Beetle
 
Join Date: Mar 2006
Posts: 24
Default Thrown weapons crash bug

Please note this only crashes in Debug compiles of zoneperl 6.5-X

There is a problem in special_attacks.cpp:

in function Client::ThrowingAttack(Mob* other)

line 808:
Code:
	DeleteItemInInventory(ammo_slot, 1, true);
Where it deletes one from a stack of ranged ammunition.

If you have only one of a type of item, you throw the item, it's deleted, then it moves on to do damage calculations.

However, it's reading from deleted memory. In debug compiles (MSVS .NET 2003) it crashes with a segmentation violation on line 855:
Code:
	TryWeaponProc(RangeWeapon, target);
(tested with "a vile substance" thrown from ranged slot)

If you move lines 807 and 808
Code:
	//consume ammo
	DeleteItemInInventory(ammo_slot, 1, true);
to the bottom of the method or just above line 862
Code:
	CheckIncreaseSkill(THROWING);
It will fix this behavior (tested).

-BatCountry
EsOEQ
Reply With Quote
  #2  
Old 03-08-2006, 01:49 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

hey, good catch. I kept seeing this crash, but never spent the time to figure out what was wrong. Change will be in CVS when I get to it.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:32 PM.


 

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