Start a new topic
Solved

Bug in editor

I have noticed an issue with compile / save in the editor. I have my projects saved in my google drive folder on the local computer. (Google syncs this folder with the cloud) If I save too frequently, the editor will crash and delete the project file I am working on. This seems to happen when google is syncing the file. If I click compile the app will crash. If I select save it will crash and delete the project file. Luckily, it is recoverable from the google drive trash can, but some work is always lost. For a work around, I keep the google drive folder open while working on the project, and make sure that google drive is done syncing the previous changes before hitting save/compile.

I wouldn't call it a bug. It is just as it works. The Editor is not designed as Multiuser Software per se. Imagine the Google-Sync Process just as an additional "using process", which maybe just access your open files when the Editor also like to access ... based on Windows versions, different filesystem-handlings, ..., you get unpredictable results. In worst case, the whole system just crash ... But this is morelike an OS issue, how it handle parallel file-access ... The Editor uses files, but it is hardly to implement to check, if any external process may access too at the same time or not and in which way ... That's the task of the underlaying OS. When you implement such OS tasks into your software, it may conflict at other points with the OS and other running tasks.

There are many similar issues happen with e.g. virus scanner, when they suddenly start scan some files while you still have them in access ... or you like to access while the scanner runs in background ...

When really work with a Cloud, it is strictly recommended to care, that Cloud services wont interrupt your system in any case.

Hope this help and makes things a bit more clear

Gerry

 

As the save function (compile always calls save before proceeding to compile) is intended to save to a local file on the hard drive, using other storage locations certainly has to be beyond scope of what the Nextion Editor can be responsible for.  This would certainly be an issue to report to Google, and I imagine their response would be to decrease your frequency of save/compile such that it allows time for the file to complete its transfers into the cloud successfully.


This certainly is not a new issue and had been widely documented in the 1990s when the more primitive cloud methods were being used (nfs, ftp, etc) as well as any remote drives that went over the man/wan.

Heck, there would be issues in local lan file servers or peer-to-peer systems if the load was to high.


A failed transfer should be considered as failed and deleted since the integrity of the file contents have been lost.  This in your case is more complicated as you are first retrieving the file from the cloud and save requests are being made to the save to the same filename potentially before the requested file has been updated.  Thus as the file has been zeroed to start writing the save to, the remaining amount of the file being retrieved has been lost.  I would recommend you do all the Nextion work locally, and when you are satisfied copy it into Google Drive.


To be frank, systems may have been slower, but were more stable in the 1990s when your direct line was not being shared, when your server was your server and you could actually depend on timings.  With cloud services today, your timings can be thrown to the wind by end of day file syncs or even a couple of neighbours deciding to downloading the latest hi-def episodes of Game of Thrones.

As this is an issue with syncing, it is beyond Nextion's scope.

As such, this will be marked as solved.