Crash when editing script

Godot Version



Hi! New amateur dev here!

I encountered a very weird crash when editing this method I was trying to print some stuff for debugging, and as soon as I type “print(stats.)” godot crashes and shuts down:

func _on_Timer_timeout():
	var target_selected = false
	var i = 0
	if collectible_list != []:
		for collectible in collectible_list:
			if not object_is_out_of_screen(collectible):
				var stats = collectible.get_node("Stats")
// problematic line
				if acceptable_collectibles_list.has(
					target = collectible
					target_selected = true
			i += 1

I’ll probably try to avoid and work around the problem, since it’s way above my paygrade, but i’ll leave a github repository with the buggy project just in case anyone is interested! Here:

Thanks everyone!


Your git repo only has 1 file in it called .gitattributes, so there’s nothing to look at, but I am kinda surprised that print statements isn’t generating an error in the editor since the period at the end of the stats variable should be throwing an error.

I also have a problem with godot crashing but for me, it crashes while switching in editor between C# and gdscript script.

Hello! Thanks for the response!

Yes, I know. I meant that as soon as I write the dot in “stats.” (it doesn’t even need to be inside if the print, just inside this paticular method, after the variable declaration) Godot crashes instantly. It’s not a bug in my program, the editor software completely shuts down.That’s what I was trying to illustrate writing it like that.

The github should be fixed now (sorry complete amateur here hehehe). If the bug is replicable in other computers you should just try and write “stats.” in the same spot I did and the program should crash inmediately. I just tried it again after modifying some other parts of the code and it still happens.

Thankfully I was able to resolve my bug witout need of that problematic print, so it’s not a problem for me at the moment. Still if there’s anything I can do to help solve the issue I’ll try my best!