Freeze when set to favsOnly and we have only one favorite pet
tflo opened this issue · 3 comments
Hi,
it’s me again ;)
Recently I helped someone with the Baal acquisition, and so I’ve set ZonePet to ‘Select from favorites only’ and made Uuna the only favorite.
I noticed that this produces intermittent freezes of at least 10 seconds, supposedly when the add-on is summoning a pet. I can also reproduce this by left-clicking the minimap button. (With any pet, not just Uuna, as long as it is the only favorite.)
It throws this error:
4x ZonePet\ZonePetSummon.lua:243: script ran too long
[string "@ZonePet\ZonePetSummon.lua"]:243: in function `ZonePet_pickRandomPet'
[string "@ZonePet\ZonePetSummon.lua"]:186: in function `ZonePet_summonRandomPet'
[string "@ZonePet\ZonePetSummon.lua"]:147: in function <ZonePet\ZonePetSummon.lua:69>
[string "=(tail call)"]: ?
[string "@ZonePet\ZonePetEvents.lua"]:92: in function `ZonePet_processEvent'
[string "@ZonePet\ZonePetEvents.lua"]:55: in function <ZonePet\ZonePetEvents.lua:15>
Locals:
favsOnly = true
startingPets = <table> {
1 = <table> {
}
}
numPets = 2569
numOwned = 2480
petList = <table> {
1 = <table> {
}
}
summonedPetGUID = "BattlePet-0-0000080DA0B7"
petIndex = 1
name = "Uuna"
id = "BattlePet-0-0000080DA0B7"
(*temporary) = <table> {
name = "Uuna"
ID = "BattlePet-0-0000080DA0B7"
}
(*temporary) = 1
(*temporary) = 1
(*temporary) = nil
(*temporary) = 25
(*temporary) = false
(*temporary) = false
(*temporary) = "Zur'aj the Depleted"
(*temporary) = 1386549
(*temporary) = 6
(*temporary) = 148846
(*temporary) = "|cFFFFD200Drop: |rTwilight Prophet Graeme|n|cFFFFD200Zone: |rDarkshore"
(*temporary) = "Once a mighty warrior of the n'raqi, Zur'aj's power was stolen and absorbed by an unknown rival."
(*temporary) = false
(*temporary) = true
(*temporary) = true
(*temporary) = false
(*temporary) = true
(*temporary) = true
(*temporary) = true
(*temporary) = <table> {
name = "Uuna"
ID = "BattlePet-0-0000080DA0B7"
}
(*temporary) = "script ran too long"
Selecting more than one favorite pet seems to “fix” the issue.
BTW, for the use-case above, I was using the “only favorites and make Uuna the only favorite” solution, because ZonePet’s lock-in functionality doesn’t seem to work properly.
I’m assuming that the Lock-In is meant to do this:
A) Don’t summon a different (zone or fav) pet when zone changes
B) Resummon the locked-in pet, if the pet is lost (due to portal, flying, log-out, whatever)
At least case B isn’t working for me. (Case A is harder to verify, and I’m not sure there.)
– Tom
Hi, and thanks for the report.
I will add a fix for only having a single favourite pet. ZonePet always tries to choose from more than one option, but it must be causing an infinite loop in this case.
The lock-in should always summon the same pet again, so I need to track that one down.
I've just released a new version which solves this issue and should make the lock-in work better too.