Strange sprite atlas error (DEF-1964) (SOLVED)

A couple of times I have been gradually adding images to a sprite atlas, and then reached a point where the project will no longer build and launch. I get an “unknown” error reported on line 0 of the corresponding .atlas file.

I use margin 2, extrude borders 2 and inner padding 0. The atlas is well within 1024x1024 in size.

Strangely, this error goes away and the project launches fine if I set inner padding to a nonzero value like 1 or 2 instead. But the .atlas file is identical except for that value on the final line.

Normally I’d just use this as a workaround, but in my current project I don’t want inner padding on my sprites, for GUI layout reasons. Is there any other way to solve the problem?

I don’t recognize this bug. Do you know if there any way I can easily reproduce it?

I haven’t found any general pattern, but for my current project it happens every time I try to launch it. I use a MacMini at home and a MacBook at work, both running Defold Editor 1.2.84. The behavior is identical.

Could you please share a project where this happens? Add me (bjorn.ritzl@king.com) as a team member on the dashboard and make sure to have the project synced with your Git repo.

OK. I have added you to the project “Cross Boss”.

It appears to have something to do with the image file “segment_front_center.png”. If I completely change the pixel contents of it, without changing its size, the error goes away. A coincidence, or some form of incompatibility between the Defold Editor and the PNG format?

Ok, so it’s definitely a bug. It seems as though our texture packer has some issues with the two images segment_front_center.png and segment_front_side.png. Both of these have “Colorspace: Grey” and “Color profile: Greyscale D50”. If I add them to a separate atlas and leave extrude border to 0 there’s no problem, but as soon as I modify extrude I get an error. I’ve created a bug report as DEF-1964.

Temporary solution: “Resave the files as RGB”

Solved in Defold 1.2.111

1 Like