root node becomes null

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Surge

Hello, I’m having an issue where somehow the root node becomes a null object.

I have two projects, one that acts as an auto updater for the other. I’ll refer to one as the updater and the other as the game.

The game works just fine, on it’s own at least. It’s when I load a scene from the pck file of the game in the updater that the following errors occour:

ERROR: getornull: Condition "!id_map.has(p_rid.get_data())" is true. Returned: __null
  At: ./core/rid.h:160
ERROR: viewport_set_size: Condition "!viewport" is true.
  At: servers/visual/visual_server_viewport.cpp:398
ERROR: getornull: Condition "!id_map.has(p_rid.get_data())" is true. Returned: __null
  At: ./core/rid.h:160
ERROR: viewport_set_global_canvas_transform: Condition "!viewport" is true.
  At: servers/visual/visual_server_viewport.cpp:616
ERROR: getornull: Condition "!id_map.has(p_rid.get_data())" is true. Returned: __null
  At: ./core/rid.h:160
ERROR: viewport_attach_to_screen: Condition "!viewport" is true.
  At: servers/visual/visual_server_viewport.cpp:436 

I don’t know if this is an engine issue or if it’s an artifact of my code, or if this even is a common error whatsoever.

Here’s what the code looks like in my updater:

main.gd · GitHub (code’s too long to put in qa)

Any help would be appreciated, because I don’t know if I’m just missing something.