POL 097 2006-09-16 Crash reproduced

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am

POL 097 2006-09-16 Crash reproduced

Post by VeNdOr »

with this script as text command:

use uo;
use os;

program test(who)
var item:=CreateItemInBackpack(who,"blackstaff");
Reserveitem(item);
EquipItem(who,item);
sleep(3);
DestroyItem(item);

endprogram

if ,after equipped the black staff, i pick&hold it on the hand (pol should not permit me doing this one) then (on destroy) server crash, with this sentence:

remove_item_from_world: item 0x40024995 at 0,0 does not exist in world zone
Assertion Failed: itr != zone.items.end(), .\uworld.cpp, line 40
Forcing stack backtrace.
Unhandled Exception! Minidump started...
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

Actually, you can stop them picking it up in the script.

Using ReserveItem will keep them from being able to pick it up, etc.

Far as the crash, yes, some redundant check needs to be done to prevent it in the gotten item state.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

For 096.4 and next 097 beta.
Fixed : Crash involving UO::DestroyItem being called on an item being held
by a player. Now returns an error same as if item is in use and not
reserved to that character.
Note : ALWAYS remember, to keep bugs happening in your scripts that involve
players picking up/moving items to keep them from being removed from
containers or ground by scripts, or from being destroyed, ALWAYS use
ReserveItem() to lock that item. If an item is reserved, you cannot
pick it up, etc.
Locked