filegame-developmentgodotscenegodot4

Godot closes automaticaly when reopen a specific scene


I open the project and work in the main scene and all is ok. Them I open other scenes, or just already opened scenes and work in them normally. Then I click again in the already opened main scene and the engine closes automatically withiout any advice or popup. I can still work in the game but it is really annoying. I'm new to Godot so I don't know yet where to look for soloution to this. This is the tscn file as txt:

[gd_scene load_steps=25 format=3 uid="uid://bsf2o7tbx7jf4"]

[ext_resource type="PackedScene" uid="uid://ctpj7vutf8x8t" path="res://Player/Player.tscn" id="1_ucvfk"]
[ext_resource type="PackedScene" uid="uid://celueydse0ha7" path="res://Assets/platform_big.tscn" id="2_km684"]
[ext_resource type="Script" path="res://Scripts/Camera2D.gd" id="4_1eqss"]
[ext_resource type="PackedScene" uid="uid://bvcblmp3arcru" path="res://Assets/platform_small.tscn" id="4_s304j"]
[ext_resource type="PackedScene" uid="uid://c5lm07yh2k1od" path="res://Assets/BackGround.tscn" id="5_f58ky"]
[ext_resource type="Script" path="res://Scripts/Eraser.gd" id="5_mtntl"]
[ext_resource type="Script" path="res://Scripts/DieZone.gd" id="7_8lb55"]
[ext_resource type="PackedScene" uid="uid://can3i0w42b5j3" path="res://Assets/ItemGenerator.tscn" id="7_8tphp"]
[ext_resource type="PackedScene" uid="uid://c6flqyyver72a" path="res://Assets/generador.tscn" id="8_0jbxy"]
[ext_resource type="PackedScene" uid="uid://e6me4r5mvkna" path="res://Assets/sparks_up.tscn" id="9_kegdm"]
[ext_resource type="PackedScene" uid="uid://e0jucg1w6dji" path="res://Assets/puntaje.tscn" id="9_qlkeu"]
[ext_resource type="Script" path="res://Scripts/sparks_up.gd" id="10_yihnu"]
[ext_resource type="PackedScene" uid="uid://dbpqyfxsyfy72" path="res://Assets/Items/Beef.tscn" id="13_xd71t"]
[ext_resource type="PackedScene" uid="uid://weueemnh2v05" path="res://Assets/Items/Celula.tscn" id="14_kf4ss"]
[ext_resource type="PackedScene" uid="uid://5c6li8r0f757" path="res://Assets/Items/Leg.tscn" id="15_r6vdc"]
[ext_resource type="PackedScene" uid="uid://bvcvsjon3p1ji" path="res://Assets/Items/Lengua.tscn" id="16_iye50"]
[ext_resource type="Script" path="res://Scripts/gameTimer.gd" id="17_kjjac"]
[ext_resource type="PackedScene" uid="uid://cgiqvhojh0520" path="res://Player/Player_Musc.tscn" id="18_kdfe2"]
[ext_resource type="PackedScene" uid="uid://bxuotvu4672qp" path="res://Assets/shootGenerator.tscn" id="19_4e5r7"]
[ext_resource type="PackedScene" uid="uid://dvq62k518ssgb" path="res://Assets/fireball.tscn" id="20_078fd"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_slslj"]
size = Vector2(2151, 165.5)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_fe4jy"]
size = Vector2(416.512, 20)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_ay8dg"]
size = Vector2(229.466, 20)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_c845b"]
size = Vector2(227, 2912)

[node name="MainLevel" type="Node2D"]

[node name="Platform_big" parent="." instance=ExtResource("2_km684")]
position = Vector2(1158, 989)
scale = Vector2(1.315, 1.315)

[node name="platform_small" parent="." instance=ExtResource("4_s304j")]
position = Vector2(2737, 962)
scale = Vector2(1.315, 1.315)

[node name="platform_small2" parent="." instance=ExtResource("4_s304j")]
position = Vector2(3770, 962)
scale = Vector2(1.315, 1.315)

[node name="platform_small3" parent="." instance=ExtResource("4_s304j")]
position = Vector2(4796, 962)
scale = Vector2(1.315, 1.315)

[node name="ParallaxBackground" parent="." instance=ExtResource("5_f58ky")]

[node name="Player" parent="." instance=ExtResource("1_ucvfk")]
z_index = 2
z_as_relative = false
y_sort_enabled = true
position = Vector2(441, 796)
scale = Vector2(0.376, 0.376)
SPEED = 400.0
gravity = 3500

[node name="Beef" parent="." instance=ExtResource("13_xd71t")]
position = Vector2(865, 796)

[node name="Celula" parent="." instance=ExtResource("14_kf4ss")]
position = Vector2(1060, 823)

[node name="Leg" parent="." instance=ExtResource("15_r6vdc")]
position = Vector2(1264, 823)

[node name="Lengua" parent="." instance=ExtResource("16_iye50")]
position = Vector2(1596, 819)

[node name="gameTimer" type="Timer" parent="."]
unique_name_in_owner = true
one_shot = true
script = ExtResource("17_kjjac")

[node name="Player2" parent="." instance=ExtResource("18_kdfe2")]
visible = false
position = Vector2(611, 801)
scale = Vector2(0.395, 0.395)

[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("player")]
show_behind_parent = true
top_level = true
z_index = 3
position = Vector2(960, 540)
scale = Vector2(0.999998, 0.999998)
zoom = Vector2(0.225, 0.225)
script = ExtResource("4_1eqss")
player = NodePath("../Player")

[node name="Limits" type="Node2D" parent="Camera2D"]
position = Vector2(-961, -541)

[node name="LimitUp" type="StaticBody2D" parent="Camera2D/Limits"]
position = Vector2(36, -306)

[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera2D/Limits/LimitUp"]
position = Vector2(995, -158)
shape = SubResource("RectangleShape2D_slslj")
metadata/_edit_lock_ = true

[node name="DieZone" type="Area2D" parent="Camera2D/Limits"]
position = Vector2(970, 1547)
script = ExtResource("7_8lb55")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera2D/Limits/DieZone"]
position = Vector2(300, 0)
scale = Vector2(7.025, 7.025)
shape = SubResource("RectangleShape2D_fe4jy")
metadata/_edit_lock_ = true

[node name="DieZone2" type="Area2D" parent="Camera2D/Limits"]
position = Vector2(-102, 0)
script = ExtResource("7_8lb55")
metadata/_edit_lock_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera2D/Limits/DieZone2"]
position = Vector2(-6.00109, 507)
rotation = 1.57079
scale = Vector2(7.025, 7.025)
shape = SubResource("RectangleShape2D_ay8dg")
metadata/_edit_lock_ = true

[node name="Eraser" type="Area2D" parent="Camera2D/Limits"]
position = Vector2(-2203, 8)
script = ExtResource("5_mtntl")
metadata/_edit_lock_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera2D/Limits/Eraser"]
position = Vector2(27, 465)
shape = SubResource("RectangleShape2D_c845b")
metadata/_edit_lock_ = true

[node name="PlatGenerador" parent="Camera2D" instance=ExtResource("8_0jbxy")]
position = Vector2(3677, -249)
timeMax = 5.0

[node name="PlatGenerador2" parent="Camera2D" instance=ExtResource("8_0jbxy")]
position = Vector2(3244, 94)
timeMax = 10.0
timeMin = 3.0

[node name="PlatGenerador3" parent="Camera2D" instance=ExtResource("8_0jbxy")]
position = Vector2(2891, 418)
timeMax = 6.0
timeMin = 2.0

[node name="ItemGenerator" parent="Camera2D" instance=ExtResource("7_8tphp")]
position = Vector2(3813, -370)
timeMax = 10.0
timeMin = 5.0

[node name="ItemGenerator2" parent="Camera2D" instance=ExtResource("7_8tphp")]
position = Vector2(3441, -62)
timeMax = 3.0
timeMin = 5.0

[node name="ItemGenerator3" parent="Camera2D" instance=ExtResource("7_8tphp")]
position = Vector2(3017, 270)
timeMax = 2.0
timeMin = 3.0

[node name="Porcentaje" parent="Camera2D" instance=ExtResource("9_qlkeu")]
offset_left = 819.0
offset_top = -436.0
offset_right = 859.0
offset_bottom = -379.0

[node name="SparksUp" parent="Camera2D" instance=ExtResource("9_kegdm")]
position = Vector2(954, 434)
emitting = false
script = ExtResource("10_yihnu")

[node name="MarkPosScore" type="Marker2D" parent="Camera2D"]
position = Vector2(1337, -401)

[node name="ShootGenerator" parent="Camera2D" instance=ExtResource("19_4e5r7")]
position = Vector2(1245, 365.001)
timeMax = 0.5
timeMin = 0.2

[node name="Fireball" parent="Camera2D" node_paths=PackedStringArray("firetgt") instance=ExtResource("20_078fd")]
position = Vector2(1190, 243)
pointsValue = 50.0
firetgt = NodePath("../firetgt")

[node name="firetgt" type="Marker2D" parent="Camera2D"]
position = Vector2(401.001, -245)

[connection signal="comenzo" from="Player" to="Player" method="_on_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/PlatGenerador" method="_on_player_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/PlatGenerador2" method="_on_player_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/PlatGenerador3" method="_on_player_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/ItemGenerator" method="_on_player_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/ItemGenerator2" method="_on_player_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/ItemGenerator3" method="_on_player_comenzo"]
[connection signal="comenzo" from="Player" to="Camera2D/ShootGenerator" method="_on_player_comenzo"]
[connection signal="timeout" from="gameTimer" to="Player" method="_on_game_timer_timeout"]
[connection signal="body_entered" from="Camera2D/Limits/DieZone" to="Camera2D/Limits/DieZone" method="_on_body_entered"]
[connection signal="body_entered" from="Camera2D/Limits/DieZone2" to="Camera2D/Limits/DieZone2" method="_on_body_entered"]
[connection signal="body_entered" from="Camera2D/Limits/Eraser" to="Camera2D/Limits/Eraser" method="_on_body_entered"]

I don't know what to try or look. I expect to work normally without the engine closing all the time.


Solution

  • Godot has systems in place to inform you about the source of the issue. when that doesn't work, you need to check the subresources of your scene one by one.

    1. Open all of the subresources listed at the top of your tscn file. see if the scenes work individually.
    2. Replace all of your subresource paths with dummy resources in your scene. Make sure no referenced scripts are "tool" scripts.
    3. Resource your subresources one by one.