Thread Tools Display Modes
10-24-18, 05:49 PM   #1
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Lua Errors from Bosstalk

Anyone can help me define on how to fix these select problems?

Click image for larger version

Name:	Error 1.jpg
Views:	169
Size:	52.5 KB
ID:	9151

Click image for larger version

Name:	Error 2.jpg
Views:	97
Size:	41.1 KB
ID:	9152

Click image for larger version

Name:	Error 3.jpg
Views:	99
Size:	52.7 KB
ID:	9153

Click image for larger version

Name:	Error 4.jpg
Views:	101
Size:	32.2 KB
ID:	9154

Click image for larger version

Name:	Error 5.jpg
Views:	93
Size:	57.0 KB
ID:	9155

Click image for larger version

Name:	Error 6.jpg
Views:	97
Size:	63.4 KB
ID:	9156
  Reply With Quote
10-24-18, 06:22 PM   #2
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Error 4 simply looks like that file doesn't exist, so I'd check that path and see.

I believe the locale errors are caused by BossTalk referencing locale IDs that haven't been defined, so they would need to be added in the locale file(s).
  Reply With Quote
10-25-18, 09:21 AM   #3
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by MuffinManKen View Post
Error 4 simply looks like that file doesn't exist, so I'd check that path and see.

I believe the locale errors are caused by BossTalk referencing locale IDs that haven't been defined, so they would need to be added in the locale file(s).
I found the problem. For some reason the problem is connected to another addon. I disable it, Bosstalk goes with it. Thoughts on how to make it so it is not part of another addon?
  Reply With Quote
10-25-18, 10:56 AM   #4
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
What addon is causing a conflict?
  Reply With Quote
10-25-18, 12:24 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
They all appear to be missing Locale entries for an addon using AceLocale.

Search your addons for "Enter an Id." or "Ironaya in Uldamin".
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
10-25-18, 01:45 PM   #6
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by MuffinManKen View Post
What addon is causing a conflict?
It is called AudioX II.
  Reply With Quote
10-25-18, 01:46 PM   #7
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by Fizzlemizz View Post
They all appear to be missing Locale entries for an addon using AceLocale.

Search your addons for "Enter an Id." or "Ironaya in Uldamin".
Took care of those earlier this morning. It's now the issue on how and why another addon is conflicted onto Bosstalk.
  Reply With Quote
10-25-18, 05:29 PM   #8
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Originally Posted by Brellison94 View Post
Took care of those earlier this morning. It's now the issue on how and why another addon is conflicted onto Bosstalk.
So the LibDataBroker error is being caused by another addon? Or is it a different error?
  Reply With Quote
10-25-18, 09:57 PM   #9
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
If it is LibDataBroker then you probably have an addon using an old (pre BfA) version. These days you will get an error if there is an entry in the .toc or an include .xml that lists a file that does not exist.

These used to be ignored.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
10-26-18, 08:57 AM   #10
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by MuffinManKen View Post
So the LibDataBroker error is being caused by another addon? Or is it a different error?
Different Error.
  Reply With Quote
10-26-18, 09:29 AM   #11
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
We aren't mind readers. What error is it?
  Reply With Quote
10-26-18, 09:29 AM   #12
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
When I open Bosstalk, I get this Lua Error message.

Lua Code:
  1. Message: Interface\AddOns\BossTalk\Core.lua:532: table index is nil
  2. Time: Fri Oct 26 10:26:03 2018
  3. Count: 1
  4. Stack: Interface\AddOns\BossTalk\Core.lua:532: table index is nil
  5. Interface\AddOns\BossTalk\Core.lua:532: in function `GenerateMenu'
  6. Interface\AddOns\BossTalk\Options.lua:227: in function `func'
  7. ...ace\AddOns\BossTalk\Libs\Dewdrop-2.0\Dewdrop-2.0.lua:741: in function <...ace\AddOns\BossTalk\Libs\Dewdrop-2.0\Dewdrop-2.0.lua:680>
  8.  
  9. Locals: self = <table> {
  10.  SetDefaultModuleLibraries = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:398
  11.  DUEL_REQUESTED = <function> defined @Interface\AddOns\BossTalk\Core.lua:1243
  12.  AddEvent = <function> defined @Interface\AddOns\BossTalk\Core.lua:694
  13.  EnableModule = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:363
  14.  modules = <table> {
  15.  }
  16.  baseName = "BossTalk"
  17.  IterateEmbeds = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:473
  18.  UnregisterComm = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:179
  19.  MakeFunk = <function> defined @Interface\AddOns\BossTalk\Core.lua:797
  20.  SetItemRef_Original = <function> defined @Interface\AddOns\AudioX\AudioX.lua:813
  21.  UNIT_MANA = <function> defined @Interface\AddOns\BossTalk\Core.lua:1300
  22.  Printf = <function> defined @Interface\AddOns\BossTalk\Libs\AceConsole-3.0\AceConsole-3.0.lua:69
  23.  SetDefaultModulePrototype = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:440
  24.  OnCommReceived = <function> defined @Interface\AddOns\BossTalk\Core.lua:1086
  25.  Search = <function> defined @Interface\AddOns\BossTalk\Core.lua:665
  26.  IsEnabled = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:482
  27.  OnCmd = <function> defined @Interface\AddOns\BossTalk\Core.lua:74
  28.  DisableModule = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:381
  29.  GenerateMenu = <function> defined @Interface\AddOns\BossTalk\Core.lua:113
  30.  RegisterMessage = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:116
  31.  GetArgs = <function> defined @Interface\AddOns\BossTalk\Libs\AceConsole-3.0\AceConsole-3.0.lua:144
  32.  data = <table> {
  33.  }
  34.  SendCommMessage = <function> defined @Interface\AddOns\BossTalk\Libs\AceComm-3.0\AceComm-3.0.lua:87
  35.  tcount = <function> defined @Interface\AddOns\BossTalk\Core.lua:583
  36.  UnregisterAllComm = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:200
  37.  SetEnabledState = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:455
  38.  enabledState = true
  39.  COMBAT_LOG_EVENT_UNFILTERED = <function> defined @Interface\AddOns\BossTalk\Core.lua:1222
  40.  RegisterEvent = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:116
  41.  cmdtable = <table> {
  42.  }
  43.  OnEnable = <function> defined @Interface\AddOns\BossTalk\Core.lua:108
  44.  PET_ATTACK_START = <function> defined @Interface\AddOns\BossTalk\Core.lua:1267
  45.  GenerateSync = <function> defined @Interface\AddOns\BossTalk\Core.lua:1167
  46.  CHAT_MSG_MONSTER_YELL = <function> defined @Interface\AddOns\BossTalk\Core.lua:1325
  47.  Enable = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:325
  48.  UnregisterAllEvents = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:200
  49.  MountCheck = <function> defined @Interface\AddOns\BossTalk\Core.lua:1252
  50.  MakeEvent = <function> defined @Interface\AddOns\BossTalk\Core.lua:700
  51.  GetModule = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:241
  52.  defaultModuleLibraries = <table> {
  53.  }
  54.  credits = <table> {
  55.  }
  56.  UnregisterChatCommand = <function> defined @Interface\AddOns\BossTalk\Libs\AceConsole-3.0\AceConsole-3.0.lua:111
  57.  GetName = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:310
  58.  UNIT_HEALTH = <function> defined @Interface\Ad
  Reply With Quote
10-26-18, 09:34 AM   #13
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Can you attach your BossTalk\Core.lua and BossTalk\Options.lua?

Last edited by MuffinManKen : 10-26-18 at 09:42 AM.
  Reply With Quote
10-26-18, 10:55 AM   #14
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by MuffinManKen View Post
Can you attach your BossTalk\Core.lua and BossTalk\Options.lua?
Sure.

Core.lua

Options.lua
  Reply With Quote
10-26-18, 02:08 PM   #15
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
The the problem is in this line:
tempZone.User.args[worldcheck(dbd.useryell[i].w)].args[dbd.useryell[i].zone] = {

Which table index is nil? It's hard to know since there are roughly 10 different indexing operations in that 1 line. I would recommend cleaning that up so that it's more readable, easier to find issues, and also more efficient:
Lua Code:
  1. if(dbd.useryell[i]) then
  2.             if (not dbd.useryell[i].w) then dbd.useryell[i].w = "1" end
  3.             local wc = worldcheck(dbd.useryell[i].w)
  4.             local zone = dbd.useryell[i].zone
  5.             local world_args = tempZone.User.args[wc]
  6.             if(not world_args.args[zone]) then
  7.                 world_args.args[zone] = {
  8.                     type = 'group',
  9.                     name = zone,
  10.                     desc = zone,
  11.                     args = {},
  12.                 }
  13.             end

Without knowing the data, it's hard to pinpoint the problem but splitting that stuff up should help zero in on where the issue is. For example, if dbd.useryell[i].w is a value other than nil, "1", "2" then worldcheck() will return nil.

Efficiency-wise there is no need to call worldcheck over and over, so we assign the result to a variable and that can be re-used everywhere else in that loop.

Some of the variable names I used may not be ideal, so adjust as needed.
  Reply With Quote
10-26-18, 02:24 PM   #16
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
There is also another bug that I saw. I don't know if it's related, but the bug is also in AudioX. Both addons override SetItemRef and do it incorrectly.

BossTalk.SetItemRef(link, text, button) take 3 parameters and if it isn't a BossTalk link, passes them on to Blizzard's: BossTalk.SetItemRef_Original(link, text, button);

But that isn't actually Blizzard's, because AudioX is overwriting it too, and if the link isn't one it's interested in, it passes it on to (probably) Blizzard's:
SetItemRef_orig(link,text,button)

Unfortunately, Blizzard's function looks like this:
function SetItemRef(link, text, button, chatFrame)

The chatFrame parameter is being thrown away. And overwriting the function like that is dangerous and can mess up other addons or even the entire system. You should change:
BossTalk.SetItemRef_Original = SetItemRef
SetItemRef = BossTalk.SetItemRef
to:
hooksecurefunc("SetItemRef", BossTalk.SetItemRef)

and then you can remove BossTalk.SetItemRef_Original completely. It's no longer needed since the original code will be automatically called first and then yours will be. AudioX has the same issue and should be fixed in the same way.
  Reply With Quote
10-26-18, 04:22 PM   #17
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by MuffinManKen View Post
There is also another bug that I saw. I don't know if it's related, but the bug is also in AudioX. Both addons override SetItemRef and do it incorrectly.

BossTalk.SetItemRef(link, text, button) take 3 parameters and if it isn't a BossTalk link, passes them on to Blizzard's: BossTalk.SetItemRef_Original(link, text, button);

But that isn't actually Blizzard's, because AudioX is overwriting it too, and if the link isn't one it's interested in, it passes it on to (probably) Blizzard's:
SetItemRef_orig(link,text,button)

Unfortunately, Blizzard's function looks like this:
function SetItemRef(link, text, button, chatFrame)

The chatFrame parameter is being thrown away. And overwriting the function like that is dangerous and can mess up other addons or even the entire system. You should change:
BossTalk.SetItemRef_Original = SetItemRef
SetItemRef = BossTalk.SetItemRef
to:
hooksecurefunc("SetItemRef", BossTalk.SetItemRef)

and then you can remove BossTalk.SetItemRef_Original completely. It's no longer needed since the original code will be automatically called first and then yours will be. AudioX has the same issue and should be fixed in the same way.
I applied the fix and I am still at the same spot. However, it will now not show me the problem through the Lua Error.
  Reply With Quote
10-26-18, 04:40 PM   #18
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by Fizzlemizz View Post
If it is LibDataBroker then you probably have an addon using an old (pre BfA) version. These days you will get an error if there is an entry in the .toc or an include .xml that lists a file that does not exist.

These used to be ignored.
Maybe this perhaps? I've been eyeballing on this file for a while.

embeds.xml
  Reply With Quote
10-26-18, 07:56 PM   #19
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Originally Posted by Brellison94 View Post
I applied the fix and I am still at the same spot. However, it will now not show me the problem through the Lua Error.
Can you attach your fixed lua file?
  Reply With Quote
10-26-18, 07:57 PM   #20
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 106
Originally Posted by Brellison94 View Post
Maybe this perhaps? I've been eyeballing on this file for a while.
That does list Libs\libDataBroker-1-1\libDataBroker-1-1.lua so if that file doesn't exist you will get an error.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Lua Errors from Bosstalk

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off