Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts removed from nodes upon loading godot, seemingly randomly #75039

Closed
FireCatMagic opened this issue Mar 17, 2023 · 9 comments
Closed

Scripts removed from nodes upon loading godot, seemingly randomly #75039

FireCatMagic opened this issue Mar 17, 2023 · 9 comments

Comments

@FireCatMagic
Copy link

Godot version

4.0 stable

System information

Windows 7 64-bit

Issue description

Scripts attached to nodes seemingly randomly are no longer attached to nodes upon loading of Godot. This is found out when attempting to start the game and errors occur, and then checking out the scene where it came from.
My friend also had this same issue.

Steps to reproduce

Create a scene with a node and attatch a script
Close godot
Reopen godot
Sometimes the script is no longer attatched

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Mar 17, 2023

I've has this issue multiple times with the bullet.gd script in godotengine/godot-demo-projects#849, but I could never find a way to trigger this 100% of the time.

@Ezcha
Copy link

Ezcha commented Mar 18, 2023

I keep having this issue as well, unsure of how to reproduce it.

@Gerporgl
Copy link

Gerporgl commented Mar 21, 2023

I have the same issue!

And you know what is interesting, it is only my scene called bullet.tscn with the script called bullet.gd
I've got other very similar scene with similar structure and never had that problem with those.

It is kind of annoying, since upon loading the project, if I run it I get an error, to realize the script association is gone again. I then have to re-select it in the editor (as it is empty).

For me, it seems to be doing that only on one of my 2 computers I use to edit the same project, and not always... (but it is very frequent, almost all the time I would say on that computer) that computer has a 5120 x 1440 monitor (super wide dual 1440P width), so I don't know if that could be related, I know godot always opens with the window maximized and that is also not so much desirable on that screen width... My other one has a 1920x1080 monitor.

The specs of both computers are very similar (Ryzen 3900x and 5950x CPU, AMD RX 6xxx GPUs, etc.). The OS is the same, I am on Linux Pop!_OS 22.04

@FireCatMagic
Copy link
Author

An update - Sometimes this happens with instances. Only the root node is kept, and the script remains, but all children and the instance itself are removed.

@difof
Copy link

difof commented Apr 30, 2023

Same issue here, only happens with tool scripts. I cannot 100% reproduce it because it's ok on some scenes. Very strange! And I notice it when the node lose focus in scene tree. Sometimes the editor puts the script as a built-in script which is annoying because I edit code and see no changes until I figure out this happened.

@adamscott
Copy link
Member

Same issue here, only happens with tool scripts.

Thanks for the precision. It will help debugging.

@adamscott adamscott self-assigned this Apr 30, 2023
@FireCatMagic
Copy link
Author

I do not use any tool scripts in my project and this still happens to me. My project is heavy in custom classes, though.

@Calinou
Copy link
Member

Calinou commented Apr 30, 2023

I do not use any tool scripts in my project and this still happens to me. My project is heavy in custom classes, though.

godotengine/godot-demo-projects#849 doesn't use any @tool scripts either.

@Calinou
Copy link
Member

Calinou commented May 1, 2023

Closing in favor of #76641, which has precise reproduction steps.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants