Skip to content
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

Alpha 13 has reoccurring trouble with png assets #63832

Closed
Zireael07 opened this issue Aug 2, 2022 · 9 comments
Closed

Alpha 13 has reoccurring trouble with png assets #63832

Zireael07 opened this issue Aug 2, 2022 · 9 comments

Comments

@Zireael07
Copy link
Contributor

Zireael07 commented Aug 2, 2022

Godot version

4.0 alpha 13

System information

Linux Manjaro, Vulkan, Intel Kaby Lake

Issue description

modules/webp/image_loader_webp.cpp:148 - Condition "r[0] != 'W' || r[1] != 'E' || r[2] != 'B' || r[3] != 'P'" is true. Returning: Ref()
scene/resources/texture.cpp:684 - Condition "img.is_null() || img->is_empty()" is true. Returning: Ref()
Failed loading resource: res://.godot/imported/car at night.png-b44051ef36e5668aa1e358f4486b1816.ctex. Make sure resources have been imported by opening the project in the editor at least once.
Failed loading resource: res://hud/car at night.png. Make sure resources have been imported by opening the project in the editor at least once.
scene/resources/resource_format_text.cpp:171 - res://hud/main_menu.tscn:17 - Parse Error: [ext_resource] referenced non-loaded resource at: res://hud/car at night.png
Transient parent has another exclusive child.

( The last line is probably a red herring, and repeat ad infinitum for EVERY png asset in the project as I try to open related scenes)

Steps to reproduce

Open a project that worked in previous alphas in alpha 13. Problem will temporarily go away upon forcing reimport (i.e. nuking .imported) but then will reappear after relaunching Godot later.

Is super annoying because affected project will open in editor, at least partially, but NOT run (and with NO errors in output upon trying to run), and because it was seemingly fixed earlier.

Minimal reproduction project

N/A

@korompg
Copy link
Contributor

korompg commented Aug 4, 2022

Same thing happens with jpg assets.

@akien-mga
Copy link
Member

This shouldn't happen once .godot/imported has been deleted, unless you re-open that project in older alphas.

@korompg
Copy link
Contributor

korompg commented Aug 4, 2022

I'm exporting for android and I get this error for both png and jpg files. Tried exporting with .godot/imported deleted too but the same thing happens.

@korompg
Copy link
Contributor

korompg commented Aug 4, 2022

Tried with bmp format too. Same error. Here's my minimal reproduction project. It's for VR and I'm testing it on a Quest 2. Also I'm exportin from Linux (Ubuntu 20.04) if that counts.
godot_4_alpha13_resource_loading_test.zip

@Zireael07
Copy link
Contributor Author

It kept reoccuring twice or thrice after nuking /imported, but stopped - however, Godot has also nuked two TextureIcons from my hud scene, as they used pngs. My best guess is it couldn't find them so nuked the line, nuking a whole node with it.

Fortunately I could discard the changes and now it seems to be working, too. Keeping this open since apparently others have a similar problem, though

@korompg
Copy link
Contributor

korompg commented Aug 4, 2022

Deleting .godot/imported won't fix it for me.

@korompg
Copy link
Contributor

korompg commented Aug 4, 2022

So, there are some inconsistencies here. When I export the apk, the .godot/imported folder contains 3 .etc2.ctex files each corresponding with the 3 image files in the project folder. These are supposed to be the compressed texture files the installed app loads when running.

Screenshot from 2022-08-04 15-57-27

But when I run it, for some reason it looks for the .s3tc.ctex files which don't get exported into the apk and I get these errors:

USER ERROR: Unable to open file: res://.godot/imported/icon.bmp-9d1de709bb464c1beb38c8bc584bca25.s3tc.ctex.
at: _load_data (scene/resources/texture.cpp:823) - Condition "f.is_null()" is true. Returning: ERR_CANT_OPEN
USER ERROR: Failed loading resource: res://.godot/imported/icon.bmp-9d1de709bb464c1beb38c8bc584bca25.s3tc.ctex. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:222) - Condition "found" is true. Returning: Ref()
USER ERROR: Failed loading resource: res://icon.bmp. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:222) - Condition "found" is true. Returning: Ref()

Why does this happen?

@akien-mga
Copy link
Member

That's because the Quest 2 was updated to advertise support for S3TC, which is so uncommon on Android that Godot is not designed to handle it properly and so it doesn't export S3TC for Android.

This was worked around in 3.4.5 and 3.5 with #62909.
We can do the same for 4.0 until we decide to refactor this further if/when we see a use for S3TC on mobile (which only a few devices can use).

So it's not the same issue as @Zireael07's in the end.

@Zireael07
Copy link
Contributor Author

Closing then, since it looks resolved on my end. Hopefully won't happen again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants