[DiscordArchive] Also where is the crash logs?
[DiscordArchive] Also where is the crash logs?
Archived author: M'Dic • Posted: 2025-02-10T16:33:01.665000+00:00
Original source
Also where is the crash logs?
Archived author: caweren • Posted: 2025-02-10T16:37:30.658000+00:00
Original source
```cpp
void HandleDisassembly() {
Item* target = GetExplTargetItem();
if (!target) return;
InventoryType invType = InventoryType(target->GetTemplate()->InventoryType);
ItemSubclassWeapon subClass = ItemSubclassWeapon(target->GetTemplate()->SubClass);
Player* caster = GetCaster()->ToPlayer();
std::vector<DisassemblyLoot> lootTable = {};
if (isWeapon(invType)) {
if (is2HWeapon(subClass))
lootTable.push_back({ ITEM_BLACKSMITH_WHETSTONE, urand(3,5) });
else if (is1HWeapon(subClass))
lootTable.push_back({ ITEM_BLACKSMITH_WHETSTONE, urand(1, 3) });
}
else if (isJewelry(invType)) {
lootTable.push_back({ ITEM_METALLIC_LOOP, urand(1, 3) });
}
else
lootTable.push_back({ ITEM_ARMOR_SCRAPS, urand(1, 3) });
ItemPosCountVec sDest;
for (auto& loot : lootTable) {
InventoryResult msg = caster->CanStoreNewItem(INVENTORY_SLOT_BAG_0, NULL_SLOT, sDest, loot.item, loot.amount);
if (msg == EQUIP_ERR_OK)
{
Item* item = caster->StoreNewItem(sDest, loot.item, true, 0);
caster->SendNewItem(item, loot.amount, true, false, false);
}
}
target->SaveToDB();
caster->DestroyItem(target->GetBagSlot(), target->GetSlot(), true);
}
```
Do you want the entire log, or just the call stack?
```txt
Call stack:
Address Frame Function SourceFile
00007FFB8FE5A144 000000FB287FF3E0 Object::GetGuidValue+74 C:\Code\ElunaTrinityWotlk\src\server\game\Entities\Object\Object.cpp line 304
00007FFB8FEEBDB9 000000FB287FF740 Player::_SaveInventory+E99 C:\Code\ElunaTrinityWotlk\src\server\game\Entities\Player\Player.cpp line 20177
00007FFB8FEBD41C 000000FB287FFA00 Player::SaveToDB+1DEC C:\Code\ElunaTrinityWotlk\src\server\game\Entities\Player\Player.cpp line 19897
00007FFB8FEBD8F5 000000FB287FFA50 Player::SaveToDB+55 C:\Code\ElunaTrinityWotlk\src\server\game\Entities\Player\Player.cpp line 19604
00007FFB8FED2E6D 000000FB287FFB70 Player::Update+8FD C:\Code\ElunaTrinityWotlk\src\server\game\Entities\Player\Player.cpp line 1258
00007FFB9013CBF0 000000FB287FFD10 Map::Update+1A0 C:\Code\ElunaTrinityWotlk\src\server\game\Maps\Map.cpp line 828
00007FFB9014E627 000000FB287FFD60 MapUpdater::WorkerThread+F7 C:\Code\ElunaTrinityWotlk\src\server\game\Maps\MapUpdater.cpp line 118
00007FFB9014E0EF 000000FB287FFD90 std::thread::_Invoke<std::tuple<void (__cdecl MapUpdater::*)(void),MapUpdater *>,0,1>+F C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433\include\thread line 61
00007FFBCB8E37B0 000000FB287FFDC0 wcsrchr+150
00007FFBCD7BE8D7 000000FB287FFDF0 BaseThreadInitThunk+17
00007FFBCE53BF2C 000000FB287FFE40 RtlUserThreadStart+2C
```
Archived author: M'Dic • Posted: 2025-02-10T16:42:52.803000+00:00
Original source
Log would be the best. But why save then follow with a destroyitem? I could see that as exploitable
Archived author: caweren • Posted: 2025-02-10T16:43:18.639000+00:00
Original source
It was to test wether saving the item before destroying it had an effect. It did not
Archived author: M'Dic • Posted: 2025-02-10T16:43:51.078000+00:00
Original source
Is this the object.cpp file?
Archived author: caweren • Posted: 2025-02-10T16:44:24.699000+00:00
Original source
No, it's in a custom script. It fails in `Object.cpp` due to GUID requirement in `_SaveInventory`
Archived author: M'Dic • Posted: 2025-02-10T16:45:16.765000+00:00
Original source
Are u famliar with attaching to debugger while the server is running?
Archived author: caweren • Posted: 2025-02-10T16:45:32.898000+00:00
Original source
ofc
Archived author: M'Dic • Posted: 2025-02-10T16:46:21.339000+00:00
Original source
Where does it break when the crash happens?
Archived author: M'Dic • Posted: 2025-02-10T16:46:34.964000+00:00
Original source
And what info does it give in the bottom left pane window?