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

Error mousing over empty slot #225

Open
urnati opened this issue Sep 23, 2023 · 1 comment
Open

Error mousing over empty slot #225

urnati opened this issue Sep 23, 2023 · 1 comment

Comments

@urnati
Copy link

urnati commented Sep 23, 2023

Which software were you running?

  • Addon version name: 10.1.7
  • Client used:= Vanilla 1.14.4 / Classic Era
    Have you read the changelog?
    Mark if read.

Please describe the bug.
See error below.

Please describe how to reproduce it.

  1. Login to a character using only Scrap (I had + BugSack + BugGrabber + WoWLua) as addons
  2. Open all bags
  3. Mouse over an empty slot
  4. See error

Any Screenshots?
If applicable, please add screenshots to help explain your problem.

Error Logs are Important!
10x Scrap/addons/main/pricing.lua:42: attempt to index local 'info' (a nil value)
[string "@Scrap/addons/main/pricing.lua"]:42: in function <Scrap/addons/main/pricing.lua:40>
[string "=[C]"]: in function SetBagItem' [string "@FrameXML/ContainerFrame_Shared.lua"]:1362: in function ContainerFrameItemButton_OnEnter'
[string "*ContainerFrame.xml:184_OnEnter"]:1: in function <[string "*ContainerFrame.xml:184_OnEnter"]:1>

Locals:
tip = GameTooltip {
SetBorderBlendMode = defined @SharedXML/SharedTooltipTemplates.lua:302
layoutType = "TooltipDefaultLayout"
shoppingTooltips =

{
}
GetBackdropColor = defined @SharedXML/SharedTooltipTemplates.lua:290
BottomOverlay = Texture {
}
SetBackdropBorderColor = defined @SharedXML/SharedTooltipTemplates.lua:294
canAddRestStateLine = 1
NineSlice = Frame {
}
_hasPrice = true
comparing = false
TooltipBackdropOnLoad = defined @SharedXML/SharedTooltipTemplates.lua:271
TopOverlay = Texture {
}
GetBackdropBorderColor = defined @SharedXML/SharedTooltipTemplates.lua:298
needsReset = true
SetBackdropColor = defined @SharedXML/SharedTooltipTemplates.lua:286
0 =
updateTooltip = 0.061000
}
bag = 3
slot = 6
info = nil
(*temporary) = defined @Scrap/addons/main/pricing.lua:26
(*temporary) =
{
SendSignal = defined @Scrap/libs/WildAddon-1.0/WildAddon-1.0.lua:82
OnMail = defined @Scrap/addons/main/pricing.lua:60
OnBag = defined @Scrap/addons/main/pricing.lua:40
RegisterMessage = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
OnQuest = defined @Scrap/addons/main/pricing.lua:51
AddLine = defined @Scrap/addons/main/pricing.lua:26
OnSetCraftItem = defined @Scrap/addons/main/pricing.lua:73
SendMessage = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
UnregisterSignal = defined @Scrap/libs/WildAddon-1.0/WildAddon-1.0.lua:78
RegisterEvent = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
OnInventory = defined @Scrap/addons/main/pricing.lua:45
OnLink = defined @Scrap/addons/main/pricing.lua:77
OnSetTradeSkillItem = defined @Scrap/addons/main/pricing.lua:65
OnEnable = defined @Scrap/addons/main/pricing.lua:13
OnLoot = defined @Scrap/addons/main/pricing.lua:56
UnregisterAllEvents = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
RegisterSignal = defined @Scrap/libs/WildAddon-1.0/WildAddon-1.0.lua:74
NewModule = defined @Scrap/libs/WildAddon-1.0/WildAddon-1.0.lua:68
UnregisterEvent = defined @BugSack/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
Tag = "SCRAP
"
}
(*temporary) = GameTooltip {
SetBorderBlendMode = defined @SharedXML/SharedTooltipTemplates.lua:302
layoutType = "TooltipDefaultLayout"
shoppingTooltips =
{
}
GetBackdropColor = defined @SharedXML/SharedTooltipTemplates.lua:290
BottomOverlay = Texture {
}
SetBackdropBorderColor = defined @SharedXML/SharedTooltipTemplates.lua:294
canAddRestStateLine = 1
NineSlice = Frame {
}
__hasPrice = true
comparing = false
TooltipBackdropOnLoad = defined @SharedXML/SharedTooltipTemplates.lua:271
TopOverlay = Texture {
}
GetBackdropBorderColor = defined @SharedXML/SharedTooltipTemplates.lua:298
needsReset = true
SetBackdropColor = defined @SharedXML/SharedTooltipTemplates.lua:286
0 =
updateTooltip = 0.061000
}
(*temporary) = defined =[C]:-1
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'info' (a nil value)"
C =
{
lo

@atsolberg
Copy link

atsolberg commented Oct 21, 2023

Also seeing the same error. Same version and game client.

Seems like it's a C_Everwhere issue.
Changing the onBag event to do a nil check will fix it until there's a new version.
https://github.com/Jaliborc/Scrap/blob/master/addons/main/pricing.lua#L40-L43
Change that to:

function Prices.OnBag(tip, bag, slot)
    local info = C.GetContainerItemInfo(bag, slot)
    if info ~= nil then
        Prices:AddLine(tip, info.itemID, info.stackCount, true)
    end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants