Reproduction steps:
1. Open the attached project “Atlas Bug.zip“
2. In the Project window select the “New Sprite Atlas“ Sprite Atlas
3. In the Inspector add the “pistol_ico“ Asset to the “Objects for Packing” list
4. Click “Pack Preview“
Expected result: The Asset Preview window is shown without the Editor crashing
Actual result: The Editor crashes
Reproducible with: 2022.1.0a15, 2022.2.5f1, 2023.1.0b2
Not reproducible with: 2020.3.44f1, 2021.3.18f1, 2022.1.0a14
Reproduced on: Windows 10 Pro
First few lines of the stack trace:
{{0x00007ff78c42709a (Unity) GenerateTextureAndSpriteRectDataFromAtlasMask }}
{{0x00007ff78c414d19 (Unity) PackAtlases }}
{{0x00007ff78c413ee1 (Unity) PackAtlasOnJob }}
{{0x00007ff78c4182c2 (Unity) PackSpriteAtlases }}
0x00007ff78b05c16d (Unity) SpriteAtlasUtility_CUSTOM_PackAtlasesInternal