CoolLine (classic updated)

CoolLine (classic updated)

67.2k Downloads

[BUG][Retail]CoolLine does not work in WoW 9.0.1 - attempts to call SetBackdrop without inheriting backdrop template

Kream opened this issue ยท 6 comments

commented

Perhaps some relevant clues at this link - https://www.wowhead.com/news=316954/addons-now-available-for-use-in-shadowlands-beta

1x CoolLine\core.lua:245: attempt to call method 'SetBackdrop' (a nil value)
[string "@CoolLine\core.lua"]:245: in function <CoolLine\core.lua:218>
[string "@CoolLine\core.lua"]:334: in function `?'
[string "@CoolLine\core.lua"]:6: in function <CoolLine\core.lua:5>

Locals:
option = nil
(*temporary) = nil
(*temporary) = <unnamed> {
 0 = <userdata>
}
(*temporary) = <table> {
 edgeSize = 16
 edgeFile = "DialogFrame\UI-DialogBox-Border"
}
(*temporary) = "attempt to call method 'SetBackdrop' (a nil value)"
self = CoolLine {
 0 = <userdata>
 ClearCooldown = <function> defined @CoolLine\core.lua:359
 SPELL_UPDATE_COOLDOWN = <function> defined @CoolLine\core.lua:641
 chargespells = <table> {
 }
 frames = <table> {
 }
 border = <unnamed> {
 }
 bg = <unnamed> {
 }
 NewCooldown = <function> defined @CoolLine\core.lua:440
 UNIT_PET = <function> defined @CoolLine\core.lua:714
 PET_BATTLE_CLOSE = <function> defined =[C]:-1
 SetConfig = <function> defined @CoolLine\core.lua:54
 PET_BAR_UPDATE_COOLDOWN = <function> defined @CoolLine\core.lua:689
 PET_BATTLE_OPENING_START = <function> defined =[C]:-1
 PLAYER_LEAVING_WORLD = <function> defined @CoolLine\core.lua:349
 getConfig = <function> defined @CoolLine\core.lua:73
 SPELL_UPDATE_CHARGES = <function> defined @CoolLine\core.lua:641
 SPELLS_CHANGED = <function> defined @CoolLine\core.lua:579
 spells = <table> {
 }
 NO_RELOCATE = "NO_RELOCATE"
 UNIT_EXITED_VEHICLE = <function> defined @CoolLine\core.lua:754
 MainFrame = CoolLine {
 }
 UNIT_ENTERED_VEHICLE = <function> defined @CoolLine\core.lua:745
 ACTIONBAR_UPDATE_COOLDOWN = <function> defined @CoolLine\core.lua:725
 specialspells = <table> {
 }
 updatelook = <function> defined @CoolLine\core.lua:218
 cooldowns = <table> {
 }
 PLAYER_ENTERING_WORLD = <function> defined @CoolLine\core.lua:340
 BAG_UPDATE_COOLDOWN = <function> defined @CoolLine\core.lua:654
 UNIT_SPELLCAST_FAILED = <function> defined @CoolLine\core.lua:767
}
db = <table> {
 bgcolor = <table> {
 }
 border = "Blizzard Dialog"
 borderinset = 4
 h = 26
 fontsize = 10
 block = <table> {
 }
 iconplus = 4
 spellcolor = <table> {
 }
 nospellcolor = <table> {
 }
 inactivealpha = 0.500000
 bordercolor = <table> {
 }
 w = 371
 y = -156
 x = 37
 dbinit = 3
 activealpha = 1
 bordersize = 16
 font = "Friz Quadrata TT"
 fontcolor = <table> {
 }
 statusbar = "Blizzard"
}
NO_RELOCATE = "NO_RELOCATE"
smed = <table> {
 OverrideMedia = <table> {
 }
 callbacks = <table> {
 }
 LOCALE_BIT_zhTW = 8
 SetDefault = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:293
 GetDefault = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:289
 LOCALE_BIT_ruRU = 2
 UnregisterAllCallbacks = <function> defined @LibSharedMedia-3.0\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
 MediaType = <table> {
 }
 LOCALE_BIT_western = 128
 SetGlobal = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:280
 GetGlobal = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:276
 List = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:266
 HashTable = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:262
 MediaTable = <table> {
 }
 RegisterCallback = <function> defined @LibSharedMedia-3.0\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
 IsValid = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:258
 LOCALE_BIT_zhCN = 4
 UnregisterCallback = <function> defined @LibSharedMedia-3.0\CallbackHandler-1.0\CallbackHandler-1.0.lua:153
 Fetch = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:251
 DefaultMedia = <table> {
 }
 Register = <function> defined @BugSack\Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua:218
 MediaList = <table> {
 }
 LOCALE_BIT_koKR = 1
}
backdrop = <table> {
 edgeSize = 16
 edgeFile = "Inte

commented

someone good with LUA should have a dig at this and post here .. I fear this nice addon is abandoned

commented

Hi,
I received a few messages concerning an issue with 9.0.
TBH, I did not plan to play the game, but I will try to give a look.

I guess Blizzard made some API changes for 9.0 and give it a look to proposed link (https://www.wowhead.com/news=316954/addons-now-available-for-use-in-shadowlands-beta)

Possibly faulty line:

self.border:SetBackdrop(backdrop)

Any contribution is welcomed and highly encouraged.

commented

some docs

Okay, according to this post https://us.forums.blizzard.com/en/wow/t/addons-now-usable-in-shadowlands-beta/586355/16 and https://us.forums.blizzard.com/en/wow/t/addons-now-usable-in-shadowlands-beta/586355/17, the fix should be to change frame creation logic as such:

Before 9.0:

name = "my_awesome_frame_name"
f =  CreateFrame("Frame", name ...)
my_backdrop = CreateFrame("Frame", name.."Backdrop", f)

After 9.0:

name = "my_awesome_frame_name"
f =  CreateFrame("Frame", name ...)
my_backdrop = CreateFrame("Frame", name.."Backdrop", f, "BackdropTemplate")

There should be some code to test game version and provide nil (prior to 9.0) or "BackdropTemplate" (after 9.0) to the CreateFrame service.
I'll try to make a branch for 9.0, if some of you want to test, i'll tell you when its ready (requires you to be familiar with git repo version installation and risk of losing CoolLine configuration)

An example from link above:

local wowversion, wowbuild, wowdate, wowtocversion = GetBuildInfo()
local wowtextversion
if wowtocversion and wowtocversion < 19999 then wowtextversion = "Classic" end 
if wowtocversion and wowtocversion > 19999 and wowtocversion < 90000 then wowtextversion = "Retail" end -- this is useless in the example
if wowtocversion and wowtocversion > 90000 then 
	wowtextversion      = "Beta"
	AddonBackdropTemplate = "BackdropTemplate"
end 
local f = CreateFrame("Frame", "MyAddon", UIParent, AddonBackdropTemplate)

okay, so what about CoolLine ?

CoolLine already has some (ugly) specific code similar to this, see this:

local IS_WOW_8 = GetBuildInfo():match("^8")

So it shouldn't be too difficult to create a branch and test this.

Just to be clear: I won't code any "beta" or PTR specific stuff

commented

Fix prepare in preparation of release for 9.0 branch #14

commented

alpha version https://github.com/LoneWanderer-GH/CoolLine/releases/tag/9.0.000-alpha.1and also on curse forge (be sure to force twitch to download alpha channel)

commented

Fixed in #14 and available in release https://github.com/LoneWanderer-GH/CoolLine/tree/9.0.000-beta.1
Ticket will be closed when first addon release version will be pushed.