[bug] Slash command produces `attempt to index field 'CategoryFrame' (a nil value)`
tflo opened this issue · 2 comments
When loading a set (profile) via slash command, I often – but not always – get this error:
attempt to index field 'CategoryFrame' (a nil value)
9x SimpleAddonManager/CategoryFrame.lua:379: attempt to index field 'CategoryFrame' (a nil value)
[string "@SimpleAddonManager/CategoryFrame.lua"]:379: in function `UpdateCategoryFrame'
[string "@SimpleAddonManager/Core.lua"]:184: in function `Update'
[string "@SimpleAddonManager/Profile.lua"]:102: in function `LoadAddonsFromProfile'
[string "@SimpleAddonManager/SlashCommand.lua"]:42: in function `func'
[string "@SimpleAddonManager/SlashCommand.lua"]:109: in function `?'
[string "@DataStore/libs/AceConsole-3.0-7/AceConsole-3.0.lua"]:90: in function `?'
[string "@FrameXML/ChatFrame.lua"]:5224: in function `ChatEdit_ParseText'
[string "@FrameXML/ChatFrame.lua"]:4888: in function `ChatEdit_SendText'
[string "@FrameXML/ChatFrame.lua"]:3132: in function <FrameXML/ChatFrame.lua:3125>
[string "=[C]"]: in function `RunMacroText'
[string "@FrameXML/SecureTemplates.lua"]:468: in function `handler'
[string "@FrameXML/SecureTemplates.lua"]:690: in function <FrameXML/SecureTemplates.lua:672>
...
[string "=[C]"]: in function `RunMacroText'
[string "@FrameXML/SecureTemplates.lua"]:468: in function `handler'
[string "@FrameXML/SecureTemplates.lua"]:690: in function <FrameXML/SecureTemplates.lua:672>
[string "@FrameXML/SecureTemplates.lua"]:704: in function <FrameXML/SecureTemplates.lua:697>
[string "@FrameXML/SecureTemplates.lua"]:746: in function <FrameXML/SecureTemplates.lua:730>
[string "=[C]"]: ?
[string "@FrameXML/SecureHandlers.lua"]:266: in function <FrameXML/SecureHandlers.lua:263>
[string "=[C]"]: ?
[string "@FrameXML/SecureHandlers.lua"]:296: in function <FrameXML/SecureHandlers.lua:279>
[string "=(tail call)"]: ?
Locals:
self = SimpleAddonManager {
0 = <userdata>
DidAddonStateChanged = <function> defined @SimpleAddonManager/MainFrame.lua:30
DisableAllAddOns = <function> defined @SimpleAddonManager/Core.lua:304
GetTitleText = <function> defined @SharedXML/PortraitFrame.lua:28
SetPortraitTexCoord = <function> defined @SharedXML/PortraitFrame.lua:87
GetDb = <function> defined @SimpleAddonManager/Core.lua:39
EnableAddOn = <function> defined @SimpleAddonManager/Core.lua:289
CATEGORY_SIZE_W = 250
GetPlayerInfo = <function> defined @SimpleAddonManager/Core.lua:311
TitleContainer = Frame {
}
UpdateOkButton = <function> defined @SimpleAddonManager/MainFrame.lua:48
ValidateCategoryName = <function> defined @SimpleAddonManager/CategoryFrame.lua:355
IsAddonInstalled = <function> defined @SimpleAddonManager/Core.lua:284
RegisterModule = <function> defined @SimpleAddonManager/Core.lua:262
ADDON_LOADED = <function> defined @SimpleAddonManager/Core.lua:334
SetCharacter = <function> defined @SimpleAddonManager/Core.lua:179
MIN_SIZE_W = 470
HookMenuButton = <function> defined @SimpleAddonManager/Core.lua:381
SetPortraitAtlasRaw = <function> defined @SharedXML/PortraitFrame.lua:83
Bg = SimpleAddonManagerBg {
}
ShowConfirmDialog = <function> defined @SimpleAddonManager/Core.lua:154
NineSlice = Frame {
}
SetPortraitTextureSizeAndOffset = <function> defined @SharedXML/PortraitFrame.lua:95
GetCharacter = <function> defined @SimpleAddonManager/Core.lua:175
SetCategoryVisibility = <function> defined @SimpleAddonManager/CategoryFrame.lua:384
PLAYER_ENTERING_WORLD = <function> defined @SimpleAddonManager/Core.lua:365
IsAddonCollapsed = <function> defined @SimpleAddonManager/Filters.lua:163
ShowInputDialog = <function> defined @SimpleAddonManager/Core.lua:140
SetPortraitShown = <function> defined @SharedXML/PortraitFrame.lua:91
GetModule = <function> defined @SimpleAddonManager/Core.lua:271
SetPortraitTextureRaw = <function> defined @SharedXML/PortraitFrame.lua:79
isMenuHooked = true
ShowDialog = <function> defined @SimpleAddonManager/Core.lua:106
UpdateCategoryFrame = <function> defined @SimpleAddonManager/CategoryFrame.lua:378
EnableAllAddOns = <function> defined @SimpleAddonManager/Core.lua:299
MIN_SIZE_H = 400
DisableAddOn = <function> defined @SimpleAddonManager/Core.lua:294
SetTitleMaxLinesAndHeight = <function> defined @SharedXML/PortraitFrame.lua:49
Initialize = <function> defined @SimpleAddonManager/Core.lua:200
GetCategoryTable = <function> defined @SimpleAddonManager/CategoryFrame.lua:362
DefaultPortraitTextureSizeAndOffset = <function> defined @SharedXML/PortraitFrame.lua:101
LocalizeCategoryName = <function> defined @SimpleAddonManager/CategoryFrame.lua:329
UpdateMemoryTickerPeriod = <function> defined @SimpleAddonManager/AddonListFrame.lua:404
UpdateListFilters = <function> defined @SimpleAddonManager/Filters.lua:300
GetAddonsList = <function> defined @SimpleAddonManager/Filters.lua:296
ToggleAddonCollapsed = <function> defined @SimpleAddonManager/Filters.lua:168
SetAddonCollapsed = <function> defined @SimpleAddonManager/Filters.lua:156
FormatMemory = <function> defined @SimpleAddonManager/Core.lua:252
SetBorder = <function> defined @SharedXML/PortraitFrame.lua:62
layoutType = "PortraitFrameTemplate"
DidAnyAddonStateChanged = <function> defined @SimpleAddonManager/MainFrame.lua:40
TableKeysToSortedList = <function> defined @SimpleAddonManage
I'm using the slash commands when logging out, for example in an OPie/M6 macro like this:
#icon inv_10_tailoring_bag2_color4
#label Std
/sam profile '130 Normal Std' ignore
#parse
/logout [mod:meta]
/stopmacro [mod]
/reload
But it can also happen if I enter the slash command manually in the chat. Despite the error, the profile is set correctly.
As said, the error does not appear always. It is possible that it depends on if I had opened the SAM GUI in that session, or if I did a reload somewhere before, not sure.
– Tom
The command was trying to update the interface at the end of the process, which would not have being created if you never opened it. Should be fixed now.