Farming Bar

Farming Bar

63.7k Downloads

[BUG] Bars.lua:534: attempt to compare number with nil

rbpaiett opened this issue ยท 6 comments

commented

Describe the bug
I was in a raid in MC and I was hiding a bar because it was covering the raid icons and this error appeared:

3x FarmingBar\Core\Bars.lua:534: attempt to compare number with nil
[string "@FarmingBar\Core\Bars.lua"]:534: in function <FarmingBar\Core\Bars.lua:533>

Locals:
self = FarmingBarBar4AnchorButtonIDEditBox {
0 =
}
(*temporary) = nil
(*temporary) = 100
(*temporary) = nil
(*temporary) = ""
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"
addon =

{
modules =
{
}
CancelTimer = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:147
SetObjectiveID = defined @FarmingBar\Core\Buttons.lua:125
DrawShoppingListGroup = defined @FarmingBar\Modules\ObjectiveBuilder.lua:867
RemoveBar = defined @FarmingBar\Core\Bars.lua:651
SetDefaultModulePrototype = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:409
IsEnabled = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:451
ScheduleTimer = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:94
minButtonPadding = -3
maxButtonPadding = 20
MoveShoppingList = defined @FarmingBar\Modules\ItemMover.lua:226
SortObjectives = defined @FarmingBar\Modules\ObjectiveBuilder.lua:1096
UnregisterMessage = defined @datastore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:153
DeleteTemplate = defined @FarmingBar\Modules\Templates.lua:90
ResetProfile = defined @FarmingBar\Core\Bars.lua:683
db =
{
}
SetEnabledState = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:424
GetDirection = defined @FarmingBar\Core\Buttons.lua:101
barProgress = "%B progress: %progressColor%%c/%t%color%%if(%p>0, (%p%%),)if%"
OnEnable = defined @FarmingBar\Core\Core.lua:10
CreateDataObject = defined @FarmingBar\Options\Interface.lua:10
bagIDs =
{
}
minFontSize = 4
MoveItems = defined @FarmingBar\Modules\ItemMover.lua:187
OnInitialize = defined @FarmingBar\Core\Core.lua:47
UnregisterAllEvents = defined @datastore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
ParseBarAlert = defined @FarmingBar\Core\Bars.lua:86
CreateButton = defined @FarmingBar\Core\Buttons.lua:113
maxFontSize = 32
directionInfo =
{
}
UpdateMedia = defined @FarmingBar\Modules\Skin.lua:232
ConvertDB = defined @FarmingBar\Data\Database.lua:8
GetName = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:279
GetOptions = defined @FarmingBar\Options\Interface.lua:2604
DrawItemGroup = defined @FarmingBar\Modules\ObjectiveBuilder.lua:478
name = "Farming Bar"
Disable = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:314
Print = defined @datastore\libs\AceConsole-3.0\AceConsole-3.0.lua:54
ObjectiveBuilder =
{
}
templates =
{
}
CreateCoFrame = defined @FarmingBar\Modules\ItemMover.lua:341
SetMixedDBValues = defined @FarmingBar\Data\Database.lua:173
configOptions =
{
}
GetAboutOptions = defined @FarmingBar\Options\Interface.lua:58
GetMixedDBValues = defined @FarmingBar\Data\Database.lua:112
SplitItem = defined @FarmingBar\Modules\ItemMover.lua:253
UnregisterEvent = defined @datastore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:153
SetDefaultModuleLibraries = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:367
EnableModule = defined @AngryAssignments\libs\AceAddon-3.0\AceAddon-3.0.lua:332
baseName = "FarmingBar"
I

After that, every time I hid a keystroke, the error would repeat. It was so strange.

Client

Classic TBC 2.5.1

To Reproduce
Steps to reproduce the behavior:

  1. Shift-right-click on a floating tab of a toolbar.
  2. Select 'Hidden'
  3. Close interface.

Expected behavior
I expected to do the same as above with no errors.

Screenshots

Additional context
It would be very hard to reproduce since that would mean I would have to join another raid.

commented

See v2.1.6.1.

Again, I can't test the issues with hiding the bar in the raid, but I fixed the source of the lua error you provided.

commented

Thank you very much!

commented

Was this during an encounter, in an instance, or just in a raid group? Also did the bar hide as expected but the error happened or did the error prevent it from hiding? Does it work normally?

commented

Are you using the stable build or alpha?

commented

This is a stable build and the toolbar was hidden and I made it visible.

commented

Since I don't play classic, I won't be able to test in a raid group (highest toon on vanilla classic was only 39). However I will do my best to fix the issue blind and once I do that, an update from you on how it is would be great.

Sorry this is taking a while. I've been very very busy.