I'm having some strange issues with removing a child node when changing scenes and I'll try to explain what's happening because I really have no clue what is going on.
I have a planet and a rocketship that can fly around. Whenever you touch down on the planet, it calls a change scene function on a singleton script:
func change_scene(scene):
player.get_parent().remove_child(player)
get_tree().change_scene(scene)
The player has to be removed so that I can add him back in to the new scene. This works great if, and only if, you land on the bottom of the planet. Land near the north pole, and I get a crash and error message "Attempt to call function 'removechild' in base 'nullinstance' on a null instance." There should be no null instances involved, I have the console print out both player and player.get_parent() and they are both nodes. I can provide a project file if it helps because this is really peculiar.