DoTimer

16 - Error when copying profiles

What steps will reproduce the problem?
1. Create new profile
2. Select another profile and "copy"

What is the expected output? What do you see instead?

Expected: profile copied successfully
Instead: Error msg below

What version of the product are you using?

4.3.6

Do you have an error log of what happened?

Date: 2009-08-24 23:39:50
ID: 2
Error occured in: Global
Count: 2
Message: ..\AddOns\DoTimer\Core\CoreLib.lua line 278:
   attempt to index local 'self' (a nil value)
Debug:
   (tail call): ?
   [C]: ?
   DoTimer\Core\CoreLib.lua:278 CopyTable()
   DoTimer\Core\AsheylaLib.lua:50 CopyFromProfile()
   DoTimer_Options\dotimer.lua:1269 func()
   ..\FrameXML\UIDropDownMenu.lua:563
      ..\FrameXML\UIDropDownMenu.lua:539
   [C]: UIDropDownMenuButton_OnClick()
   [string "*:OnClick"]:1:
      [string "*:OnClick"]:1

Please provide any additional information below.

DoTimer is the BOMB!

User When Change
DrFubar Aug 25, 2009 at 04:09 UTC Create

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

  • 1 comment
  • Avatar of Farmbuyer Farmbuyer Oct 14, 2009 at 02:19 UTC - 0 likes

    The code in AsheylaLib:CopyFromProfile() is deliberately passing 'nil' as the first parameter ("self") to CopyTable, which is... bizarre. And then dispatches calls to self a few lines later, causing the error. I have no idea what he was trying to do. Clearly it wasn't tested anyhow.

    This lets me copy settings from the default profile into a new profile. Haven't tested it anywhere else.

    --- Core/AsheylaLib.lua.orig	2009-10-13 22:11:03.593750000 -0400
    +++ Core/AsheylaLib.lua	2009-10-13 22:15:51.421875000 -0400
    @@ -44,11 +44,18 @@ end
     
     function AsheylaLib:CopyFromProfile(name, module)
         if AsheylaLib_Settings[name] then
    +--[[ XXX wtf?  farmbuyer
             if module then
                 AsheylaLib_Settings[ASHEYLALIB_ACTIVE_PROFILE][module] = libraries["CoreLib"].funcs.CopyTable(nil, AsheylaLib_Settings[name][module]);
             else
                 AsheylaLib_Settings[ASHEYLALIB_ACTIVE_PROFILE] = libraries["CoreLib"].funcs.CopyTable(nil, AsheylaLib_Settings[name]);
             end
    +]]
    +        if module then
    +            AsheylaLib_Settings[ASHEYLALIB_ACTIVE_PROFILE][module] = libraries["CoreLib"].funcs:CopyTable(AsheylaLib_Settings[name][module]);
    +        else
    +            AsheylaLib_Settings[ASHEYLALIB_ACTIVE_PROFILE] = libraries["CoreLib"].funcs:CopyTable(AsheylaLib_Settings[name]);
    +        end
             for module in pairs(modules) do
                 table.wipe(module.libraries["CoreLib"].cached);
             end
    
  • 1 comment

Facts

Reported
Aug 25, 2009
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees