godotengine / godot

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

Godo 4.2 crashes on import of 4.1.2 project with imported assets #85758

Open MiraBene opened 10 months ago

MiraBene commented 10 months ago

Godot version

4.2

System information

Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop - AMD Ryzen 7 5800H

Issue description

Attempting to open a project in 4.2 that was last edited in 4.1.2 causes the editor to crash. The editor launches successfully and opens an empty 3D-viewport screen, with no node loaded in the tree. The editor then crashes.

This crash only happens when trying to open a project that has external assets within it. Opening a 4.1.3 project w/o imported assets works fine.

I tried to delete the IMPORT files of the assets. In this case, the editor will first load the assets, and create new import files. Then it will crash before loading the scene that is usually displayed when opening the editor.

P.S.: To my knowledge, I do not use godot-jolt.

Steps to reproduce

  1. Download Godot 4.2 dotnet version
  2. Unpack the archive
  3. Open Godot 4.2
  4. Select a project that was last saved with 4.1.2
  5. "This project was last edited in 4.1..." warning pops up => click OK
  6. The editor launches itself, displaying the splashscreen. The splashscreen then disappear from view (window looks minimised) [6bis.] If the project contains assets that are not yet imported, the editor loads the assets as it would do normally when detecting new files in the project tree.
  7. The main view of the editor opens, and after a couple of seconds, the editor crashes

image

EDIT

I tried to launch the editor with the console view, and here is the output. The warnings appear, then the editor crashes a few seconds later. image

Minimal reproduction project

I am not yet sure what would be "minimal" to cause the bug yet. Happy to ship the project as an archive if needed.

MiraBene commented 10 months ago

Ok, I solved the problem on my side, I took a hard stance and deleted the .godot/imports/ directory altogether.

After deleting this directory and opening the project with godot 4.2, the editor imported all the assets again, and this time it didn't crash. I still got the same warnings at the end of the import process, but that time the console displayed some text: image

This can be translated by:

[EN] res://assets/textures/ambient_cg/MetalPlates003_1K-JPG_NormalGL.jpg: The texture was detected as being used as a 3D roughness map. The roughness limit, based on the normal map at res://assets/textures/ambient_cg/MetalPlates003_1K-JPG_NormalGL.jpg, is enabled.

[FR] res://assets/textures/ambient_cg/MetalPlates003_1K-JPG_NormalGL.jpg : La texture fut détectée comme étant utilisé en tant que carte de rugosité en 3D. La limite de rugosité, basée sur la carte de normales à res://assets/textures/ambient_cg/MetalPlates003_1K-JPG_NormalGL.jpg, est activée.

I think there is something happening in the conversion of assets imported with 4.1.2 to 4.2 which is still an issue for other users, but deleting the .godot/import/ directory solves the problem.