Godot Error When Running Its Exported App

Godot Version



I exported my Godot Project on Windows, the game runs fine but upon exit/closing the app with “get_tree().quit()”

See here for the error.

I also noticed that the game exits fine with the DEBUG checked upon export.

I also did the additional stuff on the Editor before exporting.

Any help would be appreciated,

After some digging, I found the cause:
the node I removed during a ready function is not being affected by queue_free() on on_exit_tree() function of the node.

Found two solution:
replaced the remove_child of hide()
add queue_free() after removing a node

I thought that get_tree().quit() removes all nodes on memory after exit.