Menu

#1124 Local project does not update after remote masking some files

5.8
closed-fixed
5
2023-09-27
2022-10-20
msoutopico
No

Preconditions

A team project including two repository to two folders mapped to the source folder.

<repository type="git" url="https://github.com/&ORG;/CommonFiles.git">
    <mapping local="source/batch1" repository="source/batch1" />
    <mapping local="source/batch2" repository="source/batch2" />
</repository>

Full example here.

Steps to reproduce

  1. User downloads initial project.
  2. Team admin removes the mapping batch1 folder from the settings of the project and masks it (see below, full example here), and pushes the new omegat.project file to the repo. User reloads the project (e.g. pressing F5).
<source_dir_excludes>
    <mask>batch1/**</mask>
</source_dir_excludes>
<!-- ... -->
<repository type="git" url="https://github.com/&ORG;/CommonFiles.git">
    <!-- <mapping local="source/batch1" repository="source/batch1" /> -->
    <mapping local="source/batch2" repository="source/batch2" />
</repository>

Expected results

  1. Project downloads fine and files from both folders show up in the editor or project files window.
  2. The new settings are downloaded and applied: folder bacht1 is still in the source folder but is not loaded in the project. Only files from folder batch2 are visible for translation.

Actual results

  1. As expected
  2. The new settings are not downloaded, files from the batch1 still appear in the editor and the project files dialog, and the log shows the following error:
31398: Info: Click on 'projectReloadMenuItem' menu item (LOG_MENU_CLICK)
31398: Info: Project saving start (LOG_DATAENGINE_SAVE_START)
31398: FINE: Disable autosave 
31398: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED)
31398: FINER: Time for find matches: 3 
31398: FINEST: Issue detection took 0.001 s 
31398: Info: No need to save project, because no changes were made (LOG_DATAENGINE_SAVE_NONEED)
31398: Info: Start rebase (TEAM_REBASE_START)
31398: FINE: Rebase and commit 'omegat/project_save.tmx' 
31398: FINE: GIT switchToVersion 7bbacbb03a71ff9726c2923fe679b32d1e83c6f4  
31398: FINE: local file 'omegat/project_save.tmx' wasn't changed 
31398: FINE: GIT switchToVersion origin/master  
31398: FINE: remote file 'omegat/project_save.tmx' was changed 
31398: Info: Reading TMX file /home/souto/Work/rec_omt/.repositories/https_github.com_capstanlqc_pisa_pisa_t1_t2_rec_3omt_repo.git/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINE: only remote changes - get remote 'omegat/project_save.tmx' 
31398: Info: Reading TMX file /home/souto/Work/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINE: Rebase and commit 'glossary/glossary.txt' 
31398: FINE: GIT switchToVersion 7bbacbb03a71ff9726c2923fe679b32d1e83c6f4  
31398: FINE: local file 'glossary/glossary.txt' wasn't changed 
31398: FINE: GIT switchToVersion origin/master  
31398: FINE: remote file 'glossary/glossary.txt' was changed 
31398: FINE: only remote changes - get remote 'glossary/glossary.txt' 
31398: Info: End rebase (TEAM_REBASE_END)
31398: FINE: Enable autosave 
31398: Info: Project saving end (LOG_DATAENGINE_SAVE_END)
31398: FINE: Disable autosave 
31398: Info: Project closed (LOG_DATAENGINE_CLOSE)
31398: FINE: Disable autosave 
31398: Info: Event: project change - "SAVE" (LOG_INFO_EVENT_PROJECT_CHANGE)
31398: Info: Event: project change - "CLOSE" (LOG_INFO_EVENT_PROJECT_CHANGE)
31398: Info: Source tokenizer: org.omegat.tokenizer.LuceneEnglishTokenizer 
31398: Info: Target tokenizer: org.omegat.tokenizer.LuceneFrenchTokenizer 
31398: Info: Project loading start (LOG_DATAENGINE_LOAD_START)
31398: Info: This is not PISA, let's stop here. Good bye! 
31398: Error: An error occurred 
31398: Error: java.util.concurrent.ExecutionException: javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property 'projectName' on null object 
31398: Error:   at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
31398: Error:   at java.util.concurrent.FutureTask.get(FutureTask.java:192) 
31398: Error:   at javax.swing.SwingWorker.get(SwingWorker.java:602) 
31398: Error:   at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.done(ScriptingWindow.java:564) 
31398: Error:   at javax.swing.SwingWorker$5.run(SwingWorker.java:737) 
31398: Error:   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) 
31398: Error:   at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) 
31398: Error:   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) 
31398: Error:   at javax.swing.Timer.fireActionPerformed(Timer.java:313) 
31398: Error:   at javax.swing.Timer$DoPostEvent.run(Timer.java:245) 
31398: Error:   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) 
31398: Error:   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) 
31398: Error:   at java.awt.EventQueue.access$500(EventQueue.java:97) 
31398: Error:   at java.awt.EventQueue$3.run(EventQueue.java:709) 
31398: Error:   at java.awt.EventQueue$3.run(EventQueue.java:703) 
31398: Error:   at java.security.AccessController.doPrivileged(Native Method) 
31398: Error:   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) 
31398: Error:   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) 
31398: Error:   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) 
31398: Error:   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
31398: Error:   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) 
31398: Error:   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 
31398: Error:   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) 
31398: Error:   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 
31398: Error: Caused by: javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property 'projectName' on null object 
31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) 
31398: Error:   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) 
31398: Error:   at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:169) 
31398: Error:   at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:133) 
31398: Error:   at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:558) 
31398: Error:   at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:542) 
31398: Error:   at javax.swing.SwingWorker$1.call(SwingWorker.java:295) 
31398: Error:   at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
31398: Error:   at javax.swing.SwingWorker.run(SwingWorker.java:334) 
31398: Error:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
31398: Error:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
31398: Error:   at java.lang.Thread.run(Thread.java:748) 
31398: Error: Caused by: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property 'projectName' on null object 
31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) 
31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) 
31398: Error:   ... 11 more 
31398: Error: Caused by: java.lang.NullPointerException: Cannot get property 'projectName' on null object 
31398: Error:   at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) 
31398: Error:   at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194) 
31398: Error:   at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46) 
31398: Error:   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329) 
31398: Error:   at Script5.run(Script5.groovy:14) 
31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) 
31398: Error:   ... 12 more 
31398: Info: done (147 ms elapsed) 
31398: FINE: GIT switchToVersion origin/master  
31398: FINE: GIT switchToVersion origin/master  
31398: Info: Reading TMX file /home/souto/Work/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: Info: Omtv= 5.7.1 flag2_5=true flag3_plus=true 
31398: Info: Loading: '/home/souto/Work/rec_omt/source/ldw_batch1/i18next_sample.json' with okf_json@pisa25 
31398: Info: Omtv= 5.7.1 flag2_5=true flag3_plus=true 
31398: Info: Loading: '/home/souto/Work/rec_omt/source/maths_batch1/item1.xml' with okf_xml@pisa25 
31398: Info: Load project source files: 95ms 
31398: Info: Start rebase (TEAM_REBASE_START)
31398: FINE: Rebase and commit 'omegat/project_save.tmx' 
31398: FINE: GIT switchToVersion 7885a48a29ba378a0bdbb87b4e9b9a3c5a6c6ce6  
31398: FINE: local file 'omegat/project_save.tmx' wasn't changed 
31398: FINE: GIT switchToVersion origin/master  
31398: FINE: remote file 'omegat/project_save.tmx' wasn't changed 
31398: FINE: there are no changes 'omegat/project_save.tmx' 
31398: Info: Reading TMX file /home/souto/Work/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINE: Rebase and commit 'glossary/glossary.txt' 
31398: FINE: GIT switchToVersion 7885a48a29ba378a0bdbb87b4e9b9a3c5a6c6ce6  
31398: FINE: local file 'glossary/glossary.txt' wasn't changed 
31398: FINE: GIT switchToVersion origin/master  
31398: FINE: remote file 'glossary/glossary.txt' wasn't changed 
31398: FINE: there are no changes 'glossary/glossary.txt' 
31398: Info: End rebase (TEAM_REBASE_END)
31398: FINER: File '/home/souto/Work/rec_omt/tm/rec/t02.tmx' added 
31398: Info: Reading TMX file /home/souto/Work/rec_omt/tm/rec/t02.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.1_0_c3206253 (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINER: File '/home/souto/Work/rec_omt/tm/rec/t01.tmx' added 
31398: Info: Reading TMX file /home/souto/Work/rec_omt/tm/rec/t01.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.1_0_c3206253 (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: Info: Project loading end (LOG_DATAENGINE_LOAD_END)
31398: FINE: Enable autosave 
31398: Info: Event: project change - "LOAD" (LOG_INFO_EVENT_PROJECT_CHANGE)
31398: Info: Extra notes : /notes directory not found for this project 
31398: Info: Selected LanguageTool source language: en 
31398: Info: Selected LanguageTool target language: fr 
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt#oldbased_on_f43602a27bf4f22de2084f9be54cb7657b9eef85' added 
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt' added 
31398: Info: Loading glossary glossary.txt (CT_LOADING_GLOSSARY)
31398: Info: Added 0 glossary entries from glossary.txt (CT_LOADING_GLOSSARY_DETAILS)
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt#oldbased_on_0a4b1cbccd66e723ad598326435e15ba1b8ac109' added 
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt#oldbased_on_7bbacbb03a71ff9726c2923fe679b32d1e83c6f4' added 
31398: Info: No spell checker found for language fr-ZZ 
31398: FINE: Jumping to last entry #1. 
31398: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED)
31398: FINER: Time for find matches: 5 
31398: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED)
31398: FINER: Time for find matches: 1 
31398: Info: This is not PISA, let's stop here. Good bye! 
31398: Info: done (93 ms elapsed) 
31398: FINEST: Issue detection took 0.001 s 

Comments

The expected results are the case when the user closes the project and re-opens it.

Discussion

  • msoutopico

    msoutopico - 2022-10-20

    I forgot to add support info:

    Version: OmegaT-5.7.1_0_c3206253
    Platform: Linux 6.0.2-arch1-1
    Java: 1.8.0_312 amd64
    Memory: 323MiB total / 59MiB free / 3520MiB max

    Also reproduced on Windows 10 with version 5.7.0.

     
    • Hiroshi Miura

      Hiroshi Miura - 2022-10-21

      A error Exception is not related to team feature. Please ask Script author "PISA"?
      Team and mapping feature has already changed on OmegaT 5.8 Nightly.

       
      • msoutopico

        msoutopico - 2022-10-21

        Thanks, Hiroshi. Indeed, the error seems related to my script. However, the actual results yet do not match the expected results. The project is not updated until it's closed and re-opened.

         
  • Kos Ivantsov

    Kos Ivantsov - 2022-10-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -78,55 +78,55 @@
     31398: Info: This is not PISA, let&#39;s stop here. Good bye! 
     31398: Error: An error occurred 
     31398: Error: java.util.concurrent.ExecutionException: javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property &#39;projectName&#39; on null object 
    -31398: Error:  at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
    -31398: Error:  at java.util.concurrent.FutureTask.get(FutureTask.java:192) 
    -31398: Error:  at javax.swing.SwingWorker.get(SwingWorker.java:602) 
    -31398: Error:  at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.done(ScriptingWindow.java:564) 
    -31398: Error:  at javax.swing.SwingWorker$5.run(SwingWorker.java:737) 
    -31398: Error:  at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) 
    -31398: Error:  at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) 
    -31398: Error:  at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) 
    -31398: Error:  at javax.swing.Timer.fireActionPerformed(Timer.java:313) 
    -31398: Error:  at javax.swing.Timer$DoPostEvent.run(Timer.java:245) 
    -31398: Error:  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) 
    -31398: Error:  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) 
    -31398: Error:  at java.awt.EventQueue.access$500(EventQueue.java:97) 
    -31398: Error:  at java.awt.EventQueue$3.run(EventQueue.java:709) 
    -31398: Error:  at java.awt.EventQueue$3.run(EventQueue.java:703) 
    -31398: Error:  at java.security.AccessController.doPrivileged(Native Method) 
    -31398: Error:  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) 
    -31398: Error:  at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) 
    -31398: Error:  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) 
    -31398: Error:  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
    -31398: Error:  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) 
    -31398: Error:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 
    -31398: Error:  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) 
    -31398: Error:  at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 
    +31398: Error:   at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
    +31398: Error:   at java.util.concurrent.FutureTask.get(FutureTask.java:192) 
    +31398: Error:   at javax.swing.SwingWorker.get(SwingWorker.java:602) 
    +31398: Error:   at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.done(ScriptingWindow.java:564) 
    +31398: Error:   at javax.swing.SwingWorker$5.run(SwingWorker.java:737) 
    +31398: Error:   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) 
    +31398: Error:   at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) 
    +31398: Error:   at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) 
    +31398: Error:   at javax.swing.Timer.fireActionPerformed(Timer.java:313) 
    +31398: Error:   at javax.swing.Timer$DoPostEvent.run(Timer.java:245) 
    +31398: Error:   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) 
    +31398: Error:   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) 
    +31398: Error:   at java.awt.EventQueue.access$500(EventQueue.java:97) 
    +31398: Error:   at java.awt.EventQueue$3.run(EventQueue.java:709) 
    +31398: Error:   at java.awt.EventQueue$3.run(EventQueue.java:703) 
    +31398: Error:   at java.security.AccessController.doPrivileged(Native Method) 
    +31398: Error:   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) 
    +31398: Error:   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) 
    +31398: Error:   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) 
    +31398: Error:   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
    +31398: Error:   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) 
    +31398: Error:   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 
    +31398: Error:   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) 
    +31398: Error:   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 
     31398: Error: Caused by: javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property &#39;projectName&#39; on null object 
    -31398: Error:  at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) 
    -31398: Error:  at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) 
    -31398: Error:  at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:169) 
    -31398: Error:  at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:133) 
    -31398: Error:  at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:558) 
    -31398: Error:  at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:542) 
    -31398: Error:  at javax.swing.SwingWorker$1.call(SwingWorker.java:295) 
    -31398: Error:  at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    -31398: Error:  at javax.swing.SwingWorker.run(SwingWorker.java:334) 
    -31398: Error:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
    -31398: Error:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
    -31398: Error:  at java.lang.Thread.run(Thread.java:748) 
    +31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) 
    +31398: Error:   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) 
    +31398: Error:   at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:169) 
    +31398: Error:   at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:133) 
    +31398: Error:   at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:558) 
    +31398: Error:   at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:542) 
    +31398: Error:   at javax.swing.SwingWorker$1.call(SwingWorker.java:295) 
    +31398: Error:   at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    +31398: Error:   at javax.swing.SwingWorker.run(SwingWorker.java:334) 
    +31398: Error:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
    +31398: Error:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
    +31398: Error:   at java.lang.Thread.run(Thread.java:748) 
     31398: Error: Caused by: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property &#39;projectName&#39; on null object 
    -31398: Error:  at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) 
    -31398: Error:  at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) 
    -31398: Error:  ... 11 more 
    +31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) 
    +31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) 
    +31398: Error:   ... 11 more 
     31398: Error: Caused by: java.lang.NullPointerException: Cannot get property &#39;projectName&#39; on null object 
    -31398: Error:  at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) 
    -31398: Error:  at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194) 
    -31398: Error:  at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46) 
    -31398: Error:  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329) 
    -31398: Error:  at Script5.run(Script5.groovy:14) 
    -31398: Error:  at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) 
    -31398: Error:  ... 12 more 
    +31398: Error:   at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) 
    +31398: Error:   at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194) 
    +31398: Error:   at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46) 
    +31398: Error:   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329) 
    +31398: Error:   at Script5.run(Script5.groovy:14) 
    +31398: Error:   at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) 
    +31398: Error:   ... 12 more 
     31398: Info: done (147 ms elapsed) 
     31398: FINE: GIT switchToVersion origin/master  
     31398: FINE: GIT switchToVersion origin/master  
    
     
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-27

    In log file

    31398: Info: Loading: '/home/souto/Work/rec_omt/source/ldw_batch1/i18next_sample.json' with okf_json@pisa25 
    31398: Info: Omtv= 5.7.1 flag2_5=true flag3_plus=true 
    31398: Info: Loading: '/home/souto/Work/rec_omt/source/maths_batch1/item1.xml' with okf_xml@pisa25 
    31398: Info: Load project source files: 95ms 
    

    There are files named; ldw_batch1/.. and maths_batch1/.. that is not match with mask batch1/**, and there is no log message for batch1/ files.

    It is different with the claim.

     
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-28

    From observation of reproduce procedure, when "reload(F5)" OmegaT DOES NOT download omegat.project file. When close and open team project it works as expected.

     
    • Hiroshi Miura

      Hiroshi Miura - 2022-10-28

      A reload logic is in ProjectUICommands class in L711- L756 like as follows

       public static void projectReload() {
              UIThreadsUtil.mustBeSwingThread();
      
              if (!Core.getProject().isProjectLoaded()) {
                  return;
              }
      
              // commit the current entry first
              Core.getEditor().commitAndLeave();
      
              final ProjectProperties props = Core.getProject().getProjectProperties();
      
              new SwingWorker<Void, Void>() {
                  final int previousCurEntryNum = Core.getEditor().getCurrentEntryNumber();
      
                  protected Void doInBackground() throws Exception {
                      IMainWindow mainWindow = Core.getMainWindow();
                      Cursor hourglassCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
                      Cursor oldCursor = mainWindow.getCursor();
                      mainWindow.setCursor(hourglassCursor);
      
                      Core.executeExclusively(true, () -> {
                          Core.getProject().saveProject(true);
                          ProjectFactory.closeProject();
      
                          ProjectFactory.loadProject(props, true);
                      });
      

      A core point is near a last line.
      ProjectFactory.loadProject(props, true);

      On there props is a content of LOCAL omegat.project, not Remote one because there is no download function between closeProject() and loadProject().

       
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-28

    Start working to fix the issue
    https://github.com/omegat-org/omegat/pull/303

     
    • Hiroshi Miura

      Hiroshi Miura - 2022-10-29

      When forcing download and reload project, it costs heavy work and significantly slow down the reload process. Is it an intended behavior for the issuer?

      It may not be a good idea to change "reload local files" feature. Isn't it?

       
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-28
    • assigned_to: Hiroshi Miura
     
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-29

    Enhancement is proposed. It add new menu item Project-> Reload team project
    https://github.com/omegat-org/omegat/pull/304

     
    👍
    1
  • Hiroshi Miura

    Hiroshi Miura - 2022-11-27
    • status: open --> open-fixed
     
  • Hiroshi Miura

    Hiroshi Miura - 2022-11-27

    The change is merged.

     
  • 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.