Search Issue Tracker
Won't Fix
Votes
4
Found in
5.0.0b14
Issue ID
649909
Regression
No
Unity does not handle corrupted/unsupported images well
To reproduce:
1. Open attached project
2. It contains a few corrupted pngs (they are still displayable by Windows Image viewer)
3. Notice the errors in console:
Could not create texture from Assets/bd927c8547634cdbdd22af0afe818a9b.png: File could not be read
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEditor.DockArea:OnGUI()
NullReferenceException
UnityEditor.TextureImporterInspector.ApplySettingsToTexture () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1398)
UnityEditor.TextureImporterInspector.ResetValues () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:2133)
UnityEditor.AssetImporterInspector.Awake () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/AssetImporterInspector.cs:104)
Unity doesn't crash and the images are quite corrupted, thus throwing out errors seems like a reasonable way to handle this.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
n1gth
Oct 30, 2015 09:05
In some cases PNGs that work everywhere else do not import in Unity... as it says in the issue it would be better to show a useful warning message rather than a "blank" document file in the assets.