Menu

#1136 Error displayed when opening a project on Windows 10

5.8
closed-fixed
None
5
2023-09-27
2023-01-11
No

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 

Related

Bugs: #1166
Commit: [1dc7a4]

Discussion

  • DerRuhri

    DerRuhri - 2023-01-12

    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)

    Projektdatei kann nicht gelesen werden!
    java.util.concurrent.ExecutionException: java.lang.RuntimeException:java.nio.file.FileSystemException: C:\Users\dirk\OmegaT\DE-EN\omegat.project.bak: Der Prozess kann nicht auf die Datei zugreifen, da ein anderer Prozess einen Teil der Datei gesperrt hat.

    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

     
  • Hiroshi Miura

    Hiroshi Miura - 2023-01-12

    @t_cordonnier What's your ideas?

     
  • Briac Pilpré

    Briac Pilpré - 2023-01-13

    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 to projectOpenImpl (line 616)

     
  • DerRuhri

    DerRuhri - 2023-01-13

    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

     
  • DerRuhri

    DerRuhri - 2023-01-14

    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

     
  • DerRuhri

    DerRuhri - 2023-01-17

    everything working fine now, both the systems at home and those in the company!

     

    Last edit: DerRuhri 2023-01-17
  • Hiroshi Miura

    Hiroshi Miura - 2023-01-18
    • status: open --> open-fixed
    • assigned_to: Hiroshi Miura
     
  • Hiroshi Miura

    Hiroshi Miura - 2023-01-18
     
  • Hiroshi Miura

    Hiroshi Miura - 2023-09-27
    • status: open-fixed --> closed-fixed
     
  • Hiroshi Miura

    Hiroshi Miura - 2023-09-27

    released 6.0

     

Log in to post a comment.