Dicebar / Raven

Raven add-on for World of Warcraft
9 stars 3 forks source link

LUA Error - Addon not working at all #85

Closed Andf closed 1 month ago

Andf commented 1 month ago

Apologies for opening another issue, this is exactlyuu the same as #78 (https://github.com/Dicebar/Raven/issues/78), it was indeed fixed at some point but I'm experiencing it again with r670:

51x bad argument #1 to '?' (Usage: local spellInfo = C_Spell.GetSpellInfo(spellIdentifier)) [string "=[C]"]: in functionGetSpellInfo' [string "@Raven/Shims.lua"]:88: in function GetSpellInfo' [string "@Raven/Main.lua"]:1094: in function <Raven/Main.lua:1065> [string "@Raven/Main.lua"]:1274: in functionUpdate' [string "@Raven/Main.lua"]:953: in function <Raven/Main.lua:949> [string "@Raven/Main.lua"]:984: in function `?' [string "@Altoholic/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...lic/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>

[string "@Altoholic/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...lic/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15> [string "@Altoholic/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `Fire' [string "@Bartender4/libs/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Bartender4/libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals: (*temporary) = "bad argument #1 to '?' (Usage: local spellInfo = C_Spell.GetSpellInfo(spellIdentifier))"`

Andf commented 1 month ago

For whatever reason, today it's working fine... Closing this issue and please accept my apologies for opening it!

Andf commented 1 month ago

Ok... I was not crazy.

It looks like this error is only happening for some characters and I can't figure why. Altoholic is not installed on my PC, it was in the past but the files are no longer there...

Dicebar commented 1 month ago

Which classes are you having problems with?

Also, which variant of the game? (classic, dragonflight, etc)

Andf commented 1 month ago

Game version is retail. It seems that this problem is only affecting characters who had logged with after 11.0 went live and with an older version of Raven. So far it's happening on my monk. It was happening on my pally as well but I fixed it changing the profile used (it didn't work with my monk though).

Andf commented 1 month ago

I deleted WoW Cache folder and now the error changed a little bit, still somewhat related to the same lib. I do have Bartender installed and it's the first addon loaded with this lib folder.

3x bad argument #1 to '?' (Usage: local spellInfo = C_Spell.GetSpellInfo(spellIdentifier)) [string "=[C]"]: in functionGetSpellInfo' [string "@Raven/Shims.lua"]:88: in function GetSpellInfo' [string "@Raven/Main.lua"]:1094: in function <Raven/Main.lua:1065> [string "@Raven/Main.lua"]:1274: in functionUpdate' [string "@Raven/Main.lua"]:953: in function <Raven/Main.lua:949> [string "@Raven/Main.lua"]:984: in function `?' [string "@Bartender4/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...er4/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>

[string "@Bartender4/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...er4/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15> [string "@Bartender4/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `Fire' [string "@Bartender4/libs/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Bartender4/libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals: (*temporary) = "bad argument #1 to '?' (Usage: local spellInfo = C_Spell.GetSpellInfo(spellIdentifier))"`

Dicebar commented 1 month ago

It seems that this problem is only affecting characters who had logged with after 11.0 went live and with an older version of Raven.

That would explain why I'm having a hard time recreating the bug myself... That actually helps a lot, thanks!

Andf commented 1 month ago

BTW, happy to run more tests, if needed!

Dicebar commented 1 month ago

Thanks :)

Is this bug still active after r672?

Dicebar commented 1 month ago

Or r673, since that fixes a variant of the same bug...

Gobiiiiii commented 1 month ago

Hey...its still there...it works on all my chars execpt the DH with the same lua error..checked profiles and stuff but its not working with the dh..

Dicebar commented 1 month ago

@Gobiiiiii: Could you ensure that you're running r673 and paste your error, please?

Andf commented 1 month ago

Just downloaded r673, problem seems to be gone! I'll keep an eye on it :) Many thanks!

BTW, may I ask what was the cause? I think Prat addon is having a similar issue...

Gobiiiiii commented 1 month ago

@Dicebar Hey...its gone...it updated it with curseforge with the latest update and thought it was r673..now i manuely installed it and it works...thanks for your help..really apriciate your work and your support..thanks a lot !!!!!!

Dicebar commented 1 month ago

You're welcome! 😄

Dicebar commented 1 month ago

@Andf:

BTW, may I ask what was the cause? I think Prat addon is having a similar issue...

There were a few issues occurring simultaneously...

In Dragonflight (so 10.0) they introduced a new talent system. Reading it out requires going through several layers of data, like first your active talent config, then the nodes of the talents, then the details of reach talent. For some reason, 11.0 contains "talents" without details like the spell ID. Which led to querying for a spell, like in the error, without a valid spell ID, and thus throwing an error (specifically, the definitionID can be empty in C_Traits.GetEntryInfo).

Another issue was that 10.0 had two ways to query details of spells, but 11.0 has removed one route. Specifically, we can no longer query for spell information based on the position in a spellbook (GetSpellInfo(index, bookType)). The alternate approach requires a spell ID, which can be found in C_SpellBook.GetSpellBookItemInfo. It's in a property called actionID, which in most cases is a spellID, but for pets is an encoded spell ID. I have no idea why Blizzard did that, but I hadn't noticed so for pets it was querying invalid spell IDs and throwing errors. Manually decoding the action ID into a spell ID fixed it.

I think those were the main two problems for this specific error.

Andf commented 1 month ago

@Andf:

BTW, may I ask what was the cause? I think Prat addon is having a similar issue...

There were a few issues occurring simultaneously...

In Dragonflight (so 10.0) they introduced a new talent system. Reading it out requires going through several layers of data...

Uh, that's a deep and clear explanation, I could understand it even without being a coder, many thanks!

Dicebar commented 1 month ago

You're welcome 😊