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

Files sometime not refreshing until restarting editor. #21494

Closed
ghost opened this issue Aug 27, 2018 · 10 comments
Closed

Files sometime not refreshing until restarting editor. #21494

ghost opened this issue Aug 27, 2018 · 10 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2018

Using a 64-bit Windows build of Godot 3.1 from a few hours ago.

So far this was a one off event. I'm not exactly sure how to reproduce this one yet. I'll post back if I have an success or re-encounter this.

Was testing out another issue, and saved some changes in an external editor. I removed the comment from line 2 as seen below.

sublime_text_2018-08-27_20-03-07

When I returned to the editor the old code was persisting, even when closing and reopening the file.

godot master_2018-08-27_20-02-44

I ran it as it was, and the ground truth was that is was actually edited, because this line was going to cause an error and did, because I used the same class name in another script.

godot master_2018-08-27_20-02-50

I went back to the script after running it, and it was still commented out as if it were the old version.

It only resolved by a restart of the editor.

I was also getting some errors like these a little bit earlier, and am including them just in case they're related if there is something that can go amiss with the file reading/locking.

Note: The only png in this project is the default icon.png.

godot master_2018-08-27_19-57-17

@ghost
Copy link
Author

ghost commented Sep 11, 2018

Still periodically happening as of c320d93.

At the moment I have to copy and paste my outside work into the script editor. The project has to be closed and re-opened, and the soft reload option in the script editor doesn't work.

@ghost
Copy link
Author

ghost commented Sep 21, 2018

Closing. I believe this to be resolved by: #22069

Related to: #21956

Currently, there is another issue with the editor and tool script not reloading external code changes: #22144

@ghost ghost closed this as completed Sep 21, 2018
@akien-mga akien-mga added this to the 3.1 milestone Sep 21, 2018
@chanon
Copy link
Contributor

chanon commented Sep 25, 2018

the old code was persisting, even when closing and reopening the file.

I am seeing this happening too. Difference is that I wasn't editing in an external editor.
I was on commit: 94403af
Which was after #22069 was committed.

I made changes to a .gd script, committed and pushed them in git, worked on some other stuff, and then came back to the .gd script and it was the old version before I made the changes. I closed the file in the script editor and re-opened it and it was still the old version. I opened the file on disk in another program and it was the edited committed version. So Godot was showing something completely different from what was on disk, as if it was sticking to its cached version.

Makes me scared I will accidentally lose work.

@chanon
Copy link
Contributor

chanon commented Sep 25, 2018

And it happened a second time in a different file, where it hit a bug in my code, but the debugger stopped on the wrong line. After looking at it I realized that it was again the wrong version of the script file (it was different to the file on disk) which is why the debugger stopped on the wrong line ... the line with the bug wasn't in the version the editor was displaying.

EDIT: it happened on a third file in the same session. Good thing I committed the changes before. Not sure if it is a problem when working with git or not. In any case I believe this issue should be re-opened.

@ghost
Copy link
Author

ghost commented Sep 25, 2018

Sure thing, I'll reopen it.

@ghost ghost reopened this Sep 25, 2018
@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 23, 2019
@akien-mga
Copy link
Member

Is this still reproducible in the current master branch?

@ghost
Copy link
Author

ghost commented Jan 23, 2019

Seems to update now. The only thing I get is an error in the console. Would this be something you want to reclassify?

image

It might be a new issue, because I notice that this stops the syntax checking until you change something in the script and save it from inside the editor.

image

After adding a space on the end and saving it.

image

@nicolasdiehl
Copy link

nicolasdiehl commented Mar 1, 2019

The saving loading and updating behaviour changed in recent builds, but not for the better. #24646

@akien-mga
Copy link
Member

Seems like a duplicate of #20250 (at least the comment for which this issue was reopened, once the original one had been closed).

@madamc
Copy link

madamc commented Jun 14, 2020

I'm experiencing this same issue. I can make no new changes to my code. Restarting the editor and Visual Studio Code does nothing. I'm using Godot Engine v3.2.1.stable.mono.official. I am using only c# scripts.

I'm not sure if this is the cause, but I also receive these errors every second or so while the game is running:
E 0:00:10.020 body_test_motion: Condition "!body->get_space()" is true. Returned: false <C++ Source> servers/physics_2d/physics_2d_server_sw.cpp:1051 @ body_test_motion() <Stack Trace> :0 @ void Godot.NativeCalls.godot_icall_6_501(IntPtr , IntPtr , Godot.Vector2& , Godot.Vector2& , Boolean , Int32 , System.Single& , Boolean , Godot.Vector2& )() KinematicBody2D.cs:96 @ Godot.Vector2 Godot.KinematicBody2D.MoveAndSlide(Godot.Vector2 , System.Nullable1[Godot.Vector2] , Boolean , Int32 , Single , Boolean )()
BulletOrb.cs:77 @ void BulletOrb._PhysicsProcess(Single )()
E 0:00:10.024 body_test_ray_separation: Condition "!body->get_space()" is true. Returned: false
<C++ Source> servers/physics_2d/physics_2d_server_sw.cpp:1063 @ body_test_ray_separation()
:0 @ void Godot.NativeCalls.godot_icall_6_501(IntPtr , IntPtr , Godot.Vector2& , Godot.Vector2& , Boolean , Int32 , System.Single& , Boolean , Godot.Vector2& )()
KinematicBody2D.cs:96 @ Godot.Vector2 Godot.KinematicBody2D.MoveAndSlide(Godot.Vector2 , System.Nullable1[Godot.Vector2] , Boolean , Int32 , Single , Boolean )() BulletOrb.cs:77 @ void BulletOrb._PhysicsProcess(Single )()

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

4 participants