Pol crash when item destroy

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Alwir
New User
Posts: 27
Joined: Sat Aug 26, 2017 2:50 am

Pol crash when item destroy

Post by Alwir »

and if I'm just here)))

There another one problem )

Code: Select all

[08/26 01:31:34] remove_item_from_world: item 0x705A5555 at 0,0 does not exist in world zone ( Old Serial: 0x705A5555 )
[08/26 01:31:35] 
##########################################################
Current StackBackTrace
StackWalker::ShowCallstack - 0x14026c424
  d:\pol_test\lib\stackwalker\stackwalker.cpp : 1047
Pol::Clib::HiddenMiniDumper::print_backtrace - 0x1402615df
  d:\pol_test\pol-core\clib\mdump.cpp : 282
Pol::Clib::HiddenMiniDumper::TopLevelFilter - 0x140261204
  d:\pol_test\pol-core\clib\mdump.cpp : 195
UnhandledExceptionFilter - 0x7ff8d9861f42
  (filename not available)
memset - 0x7ff8dc5df133
  (filename not available)
_C_specific_handler - 0x7ff8dc5c1d86
  (filename not available)
_chkstk - 0x7ff8dc5d33fd
  (filename not available)
RtlRaiseException - 0x7ff8dc594847
  (filename not available)
KiUserExceptionDispatcher - 0x7ff8dc5d258a
  (filename not available)
MoveSmall - 0x14027e6c5
  f:\dd\vctools\crt\crtw32\string\amd64\memcpy.asm : 361
Pol::Core::remove_item_from_world - 0x14013a5d4
  d:\pol_test\pol-core\pol\uworld.cpp : 69
Pol::Core::destroy_item - 0x140102df6
  d:\pol_test\pol-core\pol\ufunc.cpp : 1624
Pol::Module::UOExecutorModule::mf_DestroyItem - 0x1401db723
  d:\pol_test\pol-core\pol\module\uomod.cpp : 2910
Pol::Bscript::Executor::execFunc - 0x1402227b2
  d:\pol_test\pol-core\bscript\executor.cpp : 830
Pol::Bscript::Executor::ins_func - 0x1402299b3
  d:\pol_test\pol-core\bscript\executor.cpp : 2265
Pol::Bscript::Executor::execInstr - 0x140222d45
  d:\pol_test\pol-core\bscript\executor.cpp : 3360
Pol::Core::run_executor_to_completion - 0x1400cabc2
  d:\pol_test\pol-core\pol\scrsched.cpp : 404
Pol::Core::run_script_to_completion - 0x1400cb1bb
  d:\pol_test\pol-core\pol\scrsched.cpp : 478
Pol::Items::Item::run_equip_script - 0x14020b3a8
  d:\pol_test\pol-core\pol\item\item.cpp : 1002
Pol::Items::Item::check_equip_script - 0x140207262
  d:\pol_test\pol-core\pol\item\item.cpp : 1039
Pol::Core::equip_item - 0x14003cc44
  d:\pol_test\pol-core\pol\eqpitem.cpp : 117
Pol::Core::process_data - 0x140187d47
  d:\pol_test\pol-core\pol\network\clientthread.cpp : 501
Pol::Core::client_io_thread - 0x14018625a
  d:\pol_test\pol-core\pol\network\clientthread.cpp : 206
Pol::Clib::_thread_stub2 - 0x1402628ad
  d:\pol_test\pol-core\clib\socketsvc.cpp : 62
Pol::threadhelp::run_thread - 0x14025ff08
  d:\pol_test\pol-core\clib\threadhelp.cpp : 134
Pol::threadhelp::thread_stub2 - 0x140260183
  d:\pol_test\pol-core\clib\threadhelp.cpp : 174
_callthreadstartex - 0x14029005b
  f:\dd\vctools\crt\crtw32\startup\threadex.c : 376
_threadstartex - 0x140290202
  f:\dd\vctools\crt\crtw32\startup\threadex.c : 354
BaseThreadInitThunk - 0x7ff8da5013d2
  (filename not available)
RtlUserThreadStart - 0x7ff8dc5554e4
  (filename not available)
##########################################################
[08/26 01:31:35] ##########################################################
Unhandled Exception! Writing Minidump file. 
Post this file with explanation and last lines from log files on http://forums.polserver.com/tracker.php for the development team.
Saved dump file to '20170826004551-0.dmp'
the dump file in attachments

I can't repeat this bug but i think it happen when somebody will take item when another script destroy it already;
I try ReserveItem(item);
I try if (item)return 1;endif in deletescript
I try set_critical in deletescripts
nothing is help

PS sorry for my English
Attachments
20170826004551-0.dmp
(539.21 KiB) Downloaded 253 times
kevin
POL Developer
Posts: 53
Joined: Wed Sep 29, 2010 3:47 pm
Contact:

Re: Pol crash when item destroy

Post by kevin »

Hi.

I was able to make this crash happen by calling DestroyItem() in a script ran from an item's EquipScript. Is this what you are doing? If so, why are you trying to destroy the item when the user is equipping it? Doesn't really make much sense to me.
Alwir
New User
Posts: 27
Joined: Sat Aug 26, 2017 2:50 am

Re: Pol crash when item destroy

Post by Alwir »

Thank Kevin. It can be truth, I'll check it.

Because I have some item and they have to lose the durability when they to equipping.
But when it happen, I return 0 from equip script.

Code: Select all

var time:=GetObjProperty(item,"#timed");
if (!time)time:=0;endif
if (time>5)
	CheckToolWear (who, item,4,10); //this function subtract HP of item or destroy it
endif
					
if (item)
	SetObjProperty(item,"#timed",time+1);
	return 1;
else
	return 0;
endif
Have I to do it in equiptest script?

But!!!
Item 0x705A5555 doesn't use this block.
When item is using, another script try destroy it. At this time somebody try equips this item. And when the core try destroy the item, the item have not equipped and have not exist in world

And I think whatever I will do in scripts, it doesn't have to crash the core isn't it?
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Pol crash when item destroy

Post by Yukiko »

Nothing done in scripts should crash the Core. You are correct but I think Kevin asked the question to gather information about how this occurred to try to find the cause. They are working hard on finding the solution and more information can be very useful.
Alwir
New User
Posts: 27
Joined: Sat Aug 26, 2017 2:50 am

Re: Pol crash when item destroy

Post by Alwir »

Yukiko
Yes, of course I understand this.

Mmmm.... I apologize if my words like a taunt. It's because I no good speak english, sorry :shame:
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Pol crash when item destroy

Post by Yukiko »

It's alright. I don't know your primary language but I promise you that you speak better English than I would be able to speak your language :)
Post Reply