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

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