So I started commenting out the <*Texture...> lines in the ButtonTemplates.xml file until UAB didn't blow up, and the "offending" texture is the one that appears in the OVERLAY layer section. Of course, without this section, $panelBorder is not defined, so nothing actually works in UAB, but it doesn't bomb. Not knowing much about how this file is or should be used, I tried just copying the exact same section from Blizzard's ActionButtonTemplate.xml, renamed the "name" attribute to "$panelBorder" and UAB still blew up (I did this to try to eliminate positioning or graphic file issues, since UAB uses a custom texture). So there's something about the way UAB is using/positioning $panelBorder after the fact that causes the crash.
I re-read this post and noticed that you referenced "$panelBorder" not "$parentBorder". Both the ButtonTemplates.xml file in UAB and the ActionButtonTemplate.xml file from Blizzard use "$parentBorder" so I'm not sure why you neeeded to rename the "name" attribute value.
I will be posting an update later today that moves the texture creation into code, instead of in the XML file. If this changes nothing, the next step would be to comment out the creation of the texture, as well as the code that accesses the border texture (small set of changes), and see if things work any better. The border texture is just used to support UAB highlight effects.
Yeah, sorry about that, I was typing from memory -- I actually mean $parentBorer not $panel... just search and replace $panel with $parent in my original message -- that's what I intended.
As far st he coding changes -- great! I look forward to trying them out. Thanks for the extra effort!