Thread Tools Display Modes
02-29-12, 05:04 PM   #1
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
AceLibrary error - how?

Hello!

Quite a few times now I've seen people post a lua error in the comments of my Aurora addon, like this:

Code:
Date: 2012-02-29 20:14:09
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\Aurora\Aurora.lua line 1:
attempt to call global 'AceLibrary' (a nil value)
Debug:
[C]: AceLibrary()
Aurora\Aurora.lua:1: in main chunk
And I don't understand it, because Aurora doesn't use any libraries at all and makes no reference to Ace or whatever. Yet it's blaming line 1 in Aurora.lua. Line 1 is simply this:

Code:
local alpha = .5 -- controls the backdrop opacity (0 = invisible, 1 = solid)
Typically, it goes away after the user updates their addons or removes outdated ones. But I'm interested in how it is possible for this to happen at all.

Could anyone shed some light on this?
  Reply With Quote
02-29-12, 05:35 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Can't find an easy answer but according to Lua reference
Identifiers in Lua can be any string of letters, digits, and underscores, not beginning with a digit.
According to that, .5 could be a valid variable name since it doesn't start with a digit.

My best guess is some 'challenged' developer is leaking a global in their addon (not Aurora) named .5

You can try setting your alpha as the unabridged version 0.5 (which is not a valid variable name) and see if that helps.

This is conjecture btw, I don't have access to WoW atm to test if .5 or '.5' are valid variable names.
If they are and someone is doing .5 = AceLibrary in their addon it might explain the error since Aurora is probably one of the first addons to load for many users due to it's name.
  Reply With Quote
02-29-12, 05:46 PM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Wow, I hadn't thought of it like that. It's an interesting thought, I'll check it out and report back.
  Reply With Quote
02-29-12, 05:54 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The dot character (.) is invalid in a variable name, because it would normally indicate a table lookup in that context, eg. tableName.keyName.
  Reply With Quote
02-29-12, 08:56 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
One thing I notice is that your file is named aurora.lua yet that error references Aurora.lua...
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-01-12, 06:39 AM   #6
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
I noticed that too. I didn't think much of it, but apparently, the problem is caused when people tried to update Aurora through the Curse Client, which then pulled a different addon altogether with the same name - I've never uploaded anything there.

Thanks for the replies, anyhow.
  Reply With Quote
03-01-12, 07:21 AM   #7
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
@Haleth: Could you tell me which AddOn is downloaded from the Curse Client? I'll see if I can't resolve the issue on the site.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
03-13-12, 04:05 PM   #8
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by Torhal View Post
@Haleth: Could you tell me which AddOn is downloaded from the Curse Client? I'll see if I can't resolve the issue on the site.
Probably this? I'm not sure if WoWAce and Curse are still linked.

EDIT: Holy necro, sorry guys!
__________________
All I see is strobe lights blinding me in my hindsight.
  Reply With Quote
03-13-12, 05:13 PM   #9
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Sorry for not replying, I tried to find it on Curse but I couldn't, then I asked the person who got the error but he didn't reply.

That was the one, indeed Wimpface.

Don't worry about the necro, it's not too old.
  Reply With Quote
03-14-12, 08:02 AM   #10
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Keep in mind that 'local alpha = .5' the variable name is 'alpha' while '.5' is the value, hence variable naming conventions in this case are fine since 'alpha' is a valid variable name. 'local .5 = ...' or 'local 5 = ...' on the other hand would not work since '.' is a reserved char and can not be used for names, and '5' in the later example is a number and you can't set the value of a number to something else. :P
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » AceLibrary error - how?


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