ProjectSkyfire / SkyFire.406a

SkyFireEMU is a full featured F/OSS World of Warcraft: Cataclysm emulator written in C++. || Compatible with World of Warcraft client 4.0.6a (Build:13623) || Public DB is located on forum
http://www.projectskyfire.org
GNU General Public License v3.0
344 stars 218 forks source link

Pet load from DB crashes with ASSERT failed #488

Open streetrat opened 12 years ago

streetrat commented 12 years ago

AlterEgo edited Rat's wall of text. http://www.projectskyfire.org/pastebin/index.php?show=189

roc13x commented 12 years ago

Debug log from linux: http://www.projectskyfire.org/pastebin/index.php?show=190

The log showed "Unit::SetMinion. Try to add hunter pet to not alawed slot(100). Minion 42721 for 0"

XEQT commented 12 years ago

Check in the character_pet and look on what slot it have been saved as. I run the same version that is the newest and I don't get that problem. Could you tell what you did when this happend ?

streetrat commented 12 years ago

pets get saved in slot 100, hunter has 5 pets, 4of them are saved in slot 100, player's current petslot is 100 too (in characters table). and if this happens then the char_enum shows the player 4 times (cuz of the enum query selects the pets based on currentslot, so it gets the character 1 time for all 4 pets) basicly your charenum shows your character 4 times with 4 different pets on the screen, all of them crashes with assert failed at login

streetrat commented 12 years ago

found the bug! tame any beast, (currentslot will be from 0to4) while your beast is with you call a minipet/guardian (currentslot will change to 100, "otherpet") save you character with .save or logout your tamed pet gets saved with the currentpetslot which is 100 due to the minipet!

roc13x commented 12 years ago

Yep he's right. I just tested that and reproduced the slot change and crash (not the duplicate character though..)

streetrat commented 12 years ago

that only happens if you summon pet1, then minipet, then save character... summon pet 2...minipet..save

pet 1 and 2 will have slot set to 100.. boom you have 2 chars on enum screen :)

XEQT commented 12 years ago

What type of minipet ? As it is now all pets that isent hunter pet get the slot 100, that why. I dident know that there where possible to use 2 pets at the time. What should it do on real server ? i really need to get hard facts, so that i know how to do it. And i am looking on a solution for multiple characters showing up.

roc13x commented 12 years ago

I tested using the minipet "Great Horned Owl" as the example. I would have to confirm it, but I believe that it doesn't let you summon a minipet/temp spawn without first dismissing the main hunter pet (the same result as trying to summon one of your hunter pets while another one is out)

roc13x commented 12 years ago

Oh, and the opposite happens too. You're able to summon a hunter pet while you have a minipet out already. The minipet should just automatically despawn when you call your pet

XEQT commented 12 years ago

Thanks for the info, i will start working on as soon as i get some free time.

Odysseum commented 12 years ago

Also the DK pets appears without spells, without spell bar, passive, I don't know if this is normal :S

Thanks.

roc13x commented 12 years ago

Ok, I got a definate answer on the retail workings with this. You actually ARE able to have a hunter pet and a minipet out at the same time :/ So the issue here is just the minipet messing with the slot ID of the hunter pet.

Odysseum commented 12 years ago

My players reports to me that when have a pet and they dismount, sometimes the server crashes...

Odysseum commented 12 years ago

Possibly this be the fix for this issue?

https://github.com/Darkpeninsula/Darkcore/commit/0f25933493b9aad8ad8c4246a9b44cb456e4361b

roc13x commented 12 years ago

Hope this takes care of the problems.. https://github.com/ProjectSkyfire/SkyFireEMU/pull/491 Prevents any of your hunter pets being slot 100

lockebr commented 12 years ago

Didnt work for me. Still crashing a lot.