WhoLib

2 - :Library() generates Lua error

What steps will reproduce the problem?
1. In Lua: local wholib = LibStub:GetLibrary('LibWho-2.0'):Library()
2. Load WoW
3. Observe Lua error on line 237: "table index is nil(tail call): ?"

What is the expected output? What do you see instead?
Expected: The embeddable routines placed into a table.
Observed: Lua error, script processing ends.

What version of the product are you using?
HEAD as of 12/16/08 *and* Curse 2.0

Do you have an error log of what happened?
========= From my Addon ==============
[2008/12/18 10:43:37-506-x1]: LibWho-2.0\LibWho-2.0.lua:237 table index is nil
(tail call): ?:
Socialist-0.1\Socialist.lua:38 in main chunk

========= From LibRockConsole, in the console =============
[2008/12/18 10:44:49-506-x1]: LibWho-2.0\LibWho-2.0.lua:237 table index is nil
(tail call): ?:
<string>:"Rock("LibRockConsole-1.0"):PrintLiteral(Lib...":1: in function `f'
LibRockConsole-1.0-90238:894: in function <...tBull\libs\LibRockConsole-1.0\LibRockConsole-1.0.lua:888
LibRockConsole-1.0-90238:711: in function `?'
Interface\FrameXML\ChatFrame.lua:3191 in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2911 in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2932 in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>

Please provide any additional information below.
I have provided a diff that fixes the solution. Essentially, line 237 needs to be moved into the for loop. I think - this bears a look by the developers.

User When Change
akazik Dec 19, 2008 at 19:23 UTC Changed status from New to Fixed
eblume Dec 18, 2008 at 19:02 UTC Changed name from :Library() generates LUA error to :Library() generates Lua error

Changed description:
  What steps will reproduce the problem?
- 1. In LUA: local wholib = LibStub:GetLibrary('LibWho-2.0'):Library()
+ 1. In Lua: local wholib = LibStub:GetLibrary('LibWho-2.0'):Library()
  2. Load WoW
- 3. Observe LUA error on line 237: "table index is nil(tail call): ?"
+ 3. Observe Lua error on line 237: "table index is nil(tail call): ?"
  What is the expected output? What do you see instead?
  Expected: The embeddable routines placed into a table.
- Observed: LUA error, script processing ends.
+ Observed: Lua error, script processing ends.
  What version of the product are you using?
  HEAD as of 12/16/08 *and* Curse 2.0
eblume Dec 18, 2008 at 18:58 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of eblume eblume Dec 18, 2008 at 19:01 UTC - 0 likes

    Diff: (Left is the fix)

    236d235
    < 		self['embeds'][name] = true
    238c237
    < 	--self['embeds'][name] = true
    ---
    > 	self['embeds'][name] = true
    

    I'm away from my UNIX machine and don't have access to the GNU diff program, so in case this formatting is incorrect, the essential change is that line 237 needs to be moved into the above for loop.

  • 1 comment

Facts

Last updated
Dec 19, 2008
Reported
Dec 18, 2008
Status
Fixed - Developer made requested changes. QA should verify.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees