WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Using Animation:SetOrder() to re-order animations causes a crash on reload (https://www.wowinterface.com/forums/showthread.php?t=53495)

Predicate 05-26-16 08:24 PM

Using Animation:SetOrder() to re-order animations causes a crash on reload
 
Thanks to MunkDev for initially discovering the bug here. He kindly provided his ConsolePort code to me for isolation of the crash.

Creating animations in an AnimationGroup, and then changing their order with :SetOrder(), seems to break the client. Upon reloading the UI, the game will crash with a memory allocation error of some kind. As a workaround, always create animations in the order they are to be played (:SetOrder() calls are safe if they will have no effect).

A simple test case can reproduce the bug 100% of the time (remember to /reload after loading this addon):

Test.toc
Code:

## Interface: 70000
test.lua

test.lua
Lua Code:
  1. local ag = CreateFrame("Frame"):CreateAnimationGroup()
  2. local Fade = ag:CreateAnimation("Alpha")
  3. local Scale = ag:CreateAnimation("Scale")
  4.  
  5. Scale:SetOrder(1)


All times are GMT -6. The time now is 01:18 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI