This is part bug report (to complex to ingame function), part information for fellow programmers.
Affected Version:
EU client
The Client state at 26th May 2014, 7 PM (UTC)
While testing some code today I ran into an odd issue:
I had an XML file to incerept the Update event. But my lua file with the event code was faulty, so the addon failed while parsing the lua file (I forgot to write function before the function name).
Naturally a fail there would also mean that the events parameter is still nil when it comes to parsing the .xml file, but since .lua is parsed before .xml the .xml should never have run.
Then I tried to disable it in a bet to check if if was really this addon (even though it was the only one I had running at that time).
And on the first UI reload
after the addon was disabeled the game threw me the .xml parsing error ("nil where value expected"). On the next reload nothing happened.
So "if a lua error would result in the XML running into a nil argument exception, that exception message will appear in the reload
after the Addon has already been disabeled."
Code to reproduce:
## Title: LibHeadingChange
## APIVersion: 100004
HeadingChange.lua
HeadingChange.xml
local onUIUpdate() -- faulty, 'function' is missing causing parsing error.
end
--Explicit exposure of local function globally
LibHeadingChange = { onUIUpdate = onUIUpdate }
return LibHeadingChange
<GuiXml>
<Controls>
<TopLevelControl name="UI_UpdateInterceptor" movable="false">
<Dimensions x="58" y="58" />
<Anchor point="CENTER" />
<OnUpdate>
LibHeadingChange.onUIUpdate()
</OnUpdate>
</TopLevelControl>
</Controls>
</GuiXml>
Edited by zgrssd on May 26, 2014 7:00PM Elana Peterson (EU), Dominion, Imperial Sorc, Rune & Alchemy Crafting Char
Leonida Peterson (EU), Daggerfall, Kajiit Nightblade, Tank & main Crafter
Kurga Peterson (EU), Ebonhart, Ork Dragonknight, Provision Mule
Coldblood Peterson (EU) Argonian Templer, Daggerfall, Healer
Incendia Peterson (EU), Dominion, Dunmer Dragonknight, fire DPS & healer
Haldor Belendor (EU), Ebonhart, Breton Sorcerer, Tank
Fuliminictus Peterson (EU), Ebonhart, Altmer Sorcerer, Electric DPS
Me babbling about
PvE roles and Armor,
Short Guide to Addon Programming (for Programmers)
If you think anything I or somebody else said violates the
Rules of this Forum, you are free to flag my posts. Till I get any notifcaion from this, I just asume you know you have no case against me or Zenimax disagrees with you.