WoTLK Classic: AceGUIWidget-ColorPicker.lua calling GetColorAlpha (A nil value) #654


Closed
  • TULOA created this issue Feb 18, 2024

    It appears that the ColorPicker version check is failing on 30403.

     

    If you replace:

     

    if ColorPickerFrame.SetupColorPickerAndShow then -- 10.2.5 color picker overhaul

     

    To:

     

    if (select(4, GetBuildInfo())) > 100205 then -- 10.2.5 color picker overhaul

     

    Then it works fine.


    It appears 3.4.3 has the function its checking for but not GetColorAlpha.

    This is line 58.

    If you check by the Interface version instead and require it greater than the version that has it you will find it loads fine.

    Maybe we need to use a direct version check that way or if its  3.4.3 and has the function we have another declaration?

     

     

    Side note: Thinking on this I would say the fix should be something like the below as it started on that version so all after the below would be fine

     

    if (select(4, GetBuildInfo())) > 100204 then

     

     

     

     

     

     

     

     

     

     

     

    For the debug log I am getting:

    47x ...Libs/AceGUI-3.0-41/widgets/AceGUIWidget-ColorPicker.lua:64: attempt to call method 'GetColorAlpha' (a nil value)
    [string "@Bagnon_ItemInfo/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-ColorPicker.lua"]:64: in function `func'
    [string "*ColorPickerFrame.xml:157_OnColorSelect"]:3: in function <[string "*ColorPickerFrame.xml:157_OnColorSelect"]:1>
    [string "=[C]"]: in function `SetColorRGB'
    [string "@FrameXML/UIDropDownMenu.lua"]:1451: in function `OpenColorPicker'
    [string "@BagBrother/libs/Sushi-3.2-1/classes/checks/Color.lua"]:23: in function `SetupColorPickerAndShow'
    [string "@Bagnon_ItemInfo/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-ColorPicker.lua"]:85: in function <...Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:49>

    Locals:
    r = 0.309804
    g = 0.478431
    b = 1
    (*temporary) = nil
    (*temporary) = ColorPickerFrame {
    BottomLeftCorner = Texture {
    }
    OnBackdropLoaded = <function> defined @SharedXML/Backdrop.lua:152
    GetBackdropColor = <function> defined @SharedXML/Backdrop.lua:390
    TopLeftCorner = Texture {
    }
    RightEdge = Texture {
    }
    SetupColorPickerAndShow = <function> defined @BagBrother/libs/Sushi-3.2/classes/checks/Color.lua:23
    ApplyBackdrop = <function> defined @SharedXML/Backdrop.lua:294
    SetBackdrop = <function> defined @SharedXML/Backdrop.lua:329
    ClearBackdrop = <function> defined @SharedXML/Backdrop.lua:282
    hasOpacity = true
    GetBackdropBorderColor = <function> defined @SharedXML/Backdrop.lua:409
    GetBackdrop = <function> defined @SharedXML/Backdrop.lua:347
    SetBorderBlendMode = <function> defined @SharedXML/Backdrop.lua:266
    opacity = 1
    func = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:62
    backdropInfo = <table> {
    }
    OnBackdropSizeChanged = <function> defined @SharedXML/Backdrop.lua:182
    HasBackdropInfo = <function> defined @SharedXML/Backdrop.lua:278
    GetEdgeSize = <function> defined @SharedXML/Backdrop.lua:188
    cancelFunc = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:76
    0 = <userdata>
    TopEdge = Texture {
    }
    previousValues = <table> {
    }
    TopRightCorner = Texture {
    }
    Center = Texture {
    }
    SetupTextureCoordinates = <function> defined @SharedXML/Backdrop.lua:214
    SetBackdropBorderColor = <function> defined @SharedXML/Backdrop.lua:422
    BottomEdge = Texture {
    }
    BottomRightCorner = Texture {
    }
    SetupPieceVisuals = <function> defined @SharedXML/Backdrop.lua:246
    SetBackdropColor = <function> defined @SharedXML/Backdrop.lua:399
    LeftEdge = Texture {
    }
    opacityFunc = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:69
    }
    (*temporary) = "attempt to call method 'GetColorAlpha' (a nil value)"
    ColorCallback = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:17
    self = <table> {
    a = 1
    b = 1
    parent = <table> {
    }
    g = 0.478431
    OnAcquire = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:120
    SetDisabled = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:147
    userdata = <table> {
    }
    base = <table> {
    }
    HasAlpha = true
    type = "ColorPicker"
    SetHasAlpha = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:143
    r = 0.309804
    text = FontString {
    }
    width = "fill"
    colorSwatch = Texture {
    }
    events = <table> {
    }
    AceGUIWidgetVersion = 27
    frame = Button {
    }
    SetLabel = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:131
    SetColor = <function> defined @Bagnon_ItemInfo/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua:135
    }



  • TULOA edited title Feb 18, 2024
  • nevcairiel closed issue Feb 20, 2024
  • nevcairiel posted a comment Feb 20, 2024

    Wrath does not have SetupColorPickerAndShow. You have an addon that adds it, and breaks the check.

     

    It looks like its in this file: BagBrother/libs/Sushi-3.2-1/classes/checks/Color.lua

    Which appears to be part of Bagnon.

     

    Please complain to them and remind them that modifying global UI state is terrible.


To post a comment, please login or register a new account.