Every time a project is opened on Windows, a scary looking error is displayed.
This is likely caused because the omegat.project
file is still locked on Windows when we try to create a omegat.project.bak
backup (introduced in [1dc7a476f8a9d2176758e80014fdfd0ee38ef25f]).
This happens whether I use a JDK8 or a JDK11 to launch the application.
This is the relevant part of the stackTrace when the error occurs:
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - Impossible de lire le fichier projet ! (PP_ERROR_UNABLE_TO_READ_PROJECT_FILE)
[...]
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - Caused by: java.nio.file.FileSystemException: C:\Users\briac\Desktop\omegat-test\omegat.project -> C:\Users\briac\Desktop\omegat-test\omegat.project.bak: Le processus ne peut pas accéder au fichier car un autre processus en a verrouillé une partie.
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - at sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:205)
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - at sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:278)
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - at java.nio.file.Files.copy(Files.java:1274)
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - at org.omegat.gui.main.ProjectUICommands$6.doInBackground(ProjectUICommands.java:454)
2023-01-11 08:59:46,0363 [AWT-EventQueue-0] Erreur global - ... 7 more
Happens to me as well. At least for the last 3 versions of nightly. Error messsage cf. text below.
Afterwards, project can still be opened, but the mouse pointer switches to the BusyIndicator indicating a time consuming task whenever it hovers over the menu bar. App still responsive, but somewhat erratic. However, task manager doesn't show excessive CPU load, only intermittant IO, even though app is idle.
Error-Message (in German)
Btw, really like the messagebox formatting. Just one line. Wide'n Low, ain't it? 😉
Support-Info:
Version: OmegaT-5.8.0_0_4d6e89ec
Platform: Windows 10 10.0
Java: 1.8.0_351 amd64
Memory: 640MiB total / 428MiB free / 1803MiB max
@t_cordonnier What's your ideas?
I think it's safe to remove the whole
Files.copy(...)
on line 453 since we just created a backup moment before during the call toprojectOpenImpl
(line 616)This is a bug introduced by proposal Backup project file to enable reuse in case of crash
a commit [1dc7a476f8a9d2176758e80014fdfd0ee38ef25f] that intend to fix a bug https://sourceforge.net/p/omegat/mailman/message/37715643/ by @t_cordonnier
Files.copy(...)
on line 453 is introduced by the above change.projectOpenImpl
(line 616) make backup file usingFileUtil.backupFile(projectFile)
that produce a nameomegat.project.YYYYYMMDD.bak
whenomegat.project
is updated with remote change in team project.Related
Commit: [1dc7a4]
Here is a fix proposal.
https://github.com/omegat-org/omegat/pull/415
@briac_pilpre could you review a change?
Error is gone (at least for me) in the latest version - thank you! 🙏
small caveat: this is a slightly different system in a different environment. But it had the same issue. Will repeat the test with the system at home from which I reported the error yesterday.
Version: OmegaT-5.8.0_0_4dd03b43
Platform: Windows 10 10.0
Java: 1.8.0_351 amd64
Memory: 309MiB total / 237MiB free / 3593MiB max
unfortunately, the error is still there (this time I tried both the Sun JRE and the OpenJDK JRE)
Version: OmegaT-5.8.0_0_aae087c2
Platform: Windows 10 10.0
Java: 17.0.4.1 amd64
Memory: 87MiB total / 19MiB free / 2028MiB max
everything working fine now, both the systems at home and those in the company!
Last edit: DerRuhri 2023-01-17
released 6.0