AceConfigDialog-3.0 throws an error 'rootframe' (a nil value) when using select with style 'radio' #526


  • New
Open
  • p1ten created this issue Oct 24, 2019

    Ok, I'm going to try and explain this to the best of my abilities.

     

    The problem occurs when switching between two child blizzard option menus that both have an select list.

    The error is as follows: 

    Message: ...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:903: attempt to index field 'rootframe' (a nil value)
    Time: Thu Oct 24 18:40:01 2019
    Count: 1
    Stack: ...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:903: attempt to index field 'rootframe' (a nil value)
    (tail call): ?
    ...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:903: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:900>
    [C]: ?
    ...SpellAnnouncerClassic\Libs\AceGUI-3.0\AceGUI-3.0.lua:72: in function <...SpellAnnouncerClassic\Libs\AceGUI-3.0\AceGUI-3.0.lua:70>
    ...SpellAnnouncerClassic\Libs\AceGUI-3.0\AceGUI-3.0.lua:287: in function `Fire'
    ...ic\Libs\AceGUI-3.0\widgets\AceGUIWidget-CheckBox.lua:68: in function <...ic\Libs\AceGUI-3.0\widgets\AceGUIWidget-CheckBox.lua:57>
    
    Locals: <none>

     I'm using the Blizzard Options Menus by doing the following.

    One parent and two children:

    LibStub("AceConfig-3.0"):RegisterOptionsTable("SAC_Options", SAC.Options)
    	self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("SAC_Options", SAC.Options.name)
    	LibStub("AceConfig-3.0"):RegisterOptionsTable("SAC_Options_Auras", SAC.Options_Auras)
    	self.optionsAurasFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("SAC_Options_Auras", SAC.Options_Auras.name, SAC.Options.name)
    	LibStub("AceConfig-3.0"):RegisterOptionsTable("SAC_Options_Resists", SAC.Options_Resists)
    	self.optionsResistsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("SAC_Options_Resists", SAC.Options_Resists.name, SAC.Options.name)

     I have stripped down the content of the submenus to the bare minimum, so they look like this.

    SAC.Options = {
    	name = "SpellAnnouncer Classic",
    	handler = SAC,
    	type = 'group',
    	args = {
    
    	},
    }
    
    SAC.Options_Auras = {
    	name = "Auras",
    	handler = SAC,
    	type = 'group',
    	args = {
    		auras = {
    			order = 10,
    			type = 'select',
    			name = 'Auras',
    			values = SAC.namedAuraList,
    			style = 'radio',
    			set = 'SetAuraOptions',
    			get = 'Get',
    		},
    	},
    }
    SAC.Options_Resists = {
    	name = "Resists",
    	handler = SAC,
    	type = 'group',
    	args = {
    		spells = {
    			order = 10,
    			type = 'select',
    			name = 'Spells',
    			values = SAC.namedResistList,
    			style = 'radio',
    			set = 'SetResistOptions',
    			get = 'Get',
    		},
    	},
    }

     If i have a setter or getter function added to the select boxes makes no difference.

     

    The problem occurs if I select a value on one submenu, then switch to the other submenu and again select a value (It doesnt occur all the time, but its quite easy to get it to occur by selecting a specific value).

     

    By removing the radio style from the select lists the problem goes away.

     

    Let me know if there is anything else I can do to make it more clear.

    Link to full sourcecode is here https://github.com/p1tcode/SpellAnnouncerClassic/tree/ace

     

    This is in Wow Classic if that makes any difference. :)

     

    Regards

    Per Ivar Thorrud

     

  • p1ten added a tag New Oct 24, 2019
  • p1ten edited description Oct 24, 2019
  • p1ten edited description Oct 25, 2019
  • StormFX posted a comment Sep 2, 2020

    I'm getting a similar error but with a button that calls InterfaceOptionsFrame_OpenToCategory after loading some options. Everything loads and works, but the error pops up.

    Message: ...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:848: attempt to index field 'rootframe' (a nil value)

    Edit: After testing it, it does seems to be an issue with switching between panels, etc, while a widget is still active. If I click the button and the underlying function switch panels as part of the call, it throws the error.

     

    Edit2: Using a confirmation dialog for the button bypasses the error.


    Edited Sep 5, 2020
  • millanzarreta posted a comment May 3, 2025

    I was going to open a new issue because this error was occurring in my addon (ClassicUI) in the last version, but I think it's the same error that this, so I leave a comment here instead.

     

    The LUA error is related to the radio select buttons. Also, as the previous comments on this issue indicate, it does seem to be an issue with switching between panels, etc., while a widget is still active. I mention this because in previous versions of my addon, where there were only several radio select buttons on the same panel, this error didn't occur, but adding more radio select buttons to another panel in the new version causes this error. Additionally, this error only occurs if I first access one panel and then the other, if I access one of the panels with the radio select buttons directly the error doesn't occur.

     

    Steps to reproduce the error in WoW Retail 11.1.5:

    1. Install ClassicUI addon (v2.1.2 version): https://www.curseforge.com/wow/addons/classicui/files/6482823
    2. Enter the game disabling all addons except ClassicUI, !BugGrabber and BugSack
    3. Execute the /classicui slash command in chat to open the ClassicUI options
    4. Click in the "Extra Frames" subcategory option (from ClassicUI addon options)
    5. Click any of the select radio buttons in the right panel: this triggers the error

    As I mentioned earlier, if you access the panel of these select radio buttons directly in step 2 (executing the /classicui extraframes slash command instead of /classicui to directly access the "Extra Frames" subcategory option without going through the main category option) the error does not occur.

     

    The LUA error is the following:

     

    ====================================

    1x ...nfig-3.0/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua:896: attempt to index field 'rootframe' (a nil value)
    [ClassicUI/Libs/AceConfig-3.0-3/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua]:896: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:893>
    [C]: ?
    [ClassicUI/Libs/AceGUI-3.0-41/AceGUI-3.0.lua]:66: in function <...faceClassicUI/Libs/AceGUI-3.0/AceGUI-3.0.lua:64>
    [ClassicUI/Libs/AceGUI-3.0-41/AceGUI-3.0.lua]:300: in function 'Fire'
    [ClassicUI/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-CheckBox.lua]:64: in function <...UI/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua:53>
    
    Locals:
    widget = <table> {
     checkbg = Texture {
     }
     parent = <table> {
     }
     image = Texture {
     }
     userdata = <table> {
     }
     base = <table> {
     }
     disabled = false
     type = "CheckBox"
     AceGUIWidgetVersion = 26
     checked = false
     text = FontString {
     }
     events = <table> {
     }
     highlight = Texture {
     }
     check = Texture {
     }
     frame = Button {
     }
    }
    event = "OnValueChanged"
    user = <table> {
    }
    (*temporary) = nil
    (*temporary) = nil
    (*temporary) = 0
    (*temporary) = false
    (*temporary) = <table> {
     checkbg = Texture {
     }
     parent = <table> {
     }
     image = Texture {
     }
     userdata = <table> {
     }
     base = <table> {
     }
     disabled = false
     type = "CheckBox"
     AceGUIWidgetVersion = 26
     checked = false
     text = FontString {
     }
     events = <table> {
     }
     highlight = Texture {
     }
     check = Texture {
     }
     frame = Button {
     }
    }
    (*temporary) = "OnValueChanged"
    (*temporary) = <table> {
    }
    (*temporary) = <table> {
     type = "select"
     order = 2
     desc = "Select your preferred arrangement for some Minimap elements. This option will determine their main position. Some of the other options relative to these elements will also be restored to their preferred values, although you can always change them later."
     style = "radio"
     name = "Preferred base arrangement type for Minimap elements"
     values = <table> {
     }
     width = "normal"
    }
    (*temporary) = "attempt to index field 'rootframe' (a nil value)"
    emptyTbl = <table> {
    }
    AceConfigDialog = <table> {
     tooltip = AceConfigDialogTooltip {
     }
     BlizOptions = <table> {
     }
     popup = Frame {
     }
     OpenFrames = <table> {
     }
     Status = <table> {
     }
     frame = Frame {
     }
    }

     

    ====================================

     

    ClassicUI v2.1.2 uses the latest Ace3 Release library version (Release-r1349). I've also tried using the latest Ace3 Alpha library version (r1360-alpha) instead, and the error still occurs (in this case, the error occurs on line :899 instead of line :896).


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