[r226] Stack overflow #458


  • Defect
  • Started
Open
  • Sygon_Paul created this issue May 29, 2013

    What is the nature of the defect?

    • Causes stack overflow in Prat, possibly other chat AddOns during first-run tradeskill scan

    What (if anything) triggers the defect? (happens when loading, when activating the mod, when clicking a particular button, etc)

    • Install Gnomeworks and let it scan tradeskills

    Please post any error messages associated with the defect.

    35x C stack overflow
    <in C code>
    <string>:"safecall Dispatcher[1]":13: in function "?"
    Ace3-Release-r1086\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:92: in function "Fire"
    Ace3-Release-r1086\AceEvent-3.0\AceEvent-3.0-3.lua:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
    <in C code>
    Libs\LibExtraTip\LibExtraTip.lua:387: in function <Libs\LibExtraTip\LibExtraTip.lua:381>
    <in C code>
    <in C code>
    <in C code>
    FrameXML\ItemRef.lua:237: in function <FrameXML\ItemRef.lua:1>
    <in C code>
    <in C code>
    ItemRef.lua:237: in function <FrameXML\ItemRef.lua:1>
    <in C code>
    <in C code>
    RealIDToons-2.1.18\Core.lua:451: in function <RealIDToons\Core.lua:434>
    Blizzard_CombatLog\Blizzard_CombatLog.lua:3573: in function "orgfunc"
    Prat-3.0-3.5.6\services\links.lua:98: in function <Prat-3.0\services\links.lua:88>
    (tail call): ?
    (tail call): ?
    GnomeWorks-r226\Libs\LIbTradeSkillScan.lua:203: in function "func"
    Ace3-Release-r1086\AceTimer-3.0\AceTimer-3.0-16.lua:43: in function <Ace3\AceTimer-3.0\AceTimer-3.0.lua:36>
    
    Locals:
    nil
    

    And

    7x Prat-3.0-3.5.6\services\links.lua:90: C stack overflow
    Prat-3.0-3.5.6\services\links.lua:90: in function <Prat-3.0\services\links.lua:88>
    (tail call): ?
    (tail call): ?
    GnomeWorks-r226\Libs\LIbTradeSkillScan.lua:203: in function <GnomeWorks\Libs\LIbTradeSkillScan.lua:196>
    GnomeWorks-r226\Libs\LIbTradeSkillScan.lua:240: in function <GnomeWorks\Libs\LIbTradeSkillScan.lua:216>
    GnomeWorks-r226\Libs\LIbTradeSkillScan.lua:327: in function <GnomeWorks\Libs\LIbTradeSkillScan.lua:270>
    GnomeWorks-r226\Libs\LIbTradeSkillScan.lua:388: in function <GnomeWorks\Libs\LIbTradeSkillScan.lua:386>
    <in C code>
    Libs\LibExtraTip\LibExtraTip.lua:387: in function <Libs\LibExtraTip\LibExtraTip.lua:381>
    <in C code>
    <in C code>
    <in C code>
    ItemRef.lua:237: in function <FrameXML\ItemRef.lua:1>
    <in C code>
    <in C code>
    RealIDToons-2.1.18\Core.lua:451: in function <RealIDToons\Core.lua:434>
    Blizzard_CombatLog\Blizzard_CombatLog.lua:3573: in function "orgfunc"
    Prat-3.0-3.5.6\services\links.lua:98: in function <Prat-3.0\services\links.lua:88>
    (tail call): ?
    (tail call): ?
    GnomeWorks-r226\Libs\LIbTradeSkillScan.lua:203: in function "func"
    Ace3-Release-r1086\AceTimer-3.0\AceTimer-3.0-16.lua:43: in function <Ace3\AceTimer-3.0\AceTimer-3.0.lua:36>
    
    Locals:
    (*temporary) = <func> =[C]:-1
    
  • Sygon_Paul added the tags New Defect May 29, 2013
  • _ForgeUser280725 posted a comment May 30, 2013

    yeah, stack overflow is a risk of how many skills to scan per frame. perhaps 30 is too many.

    my initial guess at what's happening is that prat is hooking SetItemRef() and causing additional stack depth. i wonder if there's some means to circumvent this or even dynamically determine the depth of each call to SetItemRef() to adjust things accordingly.

    i could dial back the number of skills per frame and hope it's enough, but a a better solution would be to make it aware of the potential probalem and able to mitigate it internally.

  • _ForgeUser280725 posted a comment May 30, 2013

    i reworked things to use the direct ItemRefTooltip:SetHyperlink() call

    that should reduce some overhead in function calls.

    i don't use prat so i haven't tested it against that mod.

  • _ForgeUser280725 removed a tag New May 30, 2013
  • _ForgeUser280725 added a tag Started May 30, 2013
  • gouges2 posted a comment May 30, 2013

    Not sure if it helps in swatter but here it is.
    Date: 2013-05-30 16:39:36
    ID: 1
    Error occured in: Global
    Count: 1
    Message: C stack overflow
    Debug:
       [C]: ShowUIPanel()
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:206
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:197
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:247
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:223
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:337
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:277
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:398
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:396
       [C]: ?
       [C]: ?
       BadBoy\BadBoy.lua:946
          BadBoy\BadBoy.lua:929
       ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:387
          ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
       [C]: ?
       [C]: ?
       BasicChatMods\timestamp.lua:35
          BasicChatMods\timestamp.lua:30
       BasicChatMods\urlcopy.lua:64
          BasicChatMods\urlcopy.lua:59
       [C]: ?
       [C]: SetHyperlink()
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:210
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:197
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:247
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:223
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:337
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:277
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:398
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:396
       [C]: ?
       ...
       BasicChatMods\timestamp.lua:35
          BasicChatMods\timestamp.lua:30
       BasicChatMods\urlcopy.lua:64
          BasicChatMods\urlcopy.lua:59
       [C]: ?
       [C]: SetHyperlink()
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:210
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:197
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:247
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:223
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:337
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:277
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:398
          ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:396
       [C]: ?
       [C]: ?
       BadBoy\BadBoy.lua:946
          BadBoy\BadBoy.lua:929
       ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:387
          ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
       [C]: ?
       [C]: ?
       BasicChatMods\timestamp.lua:35
          BasicChatMods\timestamp.lua:30
       BasicChatMods\urlcopy.lua:64
          BasicChatMods\urlcopy.lua:59
       [C]: ?
       [C]: SetHyperlink()
       ...terface\AddOns\GnomeWorks\Libs\LIbTradeSkillScan.lua:210 func()
       ...\AddOns\DataStore\libs\AceTimer-3.0\AceTimer-3.0.lua:43
          ...\AddOns\DataStore\libs\AceTimer-3.0\AceTimer-3.0.lua:36
    Locals:
    (*temporary) = ItemRefTooltip {
     0 = <userdata>
     SetQuestLogRewardSpell = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetSpellBookItem = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetHyperlink = <function> defined =[C]:-1
     SetTradeSkillItem = <function> defined =[C]:-1
     SetVoidItem = <function> defined =[C]:-1
     SetVoidDepositItem = <function> defined =[C]:-1
     SetVoidWithdrawalItem = <function> defined =[C]:-1
     SetQuestRewardSpell = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     ARK_Data = <table> {
     }
     SetPetAction = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetUnitDebuff = <function> defined =[C]:-1
     SetLootItem = <function> defined =[C]:-1
     SetQuestItem = <function> defined =[C]:-1
     SetTrainerService = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetInboxItem = <function> defined =[C]:-1
     SetBuybackItem = <function> defined =[C]:-1
     shoppingTooltips = <table> {
     }
     SetHyperlinkCompareItem = <function> defined =[C]:-1
     SetMerchantItem = <function> defined =[C]:-1
     SetQuestLogItem = <function> defined =[C]:-1
     tfade = <unnamed> {
     }
     SetTradeTargetItem = <function> defined =[C]:-1
     SetTalent = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetTradePlayerItem = <function> defined =[C]:-1
     SetIconTextureAndText = <function> defined @Interface\AddOns\TipTacItemRef\core.lua:50
     SetSendMailItem = <function> defined =[C]:-1
     UpdateTooltip = <function> defined @Interface\AddOns\EquipA\EquipA.lua:3
     updateTooltip = 0.2
     SetInventoryItem = <function> defined =[C]:-1
     ttIcon = <unnamed> {
     }
     ttCount = <unnamed> {
     }
     SetLootRollItem = <function> defined =[C]:-1
     SetUnitAura = <function> defined =[C]:-1
     SetCurrencyToken = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetAuctionSellItem = <function> defined =[C]:-1
     SetBagItem = <function> defined =[C]:-1
     SetShapeshift = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetGuildBankItem = <function> defined =[C]:-1
     SetUnitBuff = <function> defined =[C]:-1
     SetUnit = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetAuctionItem = <function> defined =[C]:-1
    }
    (*temporary) = <function> defined @Interface\FrameXML\UIParent.lua:2231
    (*temporary) = ItemRefTooltip {
     0 = <userdata>
     SetQuestLogRewardSpell = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetSpellBookItem = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetHyperlink = <function> defined =[C]:-1
     SetTradeSkillItem = <function> defined =[C]:-1
     SetVoidItem = <function> defined =[C]:-1
     SetVoidDepositItem = <function> defined =[C]:-1
     SetVoidWithdrawalItem = <function> defined =[C]:-1
     SetQuestRewardSpell = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     ARK_Data = <table> {
     }
     SetPetAction = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetUnitDebuff = <function> defined =[C]:-1
     SetLootItem = <function> defined =[C]:-1
     SetQuestItem = <function> defined =[C]:-1
     SetTrainerService = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetInboxItem = <function> defined =[C]:-1
     SetBuybackItem = <function> defined =[C]:-1
     shoppingTooltips = <table> {
     }
     SetHyperlinkCompareItem = <function> defined =[C]:-1
     SetMerchantItem = <function> defined =[C]:-1
     SetQuestLogItem = <function> defined =[C]:-1
     tfade = <unnamed> {
     }
     SetTradeTargetItem = <function> defined =[C]:-1
     SetTalent = <function> defined @Interface\AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:381
     SetTradePlayerItem = <function> defined =[C]:-1
     SetIconTextureAndText = <function> defined @Interface\AddOns\TipTacItemRef\core.lua:50
     SetSendMailItem = <function> defined =[C]:-1
     Update

  • _ForgeUser280725 posted a comment May 30, 2013

    i'll reduce the depth throttle down to 10 and see if that helps. it'd be nice if it could check the actual call stack to determine the depth dynamically to avoid going too deep. i don't really care for arbitrary limits like this. if too many mods hook the sethyperlink method, it could still blow up.

  • brykrys posted a comment May 31, 2013

    Does it need to use ItemRefTooltip? Could it work with a private tooltip, that no other AddOn can hook into?

  • _ForgeUser280725 posted a comment May 31, 2013

    yeah, i could try that. i kind of assumed the ItemRefTooltip was somewhat special when it came to these kinds of things, but perhaps not.

  • _ForgeUser280725 posted a comment May 31, 2013

    so it seems to work using a private tooltip. so that's make things much simpler, i think. good to know.


    Edited May 31, 2013

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