You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
The line angular_velocity = -nan.0 is added to the attributes of a ParticlesMaterial sub-resource in a .tscn scene which prevents the scene from being re-opened. Re-opening the scene will produce the following error in Godot's Output console:
scene/resources/resource_format_text.cpp:524 - res://bug.tscn:31 - Parse Error: Can't load cached sub-resource: res://bug.tscn::3
core/io/resource_loader.cpp:208 - Condition ' err != OK ' is true. returned: RES()
Failed loading resource: res://bug.tscn
editor/editor_data.cpp:564 - Index p_idx=1 out of size (edited_scene.size()=1)
The only way to fix this issue is to find and remove/replace -nan.0 from the .tscn file using an external text editor.
Steps to reproduce:
Open Godot.
Open the attached NaNbUg project.
Open bug.tscn.
Dismiss the load errors
Ctrl+S to save the scene without modifying anything.
Close the bug.tscn scene.
Try to re-open bug.tscn. (this will trigger the error above)
Other observations
In the process of simplifying my buggy project, I observed the following:
The actor.res file is important to the behavior of this bug. If it is not included in the bug.tscn scene, I don't experience my bug.
If I open actor.res, dismiss the load errors, then save it, then I don't experience my bug.
There is a difference in size between the problem actor.res (1.3K bytes) and the re-saved version (636 bytes).
If I edit bug.tscn and remove lines 7 & 13 ([sub_resource type="PlaneMesh" id=2] and draw_pass_1 = SubResource( 2 )), Godot still adds angular_velocity = -nan.0 to bug.tscn, but it no longer fails to re-open. However, instead of the expected node tree being displayed in the scene graph panel, the scene graph of actor.res is displayed.
What makes this strange is that the VariantReader class doesn't have code to handle -nan.0 that I could find.
Also, if I save the scene again, bug.tscn gets overridden with the same node structure as actor.res which is similar to this bug: Godot saves scenes over others, producing data loss and stack overflows #10675
Note: -nan.0 is not added to the bug.tscn in the latest nightly build from Hugo version v3.2.alpha.calinou.1fed266bf. However, attempting to open bug.tscn with the -nan.0 line results in the following crash:
Can someone please test if this bug exists in the current master or in the current 3.2 branch? This may have been fixed by #36042 which has been cherry-picked for 3.2.2.
Godot version:
v3.1.1.stable.official, downloaded from the Godot main page as Godot_v3.1.1-stable_x11.64.zip
OS/device including version:
OS: Arch Linux: 5.3.0-arch1-1-ARCH #1 SMP PREEMPT Mon Sep 16 03:29:01 UTC 2019 x86_64 GNU/Linux
GPU: VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
Issue description:
The line
angular_velocity = -nan.0
is added to the attributes of aParticlesMaterial
sub-resource in a .tscn scene which prevents the scene from being re-opened. Re-opening the scene will produce the following error in Godot'sOutput
console:The only way to fix this issue is to find and remove/replace
-nan.0
from the .tscn file using an external text editor.Steps to reproduce:
bug.tscn
.Ctrl+S
to save the scene without modifying anything.bug.tscn
scene.bug.tscn
. (this will trigger the error above)Minimal reproduction project:
NaNbUg.tar.gz
Other observations
In the process of simplifying my buggy project, I observed the following:
actor.res
file is important to the behavior of this bug. If it is not included in thebug.tscn
scene, I don't experience my bug.actor.res
, dismiss the load errors, then save it, then I don't experience my bug.There is a difference in size between the problem
actor.res
(1.3K bytes) and the re-saved version (636 bytes).bug.tscn
and remove lines 7 & 13 ([sub_resource type="PlaneMesh" id=2]
anddraw_pass_1 = SubResource( 2 )
), Godot still addsangular_velocity = -nan.0
tobug.tscn
, but it no longer fails to re-open. However, instead of the expected node tree being displayed in the scene graph panel, the scene graph ofactor.res
is displayed.What makes this strange is that the
VariantReader
class doesn't have code to handle-nan.0
that I could find.Also, if I save the scene again,
bug.tscn
gets overridden with the same node structure asactor.res
which is similar to this bug: Godot saves scenes over others, producing data loss and stack overflows #10675Note:
-nan.0
is not added to thebug.tscn
in the latest nightly build from Hugo version v3.2.alpha.calinou.1fed266bf. However, attempting to openbug.tscn
with the-nan.0
line results in the following crash:The text was updated successfully, but these errors were encountered: