Crash when opening project: "Grouping invalid sprite" -> related to secondary textures on atlases?

Hi guys, I just updated to version 2020.2.0b8, and at first everything seemed great (game ran smoothly, no issues, tested multiple scenes. Did a standalone build and even had a decent performance boost from updating). But after closing the project, I tried to re-open it and it crashed while opening.

Made a post here with the crash Editor.log and more info: Crashing when opening project, not sure what to make from Editor.log

But what caught my eye was the line at the bottom of the log that says: Grouping invalid sprite. Removed sprite should have been sniffed out before reaching here.

Could this have been the reason for the crash? My project uses sprites with normalMap secondary textures - the main reason I’m trying so hard to update to 2020.2 beta is to be able to use the new secondary texture atlas packing feature.

If that error is indeed related to the texture packing, is there anything I could do? (like if the atlas is messed up, to delete it or reset things somehow?) @Venkify @yuanxing_cai I think you guys were the ones commenting about the secondary texture atlas packing on another thread, would you guys happen to know?

Really appreciate any help!

Edit: I just removed both of my Sprite Atlases from my project, and the project opened - so it does appear to be related. Will post more info if I can figure anything out.

Did some more testing:

  1. This crash only happens when the Sprite Atlas has a secondary texture (I used _NormalMap).
  2. It happens even with a single sprite added to the Atlas, with a secondary texture.
  3. The atlas must have been ‘packed’ (aka run the game, or maybe just do Pack Preview) for the crash to happen.
  4. Just to be clear - the crash happens when you try to re-open the project (not when running the game, or anything).

Default settings were used on both the Sprite and the Sprite Atlas.

I made Bug Report with a barebones repro project here: https://fogbugz.unity3d.com/default.asp?1288572 (Update: Issue Tracker link below)

If there happens to be a workaround for this bug that would let us use the functionality of the _NormalMap atlas packing and avoid the crash that would be awesome - even if we have to go through extra steps for the time being. I really want to be able to use this functionality haha :stuck_out_tongue:

Additional info:

  1. The functionality of the Atlases (with normalmap secondary textures) works great.
  2. Standalone builds work fine with the Atlases (doesn’t crash)
  3. Seems that I can just remove the folder that has the Sprite Atlases, then start up Unity, and then add them back to the project, as a workaround.

Issue Tracker link: Unity Issue Tracker - Crash on dynamic_array<SecondarySpriteTexture, 0ul>::assign() when using Sprite Atlas with secondary texture assigned

We have fixed the issue (also verified submitted project as usual). The fix will be available in

2020.2 => 2020.2.0b13
2021.1 => 2021.1.0a7

Thanks for submitting the bug report and repro project
Apologies for the inconvenience caused due to this bug.

@Venkify You rock! Thanks :smile:

1 Like