Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profession filter dropdowns can trigger a C stack overflow #682

Open
Meorawr opened this issue Nov 7, 2024 · 0 comments
Open

Profession filter dropdowns can trigger a C stack overflow #682

Meorawr opened this issue Nov 7, 2024 · 0 comments
Labels
Bug Something isn't working Classic Default UI Issue affects the default interface and is not necessarily an API bug

Comments

@Meorawr
Copy link
Collaborator

Meorawr commented Nov 7, 2024

Opening profession windows in Classic can trigger C stack overflow errors when setting up the item subclass filter dropdown.

Details

  1. The TradeSkillFrame_SetupSubClassDropdown function calls SetTradeSkillSubClassFilter. This appears to trigger the TRADE_SKILL_UPDATE event to fire.
  2. The handler for that event calls TradeSkillFrame_Update.
  3. The TradeSkillFrame_Update function recurses back into TradeSkillFrame_SetupSubClassDropdown.
  4. Go back to step 1 :)

This could probably be resolved by just reordering the currentTradeSkillName = name; assignment in TradeSkillFrame_Update to occur before the call into TradeSkillFrame_SetupSubClassDropdown.

Test case

You'll need a character with two professions learned - I've been able to reproduce this with Mining and Blacksmithing learned, and another player has also reproduced this with Mining and Jewelcrafting.

  1. Open the professions window.
  2. Click "Smelting" to open the Mining professions window.
  3. Close the Mining professions window.
  4. Click "Blacksmithing" (or Jewelcrafting) to open the other professions window.

At step four you should run into a bunch of C stack overflow errors. An example is provided below:

Message: C stack overflow
Time: Thu Nov  7 00:14:15 2024
Count: 1
Stack: C stack overflow
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:336: in function `TradeSkillFrame_SetSelection'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:135: in function <...lizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua:127>
[string "=[C]"]: in function `SetTradeSkillSubClassFilter'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:50: in function `TradeSkillFrame_SetupSubClassDropdown'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:160: in function `TradeSkillFrame_Update'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:141: in function <...lizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua:127>
[string "=[C]"]: in function `SetTradeSkillSubClassFilter'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:50: in function `TradeSkillFrame_SetupSubClassDropdown'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:160: in function `TradeSkillFrame_Update'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:141: in function <...lizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua:127>
[string "=[C]"]: in function `SetTradeSkillSubClassFilter'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:50: in function `TradeSkillFrame_SetupSubClassDropdown'
...
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:160: in function `TradeSkillFrame_Update'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:141: in function <...lizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua:127>
[string "=[C]"]: in function `SetTradeSkillSubClassFilter'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:50: in function `TradeSkillFrame_SetupSubClassDropdown'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:160: in function `TradeSkillFrame_Update'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:141: in function <...lizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua:127>
[string "=[C]"]: in function `SetTradeSkillSubClassFilter'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:50: in function `TradeSkillFrame_SetupSubClassDropdown'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:160: in function `TradeSkillFrame_Update'
[string "@Interface/AddOns/Blizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua"]:141: in function <...lizzard_TradeSkillUI/Wrath/Blizzard_TradeSkillUI.lua:127>

Locals: id = 2
skillName = "Iron Shield Spike"
skillType = "optimal"
numAvailable = 0
isExpanded = nil
altVerb = nil
creatable = 1
color = <table> {
 b = 0.250000
 font = "GameFontNormalLeftOrange"
 g = 0.500000
 r = 1
}
@Meorawr Meorawr added Bug Something isn't working Classic Default UI Issue affects the default interface and is not necessarily an API bug labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Classic Default UI Issue affects the default interface and is not necessarily an API bug
Projects
None yet
Development

No branches or pull requests

1 participant