Theme Crashes Audacity

Windows 7 64-bit, Audacity 2.2.1

I was working on a modification of Donuts Theme, which does work, but when I swap it out for my own version Audacity crashes, and only once did the log have any info and it said “Warning: iCCP: known incorrect sRGB profile”, the rest didn’t even include Audacity’s version number. I’ve tried with sRGB, without sRGB, resaved with Irfanview, resaved with Irfanview using PNGCrush, nothing caused it to stop crashing with this PNG. I’ll attach the final PNGCrush’d version, I didn’t think to hold on to the previous versions though all crash about the same with an ACCESS_VIOLATION at address 6e6ff69b

Checked the Theming HowTo and didn’t see anything that would explain this.
Donut-Edit.png
Audacity Crash Reports.zip (376 KB)

Your image does not have the “alpha” channel.

The Audacity documentation (https://wiki.audacityteam.org/wiki/Theming_HowTo) says:

Transparency
Use > GIMP > . Some other image editors do not support Alpha, and for button images you need it.

So I’d suggest that you try using Gimp to edit the image.
Let us know how you get on.

Yeah, that turned out to be the general problem. For some reason the version I had saved, before resaving with IrfanView, must not have had the alpha. I tried just adding an alpha channel with everything opaque except for a transparent 2px square off to the side and it still crashed, but then I tried again with the correct translucency on the buttons and it worked fine so it specifically needs the buttons to have a transparent value somewhere, not just the presence of an alpha channel, or else it crashes on start up without any useful information in the log.

I think that the wiki needs to be updated to be more specific about it needing to actually be transparent rather than just having an alpha channel, and that it’ll crash if it doesn’t. And also of course a message for the log when it crashes about the buttons needing to have a transparent value.

Themes are a new feature and still under active development. The developers are aware that making themes is currently harder than it should be, and we are likely to see incremental improvements with new Audacity releases. The documentation crew aim to keep the manual up to date with the current release, but while things are still evolving it is not possible to cover in detail all the ways of doing it wrong.