• 0

    posted a message on Shadowed Unit Frames [official]
    Quote from Olunaa
    I get this bug while putting out the weed at farm...


    I get the same bug whenever I log in as a Shadow Priest:
    FrameXML\PriestBar.lua:79: Usage: UnitPower("unit"[, type][, unmodified])
    <in C code>
    FrameXML\PriestBar.lua:79: in function "PriestBar_Update"
    FrameXML\PriestBar.lua:63: in function "PriestBarFrame_CheckAndShow"
    FrameXML\PlayerFrame.lua:734: in function "PlayerFrame_HideVehicleTexture"
    FrameXML\PlayerFrame.lua:386: in function "PlayerFrame_ToPlayerArt"
    FrameXML\PlayerFrame.lua:143: in function "OnEvent"
    FrameXML\UnitFrame.lua:563: in function <FrameXML\UnitFrame.lua:561>

    This error occurs in v3.8.6-1-g29e9dbd (alpha) without any other interfering addons (except BugSack). The error does not occur in v3.8.6 (release).
    Posted in: Unit Frames
  • 0

    posted a message on Prat copy chat
    I had wanted to put this in the bug reports for Prat but nobody ever reads the tickets so I'm just going to throw it here instead, sorry.

    Has anyone had issues with the CopyChat feature in Prat? In particular, whenever I open the copyable dialog where all the text can be selected, the selection box seems to be desynchronized from the actual text. What I mean is that if you try to select something in there, the selection box doesn't match up correctly and you end up copying text from places that you didn't intend to.

    This appears to be a bug with the textbox control used to dump the text -- is there a way to fix this?
    Posted in: AddOn HELP!
  • 0

    posted a message on The underscore is back with a vengeance
    Quote from funkydude
    Or if you don't want to use FindGlobals, simply set your taintLog to a value of 2 (though I recommend setting it back to 0 or 1 when you're done). That will record the "tainting" of every global variable and can help debugging which addon is the cause. Calling it "almost impossible to track down" is a bit of an overstatement. :p

    I should change that to "very annoying to track down". :)

    Thanks for the info.
    Posted in: Lua Code Discussion
  • 0

    posted a message on The underscore is back with a vengeance
    Another reason why variable localization is important! Source: http://us.battle.net/wow/en/forum/topic/7005434873

    So anyone got a good script that can do static code analysis on Lua files to detect global variables?

    So recently I started doing a couple Challenge Modes and encountered this very annoying bug where the timer blows up and refuses to come back until /reloadui. Here's the error dump (truncated for your sanity):
    FrameXML\WatchFrame.lua:670: WatchFrameLine2:SetPoint():
        Couldn"t find region named "Sabotage"
    FrameXML\WatchFrame.lua:1811: in function "?"
    There's a spell named "Sabotage" that occurs in Gates, but how did a spell name get mixed up with a region name?! Well, let's dig up the FrameXML\WatchFrame.lua, lines 669-670:
    if ( anchor ) then
        line:SetPoint("RIGHT", anchor, "RIGHT", 0, 0);
    So anchor is "Sabotage" for some odd reason. If we go back up a level to lines 1811, the source of the problem becomes obvious:
    WatchFrame_SetLine(line, _, WATCHFRAMELINES_FONTSPACING - 6, IS_HEADER, stageName, DASH_NONE);
    The underscore variable "_" here has not been referenced earlier, which means it's basically pulling the value from the global underscore variable. If all other addons behave correctly and do not use the global underscore variable, then this code will function correctly.

    But if any code decides to corrupt the value of the global underscore variable, then WatchFrame_SetLine will break catastrophically. The easy fix (which only Blizzard can do) would be do just replace the underscore with nil. The hard fix would be to change every single addon to make sure that they do not use the global underscore variable.

    To be fair, the mistake is really on both ends here, but not every addon author is prudent enough to localize their variables correctly. Furthermore, it's almost impossible to track down which addon is causing this bug -- unlike the taint bug, this bug doesn't inform the user of the source of variable corruption.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Simple buff bar with Masque-support and buff-canceling in-combat
    Quote from Phanx
    One button to cancel them all: http://www.curse.com/addons/wow/cancelmybuffs Then you can use whatever buff display you want. ;)
    Sometimes I want to be able to cancel a buff without necessary knowing what it is in advance, and that's what I'm looking for mainly. :(
    Quote from Seerah
    Anything that doesn't filter or sort would be able to do #2.
    Does this mean there's an addon that already does this?
    Quote from Seerah
    I have no clue what you mean by "bar" since you want the display in icons...
    When I said "bar" I really meant "an array of icons".
    Posted in: Addon Ideas
  • 0

    posted a message on Simple buff bar with Masque-support and buff-canceling in-combat
    I'm looking for an addon that does the following:
    - Displays player buffs as icons (debuffs would be nice too but not required).
    - Allows the buffs to be cancelled while in-combat by right-clicking (this is the primary reason the current addons don't seem to satisfy my needs).
    - Supports Masque or some equivalent form of customizability.
    - Can adjust anchor position and alignment of the "bar".
    (I don't care about filtering/sorting.)

    I'm somewhat uncertain about the 2nd requirement as I've heard that the aura cancellation command is a protected function, so would it be even possible to implement this feature in an addon? (I've heard something about secured frames being able to execute such an action, but I don't know enough details.)

    So far I've been unable to locate any addon that does these. :(
    Posted in: Addon Ideas
  • 0

    posted a message on AceDB and default profiles (Picking a bone)
    Here's my personal "solution" to this problem -- it is by no means flawless nor is it hassle-free, but it works for me, at least.

    Rationale: I often find some addons that have weird settings that I don't like or some bugs that the authors haven't yet fixed, so I maintain a personal patch file(s) to fix all these issues. Here is an entry that I use for this particular "bug":

    --- Ace3/AceDB-3.0/AceDB-3.0.lua	2012-09-04 17:14:02.000000000 -0400
    +++ Ace3/AceDB-3.0/AceDB-3.0.lua	2012-09-16 18:44:09.440742500 -0400
    @@ -276,13 +276,13 @@
     		if not sv.profileKeys then sv.profileKeys = {} end
     
     		-- Try to get the profile selected from the char db
    -		profileKey = sv.profileKeys[charKey] or defaultProfile or charKey
    +		profileKey = sv.profileKeys[charKey] or defaultProfile or "Default"
     
     		-- save the selected profile for later
     		sv.profileKeys[charKey] = profileKey
     	else
     		-- Use the profile of the parents DB
    -		profileKey = parent.keys.profile or defaultProfile or charKey
    +		profileKey = parent.keys.profile or defaultProfile or "Default"
     
     		-- clear the profileKeys in the DB, namespaces don't need to store them
     		sv.profileKeys = nil


    I keep this as a .patch file in the AddOns directory. Then, every time I update addons, I run this short shell script afterwards:
    #!/bin/sh
    cd "$(dirname "${BASH_SOURCE[0]}")"
    patch -N -p0 -r- <*.patch

    The downside is that I have to remember to do this every time I update Ace3. :( Beats having to manually edit it myself every time though (and it's still 250% better than fixing this in-game one a brand new character).

    Note: in theory, a batch file could also work if you have Patch from GnuWin32.
    Posted in: Ace3
  • 0

    posted a message on ChatFrame_OnHyperlinkShow taint
    Okay, I've submitted the following patches for review:
    - Prat-3.0
    - WeakAuras
    Thanks for the help everyone.
    Posted in: Lua Code Discussion
  • 0

    posted a message on ChatFrame_OnHyperlinkShow taint
    Quote from Tandanu
    <snip>

    Even though your workaround is less elegant than Phanx's solution, it is the only way in which I can fix WeakAura's taint problem without altering the protocol and breaking compatibility, so I think I will go with this instead. ;)

    I found it was also necessary to override HandleModifiedItemClick(link, ...) to avoid duplicating the shift-linking code.
    Posted in: Lua Code Discussion
  • 0

    posted a message on ChatFrame_OnHyperlinkShow taint
    So it looks like the text parameter won't be available if I hook to SetHyperlink -- this might be a problem then since currently WeakAuras uses:
    |c<color>|H[B]weakauras[/B]|h[<character_name> - <display_name>]|h|r

    In order to obtain the necessary information through the link parameter only, this has to be modified to use:
    |c<color>|H[B]weakauras:<character_name>:<display_name>[/B]|h[<character_name> - <display_name>]|h|r

    Obviously this will break the WeakAuras protocol and thus lose backward-compatibility.

    Thanks for the help; it helped me a lot!
    Posted in: Lua Code Discussion
  • 0

    posted a message on ChatFrame_OnHyperlinkShow taint
    WeakAuras is apparently tainting* the ChatFrame_OnHyperlinkShow execution path because it overrides its function with a pre-hook. Post-hook would fail because Blizzard's OnHyperlinkShow would choke on unknown links.

    Any idea what would be the best way to fix this? What's the standard practice for making custom links that doesn't taint ChatFrame_OnHyperlinkShow?

    * The taint causes /tar [playername] to fail whenever [playername] is inserted by Shift-Clicking a player name.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Shadowed Unit Frames [official]
    Quote from Shadowed
    Actually something I forgot about, they do have a CVar for this. Can you run /dump GetCVar("predictedHealth") in game? If you see nil or 0 from the results, try running /script SetCVar("predictedHealth", "1") and then see if that fixes your issues.


    Result (regardless of whether Quick Health is enabled):
    [1]="0"

    After running /script SetCVar("predictedHealth", "1") and re-enabling Quick Health, and after doing 10 "falling" tests, it appears that the problem goes away.

    Thanks! (Any clue what might have caused the variable to have an abnormal value?)
    Posted in: Unit Frames
  • 0

    posted a message on Shadowed Unit Frames [official]
    Quote from Shadowed
    You either disabled quick health updates or you're possibly imaging it. I double checked against OnUpdate and the event with SUF and it's updating as fast as Blizzard provides data.


    Is this because I have an library missing or there's a toggle switch somewhere?

    Edit:

    Actually, never mind. I found the toggle. I did some experimenting and concluded that (on my system at least) it appears toggling "Enable quick health" actually does the reverse ... it seems to update faster when it's turned off.
    Posted in: Unit Frames
  • 0

    posted a message on Shadowed Unit Frames [official]
    Is there a reason why SUF might be updating its bars slower than usual? This is what I did to test:
    Jump from a high height enough to take fall damage. Then I notice the fall damage shows up in Combat Log and also in the Combat Text that SuF has, but the health bar doesn't decrease until ~0.5 sec later. The health text doesn't change instantly either.
    Posted in: Unit Frames
  • To post a comment, please or register a new account.