godot: Error: Failed to get modified time on assets used in a scene

Godot version: 5b5db08a51a2240dfc8452309284152af1425185

OS/device including version: Windows 10, 64-bit

Issue description: When exporting the game, some assets when loaded in a scene, will cause this error:

ERROR: Failed to get modified time for: Icons/4701338.jpg
   At: drivers\windows\file_access_windows.cpp:306

This happens for .ogg files, jpg, and png. I think for any type of resource These errors are only generated when the asset is used in a scene These errors do not get generated when previewing the scene in the Editor

Steps to reproduce:

  • Add a Sprite node, set its texture to any png file
  • Export game with debug enabled
  • You will see errors flood the console (dependent on how many)

Minimal reproduction project: New Game Project55.zip

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 12
  • Comments: 29 (8 by maintainers)

Most upvoted comments

FileAccessNetwork does not print an error message when getting the modified time fails:

https://github.com/godotengine/godot/blob/b9d877e55fc469e7441cb00856359946b91d00ff/core/io/file_access_network.cpp#L442-L457

In contrast, FileAccessWindows and FileAccessUnix do:

https://github.com/godotengine/godot/blob/b9d877e55fc469e7441cb00856359946b91d00ff/drivers/unix/file_access_unix.cpp#L310

https://github.com/godotengine/godot/blob/b9d877e55fc469e7441cb00856359946b91d00ff/drivers/windows/file_access_windows.cpp#L338

The question is, should we make those fail silently instead of printing an error message? I feel the file’s last modification date is hardly critical information to maintain, so it’s not much of a problem if it can’t be retrieved correctly.

We can perhaps replace those errors with print_verbose() if it’s really needed.

I’m getting this error after loading PCK / Zip file at runtime and then instancing a scene that contains textures in said PCK / Zip

This error doesn’t happen after export, only when running the game in-editor.

I think it is coming from here:

https://github.com/godotengine/godot/blob/7447c3b76cbba3d39f6a6844d68925b42218d025/core/io/resource_loader.cpp#L402

The same thing happens when you load a .tscn from a .pck with a different root folder as to the main project folder, Godot fails to get modified time from a poorly concatenated path that seems to come out of nowhere.

I have the same error, but it may not be the same issue.

When I copied a font tres file that was in the root of the project to a different project in the res:///ui folder with it’s font source.

Later I moved the font source to an ‘assets’ folder within the Godot editor as res://ui/assets.

In the actual .tres file opened in a text editor Godot had added assets to the file path but it was res://assets/somefont in the .tres file.

Godot did not properly change the file path in the editor.

This is a subtle error.

Edit: using Godot 3.1.1, Linux.

I just encountered this problem too and @DevinPentecost 's fix works.

Hi,

I’m getting this error as well. However, I’m really not sure what is causing it - only a few .png files are having this trouble:

ERROR: Failed to get modified time for: .../project/objects/gui/life.png At: drivers/windows/file_access_windows.cpp:338 ERROR: Failed to get modified time for: .../project/objects/gui/background_screen.png At: drivers/windows/file_access_windows.cpp:338 This is breaking my Windows build, I think…

ERROR: No loader found for resource: res://objects/gui/life.png At: core/io/resource_loader.cpp:285 ERROR: Can't load dependency: res://objects/gui/life.png At: core/io/resource_format_binary.cpp:659 ERROR: load: Condition ' err != OK ' is true. returned: RES() At: core/io/resource_loader.cpp:208 ERROR: Failed loading resource: res://objects/gui/score/ScoreGUI.tscn.converted.res At: core/io/resource_loader.cpp:285 ERROR: Can't load dependency: res://objects/gui/score/ScoreGUI.tscn At: core/io/resource_format_binary.cpp:659 ERROR: load: Condition ' err != OK ' is true. returned: RES() At: core/io/resource_loader.cpp:208 ERROR: Failed loading resource: res://objects/gui/MainGUI.tscn.converted.res At: core/io/resource_loader.cpp:285 ERROR: Can't load dependency: res://objects/gui/MainGUI.tscn At: core/io/resource_format_binary.cpp:659 ERROR: load: Condition ' err != OK ' is true. returned: RES() At: core/io/resource_loader.cpp:208 ERROR: Failed loading resource: res://scenes/MainGame.tscn.converted.res At: core/io/resource_loader.cpp:285

Any ideas? I’ve even tried deleting the file and saving another copy, and the file works just fine when I run the game from the editor…

Thanks, -Devin

Is this still reproducible in the current master branch / latest beta builds?

I’ve tried the MRP on Linux, exporting it to Windows and running the binary through WINE, and did not reproduce any issue.

This is breaking my tile-maps in my game in the 3.1 beta 3. Any word on if this will get fixed before actual release of 3.1?