Error when game is exported: **ERROR**: Condition "!f" is true. Returned: ERR_CANT_OPEN

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Loekni

When I export my game on linux or windows I always have this error, I can’t find where it’s coming from and don’t know how to solve it.

Here’s the error message:

ERROR: Condition “!f” is true. Returned: ERR_CANT_OPEN

At: scene/resources/texture.cpp:502:_load_data() - Condition “!f” is true. Returned: ERR_CANT_OPEN

Also I tried the solution mentionned here it didn’t work: https://forum.godotengine.org/68249/err-_load_data-condition-f-is-true-returned-err_cant_open?show=68249#q68249

:bust_in_silhouette: Reply From: klaas

Hi,
the error states, the file cannot be opened for reading.

Is the file in a packed resource?
Is the filename somehow “special”?
Have you considered using the latest stable godot release?

Hi, I don’t know which file it is.
I have exported the game with the last release, there is the same error.
I’ll look for special characters in my file names.

Loekni | 2021-07-26 19:54

Have you made a debug build? Is there no hint to the texture in the console?

klaas | 2021-07-26 19:56

Yes I’ve made a debug build, the error above is the only error printed on the console.

Loekni | 2021-07-26 20:02

The error arises from a StreamTexture. Maybe this points to the texture what causes this problems.

The StreamTexture is a texture loaded froma .STEX file

From fileinfo.com

What is an STEX file?

A STEX file contains a texture created by Godot Engine, a free and open source game engine used to create 2D and 3D games. It stores an image in StreamTexture format, which is applied to an object in the game to give it texture.

STEX files are created when a user drags and drops an image, typically a .PNG file, into the project assets in Godot Engine. The project copies the image file and appends the .stex file extension onto the existing file extension.

klaas | 2021-07-26 20:11

I have checked my .pck file I have 2650 stex files, how do I find which one creates the error ?

Loekni | 2021-07-27 09:49

Are you loading any textures by script?

klaas | 2021-07-27 10:48

No, but I found the problem, I compared older version of the game and I found when the error started to appear. Then I compared with the previous version (without error) to find what changed. I found out that I added a few textures in the game. So I drag & drop once more those textures. And I have no more errors. Anyway thank your for your help!

Loekni | 2021-07-27 13:01

:bust_in_silhouette: Reply From: uniquegamesofficial

Delete Godot’s files in %LOCALAPPDATA%\Temp\Godot, install another version of Godot and try again!