godotengine / godot

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

Models randomly deleting (vanishing) and making every other models disappear as well #95664

Open asc11fromsc opened 2 months ago

asc11fromsc commented 2 months ago

Tested versions

Reproductive in: v4.3.stable.mono.official.77dcf97d8 compatible with c#, but i dont use c# in the project with this error at all. in v4.2 the project works completely fine

System information

Windows 10 - OpenGL API 3.3.0 NVIDIA 560.70 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3080 Ti Laptop GPU

Issue description

At first i want to notice that im constantly receiving this "LoadErors" window with no errors in it on startup:

LoadErrors

It could be somehow connected to the bug.

The main issue is:

Models exported from blender started to delete when running a scene. Im doing a fps multiplayer game and at first, the game was crushing due to gun model disappear, i debugged for a hour and there is no queue_free(), no deleting functions at all so i understood that it deletes it self and found a message in debug saying:

LocalGameMngr.gd:10 @ _ready(): Node 'WeaponzBoneThingg/Weapons/Root Scene' was modified from inside an instance, but it has vanished.

I did not change code at this point at all, and after i got rid of this particular model of revolver and launched my game now my player model started to delete it self also?! Like it makes no sense at all. Why didnt it delete before but only now? You might think that my project might be at some remote external drive but its not.

So i ran some testings:

models without player tscn here error codes:

W 0:00:01:0256 open: res://Weapons/Revolver/oldRevolverLowPoly.fbx: In external resource #0, invalid UID: uid://c4r0dop55u3pa - using text path instead: res://Weapons/Revolver/oldRevolverLowPoly-85c565a130d3f39de665492bb4cb7d68_old revolver.png <C++ Source> core/io/resource_format_binary.cpp:1083 @ open()

E 0:00:01:0256 _load: Resource file not found: res://Weapons/Revolver/oldRevolverLowPoly-85c565a130d3f39de665492bb4cb7d68_old revolver.png (expected type: Texture2D) <C++ Error> Condition "!file_check->file_exists(p_path)" is true. Returning: Ref() <C++ Source> core/io/resource_loader.cpp:288 @ _load()

E 0:00:01:0256 parse_variant: Can't load dependency: res://Weapons/Revolver/oldRevolverLowPoly-85c565a130d3f39de665492bb4cb7d68_old revolver.png. <C++ Error> Method/function failed. Returning: error <C++ Source> core/io/resource_format_binary.cpp:461 @ parse_variant()

E 0:00:01:0256 _load: Failed loading resource: res://.godot/imported/oldRevolverLowPoly.fbx-85c565a130d3f39de665492bb4cb7d68.scn. Make sure resources have been imported by opening the project in the editor at least once. <C++ Error> Condition "found" is true. Returning: Ref() <C++ Source> core/io/resource_loader.cpp:283 @ _load()

E 0:00:01:0256 _load: Failed loading resource: res://Weapons/Revolver/oldRevolverLowPoly.fbx. Make sure resources have been imported by opening the project in the editor at least once. <C++ Error> Condition "found" is true. Returning: Ref() <C++ Source> core/io/resource_loader.cpp:283 @ _load()

E 0:00:01:0256 _parse_ext_resource: res://Vehicle/TestCar.tscn:28 - Parse Error: [ext_resource] referenced non-existent resource at: res://Weapons/Revolver/oldRevolverLowPoly.fbx <C++ Source> scene/resources/resource_format_text.cpp:159 @ _parse_ext_resource()

W 0:00:01:0258 instantiate: Node './Root Scene2' was modified from inside an instance, but it has vanished. <C++ Source> scene/resources/packed_scene.cpp:254 @ instantiate()

And as we can see the biggest revolver which is .fbx model is being deleted but surprisingly the .blend export of it does not, as well as player models do not delete them selfs nor .fbx or .blend does. Also u could notice some errors which have something to do with revolver textures and assume that its the reason of the issue but its not, those extremelly long named textures are textures exported with model from blender which i deleted, and models utilize material which i created with different texture files and further more: i had this error even at start of project but everything allways ran completely fine. It might have something to do with the issue.

Then i added player .tscn but removed ALL scripts from it

with player tscn Also something that i cannot understand that it also gives me warnings of code which is not exist on the current scene, the code is usually attached to player, yes. But this time there i removed all code from all object and it should not appear at all?!

i attached those in this file because there is 81 lines which would take way to much space from here Errors when player tscn is present.txt p.s. sorry for way too genious variable names

I believe this is it. Before, i tried to find this issue listed in reports but could not so i believe this is not a duplicate.

im sorry for this issue to be overly confusing and poorly written...

Steps to reproduce

I have no idea how u can reproduce it but i can attach models files here 2mb models of player and revolver

and whole project if u will. i guess i have nothing to loose anyway. 15 mb project

Also i must notice some important details which could have something with producing this bug:

The revolver deleting bug started to accrue in Godot_v4.2.2-stable_mono_win64 and there fore i downloaded the latest version and after this the whole player deleting everything bug happend. And so the project was converted from 4.2 to 4.3

after i wrote all this i tested for a few more hours and its unbelievable but.... i had the godot project on external drive and i allready had a Godot_v4.2.2-stable_mono_win64, i opened it there and everything works perfectly fine... i must notice that now there is not a single red error message about missing textures as well as no empty "LoadErors" window... and this project must be a little bit older but i can not tell any differences i dont remember any differences in it at all, the only difference it has suppose to be absence of a single vehicle .blend model

https://drive.google.com/file/d/1lAWTAW2NFB5HdQTdrLo5CjD-LYPSEtVu/view?usp=sharing here link to the project which i believe should not work as well

Minimal reproduction project (MRP)

https://drive.google.com/file/d/1YhNvxoKq9m10gVdGI51clW4fx0FybVNz/view?usp=sharing archive a attached weights 5 mb

So what u have to do is to launch main scene called "World" Appeared window u must first press "Host" Then press "Play" After, in Scene tab u must choose "Remote" and u can see that models r deleted remote

But in .tscn file of Player following in this directory: Path to player file

u can notice that the structure is different and witness that models some how delete them selfs randomly, but the thing is that for me at first hour player model did not delete it self and started doing it only later for no reason, i repeat: i did not change any code, i did not change any structure, only thing i did is i added an csg cube as child NOT to player model but for separate object called "WeaponzBoneThingg" which is marked green on following image where i did the only changes player model is called "BlankCharacter" and marked red on the screenshot

i have to mention that unarchived project weights 30 mb but it impossible to make it weight less then 10 because only the models together allready weight more then 10 mb and its essential because bug is strongly dependent on those models

note: i didnot upload .godot folder but its impossible to "Drag and drop a ZIP archive to upload it" even through .zip file weights 5 mb

asc11fromsc commented 2 months ago

I believe the reason for bug might be blender import

Today i discovered one possible very important thing why this bugg may accrue, is "Blender file import path".

So today i opened the slight older version of project which works fine(it was never converted to 4.3), in godot 4.2 and noticed the only difference between it and crashing project, its: Absence of "Blender file import path", so the project utilizes only .fbx files and work perfectly fine.

So problem also must be connected to the blender i use? but im not sure. Blender version i use is 4.2.0, with no special plugins or addons at all.

Also i must notice this strange ENGINE error i see:

spooky error

Godot Engine v4.2.2.stable.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.

modules/gltf/register_types.cpp:63 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.

--- Debug adapter server started --- --- GDScript language server started on port 6005 ---

scene/3d/node_3d.cpp:343 - Condition "!is_inside_tree()" is true. Returning: Transform3D()

because its like not my script and its even .cpp file so it must be some engine code?! and it gives errors??!

akien-mga commented 1 month ago

So the main difference seems to be that in 4.2, you were not using Blender import (because the Blender path wasn't configured), while in 4.3, it's importing Blender files that you didn't expect it to?