-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor crashes on textures import #85747
Comments
Errors still encountered on current master (f8a2a91), it's emitted here: Line 2220 in f8a2a91
The size discrepancy originates between Values are 184x244 for allocation, 182x242 for actual size.
|
I could try to debug this. Is there any instruction on how to build and debug the editor? |
See here |
In debugger I can see that
Unfortunately this function is called kinda indirectly in a CommandQueueMT instance and I can't find where it's (and its arguments including the image) added to it.
|
If I understand correctly, the size is different because of the ETC compression used for the image which uses a block size of 4. Taking the width for example, 182 is not divisible by 4, but 184 is. I am still not sure how exactly Godot should handle this. |
The usual way to resolve this is to resize the image to a slightly greater size (i.e. from 182 to 184 pixels, preserving aspect ratio). We can use Lanczos scaling during this operation to ensure crispness remains as close as possible to the original. |
Should this happen during the initial import of image? And should the width/height be updated accordingly? |
This should be done on import type, or at runtime if using |
Can confirm that resizing source images to sizes divisible by 4 resolves the issue. Would be great if Godot could do this for us though. |
This may have been fixed in 4.4-beta3, I'm unable to reproduce the error |
Confirmed fixed in 4.4.dev3 onward, possibly by #97325. |
Godot version
v4.2.stable.official [46dc277]
System information
Fedora 39 KDE Plasma 5.27.9
Issue description
Since upgrading my project from Godot 3 to 4, there is a recurrent bug with textures import that is present on some machines/OSes and not present on others (there is no system in its behavior as I can see). On my machine the editor prints this error for every imported texture and then crashes (sometimes it doesn't crash):
On my coworkers' machines (both Linux and Windows) it may work fine for some time, but then suddenly it starts to show these errors too.
Steps to reproduce
Minimal reproduction project
Bug.zip
The text was updated successfully, but these errors were encountered: