godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.36k stars 21.25k forks source link

Errors on image re-import when using the "Import Resources When Unfocused" editor setting #90937

Open passivestar opened 7 months ago

passivestar commented 7 months ago

Tested versions

v4.3.dev.custom_build [4a0160241]

System information

Godot v4.3.dev (4a0160241) - macOS 14.4.0 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)

Issue description

This is a somewhat expected aftermath of https://github.com/godotengine/godot/pull/76991, opening this issue so it can be tracked

When exporting a large 4k texture set from Substance Painter, Godot attempts to import files that weren't finished exporting yet, resulting in error spam (notice no error spam when exporting a small texture set):

https://github.com/godotengine/godot/assets/60579014/1511f0a7-14e2-4ffa-a170-b4d1ba6a2c35

drivers/png/png_driver_common.cpp:56 - read beyond end of data
drivers/png/png_driver_common.cpp:119 - Condition "!success" is true. Returning: ERR_FILE_CORRUPT
core/io/image_loader.cpp:101 - Error loading image: res://textures_Cube/Cube_Roughness.png
Error importing 'res://textures_Cube/Cube_Roughness.png'.
drivers/png/png_driver_common.cpp:56 - read beyond end of data
drivers/png/png_driver_common.cpp:119 - Condition "!success" is true. Returning: ERR_FILE_CORRUPT
core/io/image_loader.cpp:101 - Error loading image: res://textures_Cube/Cube_BaseColor.png
Error importing 'res://textures_Cube/Cube_BaseColor.png'.

...

Despite the error spam the textures still seem to get imported into Godot

Steps to reproduce

I'm putting everything from that video into the MRP zip, including blend and spp files. Can't think of an easier way to test this off the top of my head

Minimal reproduction project (MRP)

https://drive.proton.me/urls/TYYMW9QST8#Z8cdSLaaavRB

Calinou commented 7 months ago

Does this occur if you set the textures' Detect 3D import option to Disabled (or alternatively, reimport textures that are not used in 3D anywhere in the project)? I wonder if this is due to normal map detection for the roughness limiter on import.

passivestar commented 7 months ago

Does this occur if you set the textures' Detect 3D import option to Disabled

Yes