View Issue Details

IDProjectCategoryView StatusLast Update
00305662.x IDE BugsSavingPublic2019-08-02 12:41
ReporterStewart BishopAssigned ToSteven Campbell 
PriorityVery HighSeverityC - GeneralReproducibility100%
Status ResolvedResolutionFixed 
Product Version2.2.2 
Target Version2.2.4Fixed in Version 
Summary0030566: Saving: IDE silently deletes empty code files in a number of circumstances, triggers the File Watcher each time
DescriptionFor GML and DnD projects, if you open your room's creation code and then close this code editor when the file is empty (either by never adding anything in to a new room, or by removing all the code from an existing room), the IDE will silently delete this empty code file off the disk.

Similarly, creating a DnD code file of any type (timeline moments, scripts, object events), leaving it blank and then closing the code editor will also reproduce. GML projects don't repro these bits, as we don't delete the .gml file for these resources - likely because someone added a fix for this very issue at some point in the past.

For all of the above, after a few seconds the file watcher will alert you to a file being changed on disk. The "Reload" button is useless in this situation, as the deleted file will not be restored.

Steps To Reproduce1) Create any project
2) Open the creation code for the room, but don't type anything in
4) Close the room creation code (or the room itself)
5) Wait a few seconds
6) See that this triggers a project modified (reload/save?) dialogue
Repro: 100%

1. Create a new DnD project
2. Create a new timeline resource.
3. Add a moment 0.
4. Don't type anything in the code editor.
5. Close the timeline.
6. Wait a few seconds.
7. See the file watcher.
Repro: 100%
TagsGM2KI, IDE, thatsit
2.x IDE Found In2.2.2.393
2.x Runtime Found In2.2.2.308
2.x IDE Verified In
2.x Runtime Verified In

Activities

Dan

2019-02-26 16:31

Adminstrator  

Alexander Borup

2019-04-02 16:02

Developer   ~0063574

In the second repro steps, it is erroneously triggering on a file that we intentionally delete...

Alexander Borup

2019-04-09 11:35

Developer   ~0063598

The overarching issue here is that the file watcher takes the time that it notices a file being delete as the 'time of deletion' of that file... which may be anywhere within a (by default - users can change it) 2 second window. The file system tells the file watcher to ignore changes while it's making them (begin/end guards), but the file watcher ticks (by default) once every 2 seconds, coming back to that window. Because file deletion has no time stamp associated with it, it's the best it can do without communicating with the OS. So it should probably be communicating with the OS to fix this.

Dan

2019-07-11 12:02

Adminstrator   ~0064399

Updated all of the above info and repro steps, now we have confirmed exactly what's going on here.

This one causes errors in our automation suite at the moment (which we can now fix), but does also explain why customers frequently complain about seeing this dialog all the time and we weren't sure why they were saying this.

Steven Campbell

2019-07-16 16:22

Manager   ~0064439

Fixed in Red IDE/GItHub Pull Request 4724
Git Id: c76724268776505856b24ce341d8f718026a123f

Matthew McInnes

2019-08-01 15:15

Adminstrator   ~0064526

Reopening. This is still occurring for scripts (both GML and DND).

Same reproduction steps.

Steven Campbell

2019-08-02 12:41

Manager   ~0064527

Additional fix in Red IDE / GitHub Pull Request 4774
Git Id: f0da79a06df1f02eba399162fd5cb704becac44d

This adds consistency for Scripts, Notes and Shaders to only save something when there is something to save.