Pop-up while saving: Cannot write document

When I save my project, it randomly acts as if its read only and won’t allow saving. It only gives me the option to make a new copy, cancel, or retry.
Thanks

So maybe it is read-only?

Please share more details: what version of GanttProject are you using, what operating system, where do you try to save to.

I havent closed the file when the pop up appears. For example, it would allow me to save it last night and then a couple of times this morning but then suddenly it acts like its read only.

When I close and re-open, it works ok again.

Im using 3.0.2917

Windows 7

So where you’re saving the file? Local disk or what?

Its on a network folder

Is it possible that your colleagues overwrote the file? This message “cannot write document” may appear if file last modification timestamp is greater than one which is stored in the running GanttProject instance.

No, that would not be possible. I am the only person in the office with this software

Maybe you did it from other computer or from other instance of GanttProject on the same computer? Or something went wrong with the server where the network folder is located, so that the timestamps were skewed?

I will add more diagnostics to such errors in the next update. Perhaps this will help to debug the issue.

Thank you. I would be able to see the timestamps in the log?

If this is happens because of the modification timestamps, they will be in the message.

Update 2918 is published now.

INFO: Lost update: file modification time=1611669270154 > the time of the last access by GanttProject=1611669270690
Jan 26, 2021 4:15:47 PM net.sourceforge.ganttproject.gui.ProjectUIFacadeImpl saveProjectTryWrite
INFO: Lost update: file modification time=1611669270154 > the time of the last access by GanttProject=1611669270690
Jan 26, 2021 4:16:12 PM net.sourceforge.ganttproject.gui.ProjectUIFacadeImpl saveProjectTryWrite
INFO: Lost update: file modification time=1611669270154 > the time of the last access by GanttProject=1611669270690
Jan 26, 2021 4:16:12 PM net.sourceforge.ganttproject.gui.ProjectUIFacadeImpl saveProjectTryWrite
INFO: Lost update: file modification time=1611669270154 > the time of the last access by GanttProject=1611669270690

It happened again and this was the log.

Thanks for the log. The difference is ~500 milliseconds, and most likely it is due to the network latency (delay between closing a file on the client and its actual closing and metadata update on the server). I’ll check what we can do with it.

Thank you very much for the quick response

Do you mind testing the update before it is published? I replaced timestamp comparisons with file contents fingerprints. It works in my quick tests, but it would be nice to test in the wild.

Sure, no problem. Ill give it a shot and let you know if the issue happens again

Okay, so here is the archive
https://storage.googleapis.com/dl.ganttproject.biz/updates/update-2919.zip

You need to unzip it in .ganttproject.d/updates folder in your home directory, so that the structure looked as follows:

.ganttproject.d/
  updates/
    update-2919/
      biz.ganttproject.app.localization/
      biz.ganttproject.core/
      ganttproject/  
      VERSION

After restarting GP please open Help>About and make sure that the update is installed (it is supposed to show version 3.0.2919 in the About dialog)

Got it. Ill leave it open and save it periodically throughout the day and see if it happens again. Thank you!

So far so good. We’ve had a couple of server glitches and nothing happened to the file. Ill leave it open overnight and check back tomorrow morning.

Came back in this morning and it saved with no problem after being open all night. Ill be sure to let you know if something comes up. Thank you!

Okay, thanks for testing! Update 2919 is published now.