Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2019.4.X
Crash when creating a new Texture2D with a resolution greater or equal to 2048 and the mipCount higher than 1
How to reproduce:
1. Open the attached project named "Case_1213005"
2. Open the Sample Scene
3. Enter Play mode
Expected result: Editor Enters Play mode and successfully creates a new Texture2D or throws a related error message
Actual result: Editor crashes
Reproducible with: 2019.2.18f1, 2019.3.0f5, 2020.1.0a20
Could not test with: 2017.4.36f1, 2018.4.15f1(Constructor option to set the mipCount was introduced in 2019.2)
- Setting the resolution to 1024x1024 and the mipCount to 12 produces the following error:
Assertion failed on expression: 'mipCount >= -1 && mipCount <= fullMipChainCount'
UnityEngine.Texture2D:.ctor(Int32, Int32, GraphicsFormat, Int32, TextureCreationFlags)
NewBehaviourScript:Start() (at Assets/NewBehaviourScript.cs:12)
- The crash can be worked around by passing both the mipcount and TextureCreationFlags.MipChain to the Texture2D constructor.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Resizing Profiler Module Details panel and releasing mouse button outside Unity doesn't cancel resize
- "Auto-hide gizmos" preference is not saved when reopening the project
- Sampling a custom depth texture on a machine with a GTX 1080 makes object's textures display the wrong color when in Play mode or Player
- Terrain is missing the Hidden/TerrainEngine/Details/WavingDoublePass shader when AssetBundles are built in older Unity Versions
- [Android] URP Project crashes when built on a device with PowerVR Rogue GE8320 GPU