godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.42k stars 21.26k forks source link

Built-in script live reloading is broken again #99006

Open KoBeWi opened 2 weeks ago

KoBeWi commented 2 weeks ago

Tested versions

Broken in 4.4 dev4 Works in 4.3 dev4

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

94012 implemented live reloading for built-in scrpipts. But it's not working in 4.4 dev4. Modifying and saving a built-in script while the project is running will result in

E GDScriptLanguage::reload_scripts: Condition "fresh.is_null()" is true. Continuing.
  <C++ Source>   modules\gdscript\gdscript.cpp:2668 @ GDScriptLanguage::reload_scripts()

and the runtime script is unchanged.

Steps to reproduce

  1. Add a node with built-in script (which for example prints something in _process()
  2. Run the project
  3. Modify the script and save (e.g. change what it's printing)
  4. The script is not reflected in the running project
  5. Also error

Minimal reproduction project (MRP)

N/A

matheusmdx commented 2 weeks ago

Bisected to #96499, @beev1s

image