(Case 1249421) Graphics.CopyTexture with compressed texture causes editor crash

Since @Aras provided me with a build where the new Texture3D Inspector works on my PC (thank you), I started to look into what other Texture3D related issues were fixed, to lift some restrictions in my Texture3D Atlas Import Pipeline.

Graphics.CopyTexture did not work with Texture3D in earlier Unity versions, but has been fixed now. So I’m using it now rather than SetPixels as before.

However, CopyTexture seems to work with uncompressed textures only. Using compressed texture formats cause an editor crash.

Assertion failed on expression: '!IsCompressedFormat(format)'
UnityEngine.StackTraceUtility:ExtractStackTrace () (at C:/code/unity-main-repo-long/Trunk/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.Graphics:CopyTexture (UnityEngine.Texture,int,UnityEngine.Texture,int) (at C:/code/unity-main-repo-long/Trunk/Runtime/Export/Graphics/Graphics.cs:267)


Received signal SIGSEGV
Stack trace:
0x00007ff67a9ab051 (Unity)
0x00007ff67a9a84c0 (Unity)
0x00007ff67a9a82b3 (Unity)
0x00007ff67cbb0f65 (Unity)
0x000001d74076e87b (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Graphics:CopyTexture_Slice_AllMips (UnityEngine.Texture,int,UnityEngine.Texture,int)
0x000001d74076e7cb (Mono JIT Code) [Graphics.cs:268] UnityEngine.Graphics:CopyTexture (UnityEngine.Texture,int,UnityEngine.Texture,int)
1 Like

The crash has been fixed in 2020.2.0a17. However, Graphics.CopyTexture works for the first slice only, other slices show up corrupted.

Please see this bug-report:
https://discussions.unity.com/t/799724

1 Like