K, made a separate thread for this bug.
Lua Code:
local frame = CreateFrame("Frame", "TEST_FRAME", UIParent)
frame:SetSize(64, 64)
frame:SetPoint("CENTER")
Minimap:SetParent(frame)
local texture = GameTimeFrame:CreateTexture("TEST_TEXTURE", "OVERLAY")
texture:SetTexture("Interface\\BUTTONS\\WHITE8X8")
texture:SetPoint("TOPLEFT", 2, -2)
texture:SetPoint("BOTTOMRIGHT", -2, 2)
function TestFunc(t)
t:SetMask("Interface\\Minimap\\UI-Minimap-Background")
end
C_Timer.NewTicker(10, function() TestFunc(texture) end)
This code will 100% cause ERROR#0.
Created texture is a region of GameTimeFrame (calendar button, child of Minimap frame), if I DO NOT re-parent Minimap, code doesn't cause any issues, however, if I re-parent Minimap to a new frame, this code will crash client.
-- edit
Updated code. It happens on the first call, I thought it was happening on the second one, because during the first call texture was hidden, duh. Texture has to be shown for bug to occur.