This happens no matter how I do it. I create a new GuiSwatchCtrl, add it to the PlayGui and crash the next time the PlayGui wakes (on the first spawn).
This causes a guaranteed crash on every spawn:
new GuiSwatchCtrl(TestControl)
{
...
};
PlayGui.add(TestControl);
This causes a crash if it takes longer than 600ms to render the first frame. Increasing the schedule to something absurd like 3000s is not a reliable solution:
package TestPackage
{
function PlayGui::onRender(%this)
{
Parent::onRender(%this);
if (!PlayGui.isMember(TestControl))
PlayGui.schedule(600, "add", TestControl);
}
};
activatePackage("TestPackage");
These are the attributes used for the swatch control:
profile = GuiDefaultProfile;
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "8 2";
minExtent = "8 2";
visible = 1;
color = "0 0 0 0";