fix ".send items" Crash
MailDeliveryDelay = 10 in the worldserver.confEmpty the mailbox
Make a macro of this ingame:
.ad 727 -10000
.ad 727 10000
.send items Admin "text" "text" 727:2
Click the macro 3 times
Wait 20-30 seconds
Open the mailbox and click on "return"


NO CRASH
all
master
d387bdc
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
No.。。The server crashed again......
No crash for me. I am on 561b9bac from 2019-12-30
Tested this and the server crashed, but only on my second try. In the log I got some strange error messages:
ERROR: Player(GUID: 34 Name: Garia)::_SaveInventory - the bag(255) and slot(0) values for the item with guid 9330642 (state 0) are incorrect, the player doesn't have an item at that position!
I'm on 30fa1ae3b4ed0e5375018bd83bc6155c2e61cbe9.
Empty the mailbox, do the above, wait for the message to arrive, then the server crashes
player.cpp
//also THIS item should be somewhere else, cheat attempt
-item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue
+//item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue
DeleteRefundReference(item->GetGUIDLow());
Doing this will save you from crashing, but I'm not sure what effect it will have on the kernel if you delete it
backtrace:
#0 0x0000000000442245 in Object::GetUInt64Value (this=0x7fff84647180, index=0) at /home/ac_user/azerothcore/src/server/game/Entities/Object/Object.h:170
#1 Object::GetGUIDLow (this=0x7fff84647180) at /home/ac_user/azerothcore/src/server/game/Entities/Object/Object.h:134
#2 0x00000000006af9c7 in MailDraft::SendReturnToSender (this=0x7fff975fd498, sender_guid=34, receiver_guid=34, trans=...) at /home/ac_user/azerothcore/src/server/game/Mails/Mail.cpp:157
#3 0x0000000000894098 in WorldSession::HandleMailReturnToSender (this=0x7fff92048000, recvData=...) at /home/ac_user/azerothcore/src/server/game/Handlers/MailHandler.cpp:405
#4 0x000000000072896b in WorldSession::Update (this=0x7fff92048000, diff=<optimized out>, updater=...) at /home/ac_user/azerothcore/src/server/game/Server/WorldSession.cpp:315
#5 0x00000000007bef40 in World::UpdateSessions (this=0x15da6d0 <World::instance()::instance>, diff=10) at /home/ac_user/azerothcore/src/server/game/World/World.cpp:2651
#6 0x00000000007be0b5 in World::Update (this=0x15da6d0 <World::instance()::instance>, diff=10) at /home/ac_user/azerothcore/src/server/game/World/World.cpp:2185
#7 0x000000000043b2e5 in WorldRunnable::run (this=<optimized out>) at /home/ac_user/azerothcore/src/server/worldserver/WorldThread/WorldRunnable.cpp:48
#8 0x00007ffff5df9840 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00007ffff63176ba in start_thread (arg=0x7fff975ff700) at pthread_create.c:333
#10 0x00007ffff554541d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Empty the mailbox, do the above, wait for the message to arrive, then the server crashes
I retried again to make sure, still no crash on my AC hash.
However I get this error like Stoa
Player(GUID: 2 Name: Druido)::_SaveInventory - the bag(255) and slot(0) values for the item with guid 8048 (state 0) are incorrect, the player doesn't have an item at that position!
ANd when this error occurs, it takes a while to receive the items in the mailbox, it's like the query is taking very long until failure.
MailDeliveryDelay = 10
MailDeliveryDelay = 10
What else?
It's strange you didn't break down.
Ok I retried with MailDeliveryDelay = 10 and it crashed, but it was hard to reproduce
It must be Access Level 4? Players with Access 0 can't do it?
so... The command .server restart crashes server too =)
It must be Access Level 4? Players with Access 0 can't do it?
you can send items to a player and then he crashes the server by returning the items (i think)
so... The command .server restart crashes server too =)
??? open new issue?
open new issue?
At Admin's hands too much commands can ruins the server.
no crash

player.cpp
//also THIS item should be somewhere else, cheat attempt -item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue +//item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue DeleteRefundReference(item->GetGUIDLow());Doing this will save you from crashing, but I'm not sure what effect it will have on the kernel if you delete it
I did that, and it didn't crash, and nothing else happened,
Can I close it?
@pklloveyou this issue has been fixed on master? if so, you can close
player.cpp
//also THIS item should be somewhere else, cheat attempt -item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue +//item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue DeleteRefundReference(item->GetGUIDLow());Doing this will save you from crashing, but I'm not sure what effect it will have on the kernel if you delete it
Just use the above method.
no, it hasn't been fixed on master
Is there a PR for this yet? or should I make one?
no PR done yet for this
@Darkon47 If this is still a bug, then feel free to make a PR :)
Much appreciated!
player.cpp
//also THIS item should be somewhere else, cheat attempt -item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue +//item->FSetState(ITEM_REMOVED); //we are IN updateQueue right now, can't use SetState which modifies the queue DeleteRefundReference(item->GetGUIDLow());Doing this will save you from crashing, but I'm not sure what effect it will have on the kernel if you delete it
I changed the file, but when I send the email again, it crashes. Turn on the server, send an email to the player, when it returns, there is a crash.
Unable to reproduce on latest master.
Likely fixed by https://github.com/azerothcore/azerothcore-wotlk/pull/3420 and/or https://github.com/azerothcore/azerothcore-wotlk/pull/3223.
Most helpful comment
no, it hasn't been fixed on master