XML parser silently drops addon frame definitions

Account help, in-game issues, bug reports, and questions for staff.
Lostmybible123
Posts: 1

XML parser silently drops addon frame definitions

Post#1 » Tue Aug 18, 2026 4:01 pm

I got annoyed with default raid frames, as they do not remember their position and after every relog i have to drag them around to reposition them, so i decided to try and fix CRAP addon with claude, as i am no lua wizard. I managed to get it working but it found an XML parsing issue, that might be worth looking into, as it might be affecting some other 1.12 addons. Here is a claude generated report of the issue:


# Bug report: client XML parser silently drops addon frame definitions

## Summary

On the OctoWoW client, frames and regions defined in addon XML are not
reliably created. In the worst case, frames are created as Lua objects with
correct names, parents, sizes and positions, but are never attached to the
render tree — they never draw, and their parent's `GetChildren()` does not
return them. No Lua error is produced at any point, so the failure is silent
and looks like an addon bug rather than a client one.

This was found while getting the addon **CRAP** (Compact Raid and Party,
https://github.com/vargv666/CRAP) working, but nothing here is specific to
that addon. Any 1.12-era addon that defines frames or regions in XML can be
affected.

## Environment

- Server / client: OctoWoW
- Addon: CRAP, unmodified, downloaded fresh from the GitHub repo as a zip
- Reproduced across full client restarts, not just `/reload`

## Issue 1 (most severe): XML-created frames are not attached to the render tree

Member frames defined in the addon's `GroupFrame.xml` behave as follows:

- `getglobal('GroupFrameMemberFrame1')` returns a valid frame object
- `f:GetParent():GetName()` returns `GroupFrame` (the correct parent)
- `f:GetWidth()` / `f:GetHeight()` return the correct values (64 x 42)
- `f:GetLeft()` / `f:GetTop()` return sane on-screen coordinates
- `f:IsShown()` returns `1`
- **but** `f:IsVisible()` returns `nil` while the parent is visible
- **and** `GroupFrame:GetChildren()` returns **0 children**
- calling `f:Show()` explicitly does not make it render
- attaching a solid-colour texture to the frame renders nothing

The parent container itself is fine. A solid-colour texture attached directly
to `GroupFrame` renders correctly, so the container is real and visible.

Control test — creating an equivalent frame from Lua instead of XML works
correctly:

```lua
/run local f=CreateFrame('Frame',nil,GroupFrame) f:SetWidth(64) f:SetHeight(42) f:SetPoint('TOPLEFT',GroupFrame,'TOPLEFT',0,0) local t=f:CreateTexture(nil,'OVERLAY') t:SetAllPoints(f) t:SetTexture(0,1,0) f:Show()
```

That frame renders immediately, and `GroupFrame:GetChildren()` then returns 1.

So: Lua-created children attach and draw; XML-created children of the same
parent do not, despite reporting the correct parent from `GetParent()`.

Diagnostic used:

```lua
/run local n=0 for i,f in pairs({GroupFrame:GetChildren()}) do n=n+1 end DEFAULT_CHAT_FRAME:AddMessage('children:'..n)
```

```lua
/run local f=GroupFrameMemberFrame1 while f do DEFAULT_CHAT_FRAME:AddMessage(tostring(f:GetName())..' s:'..tostring(f:IsShown())..' v:'..tostring(f:IsVisible())) f=f:GetParent() end
```

## Issue 2: only the first `<Layer>` block of a template is processed

In a virtual template containing two `<Layer>` blocks, regions in the first
block are created and regions in the second are not.

With `<Layer level="OVERLAY">` first and `<Layer level="ARTWORK">` second:

- `GroupFrameMemberFrame1DebuffIndicator` (OVERLAY, first block) — created
- `GroupFrameMemberFrame1NameText` (ARTWORK, second block) — **nil**
- `GroupFrameMemberFrame1StatusText` (ARTWORK, second block) — **nil**

The missing regions are a mix of `FontString` and `Texture`, and the created
one is a `Texture`, so this does not appear to be about the region type. It
tracks with which `<Layer>` block the region is declared in.

## Issue 3: `<Frames>` nested inside a `StatusBar` is not processed

A `StatusBar` declared inside a template's `<Frames>` block is created
correctly, but a child frame declared inside *that* StatusBar's own `<Frames>`
block is not:

- `GroupFrameMemberFrame1HealthBar` (StatusBar) — created
- `GroupFrameMemberFrame1PowerBar` (StatusBar) — created
- `GroupFrameMemberFrame1HealthBarHealBar` (StatusBar nested inside HealthBar) — **nil**

This was still nil after reordering the XML so that `<BarTexture>` came after
`<Backdrop>` and `<Frames>`, so it does not appear to be an element-ordering
problem.

## Issue 4: `<Scripts>` handlers on XML frames appear not to be attached

The addon's drag handling (`OnDragStart` / `OnDragStop` on the container,
defined in `GroupFrame.xml`) did not function. Assigning the same handlers
from Lua with `SetScript` made dragging work immediately. This one is less
rigorously verified than the others, but is consistent with the pattern.

## Reproduction

1. Install CRAP unmodified from https://github.com/vargv666/CRAP
2. Log in, join a party
3. Run the diagnostics above

Expected: `GroupFrame:GetChildren()` returns 40, the member frames render.
Actual: 0 children, nothing renders, and the addon throws
`attempt to index local 'nametext' (a nil value)` at `core.lua:132` because
the `NameText` region from the second `<Layer>` block was never created.

## Impact

The Lua API reports success at every step — correct names, parents, sizes,
positions, `IsShown` true — while nothing renders and no error is raised.
That makes this extremely hard to attribute to the client. Anyone hitting it
will reasonably conclude the addon is broken.

Any 1.12 addon using multiple `<Layer>` blocks, nested `<Frames>`, or frames
defined in XML at all is potentially affected, so the blast radius is likely
much wider than this one addon.

## Workaround (for anyone else hitting this)

Rebuild the affected frames and regions in Lua with `CreateFrame`,
`CreateFontString` and `CreateTexture`, reusing the same global names the
addon's Lua code expects. Lua-created frames attach and render normally.


If this is of any help then great, if not then just skip over it :D

Hfm1
Posts: 32

Re: XML parser silently drops addon frame definitions

Post#2 » Fri Aug 21, 2026 5:44 am

hey i dont understand half of the text u wrote but i think i somehow get the idea behind it.

I have the problem my "native" raid frames the ones u can activate under options menu ( NO ADDON) stopped working completely. The GM told me he cant do sth about it so i made a post about broken raid frames.

from my old post:
im using the raid frames from the options menu. I like to keep my ui clean and i dont like modern looks like PFui etc. After the latest update i get a constant error message when i try to activate these raid frames change any option or try to rest the position.

Interface\FrameXML\OptionsFram.lua:111 attempt to cal field `?` (a nil value)

so they basically vanished and even some menu options are greyed out. Thats all AFTER the latest launcher update the day before i had raid frames and a working setup. I tried to reinstall EVERYTHNG and tried with and without addons so my conclusion was sth. with raid frames got nuked in the update.

Any help how to solve this as a noob would be awesome or maybe it helps finding the error with raid frames alltogether.

Who is online

Users browsing this forum: Dany6817 and 1 guest