Menu

#1280 Uncaught exception in weekly build (2025-01-18)

6.1
open-fixed
None
5
2025-04-27
2025-01-25
khagaroth
No

Hi, while testing windows weekly builds I bumped into a repeatedly occurring bug. It happens pretty much randomly, but most of the time, it happens after a search. Once it happens, cursor hovering over the editor pane will permanently display busy animation and if I try to edit the translation, it is switched from LTR to RTL mode. If I launch from command line, this error is displayed once I hit the bug:

10:47:52.658: Error: Uncatched exception in thread [AWT-EventQueue-0]
10:47:52.659: Error: java.lang.NullPointerException
10:47:52.659: Error:    at org.omegat.gui.editor.Document3.getTranslationStart(Document3.java:126)
10:47:52.659: Error:    at org.omegat.gui.editor.EditorTextArea3.isInActiveTranslation(EditorTextArea3.java:240)
10:47:52.659: Error:    at org.omegat.gui.editor.EditorTextArea3.lambda$new$0(EditorTextArea3.java:179)
10:47:52.659: Error:    at java.desktop/javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:412)
10:47:52.659: Error:    at java.desktop/javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:4489)
10:47:52.659: Error:    at java.desktop/javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(JTextComponent.java:4511)
10:47:52.659: Error:    at java.desktop/javax.swing.text.DefaultCaret.fireStateChanged(DefaultCaret.java:812)
10:47:52.659: Error:    at java.desktop/javax.swing.text.DefaultCaret.changeCaretPosition(DefaultCaret.java:1283)
10:47:52.659: Error:    at java.desktop/javax.swing.text.DefaultCaret.handleSetDot(DefaultCaret.java:1182)
10:47:52.659: Error:    at java.desktop/javax.swing.text.DefaultCaret.setDot(DefaultCaret.java:1163)
10:47:52.659: Error:    at java.desktop/javax.swing.text.DefaultCaret.setDot(DefaultCaret.java:1060)
10:47:52.659: Error:    at java.desktop/javax.swing.text.DefaultCaret$Handler.propertyChange(DefaultCaret.java:1883)
10:47:52.659: Error:    at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
10:47:52.659: Error:    at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
10:47:52.659: Error:    at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
10:47:52.659: Error:    at java.desktop/java.awt.Component.firePropertyChange(Component.java:8731)
10:47:52.659: Error:    at java.desktop/javax.swing.text.JTextComponent.setDocument(JTextComponent.java:456)
10:47:52.659: Error:    at org.omegat.gui.editor.EditorController.loadDocument(EditorController.java:714)
10:47:52.659: Error:    at org.omegat.gui.editor.EditorController.activateEntry(EditorController.java:798)
10:47:52.659: Error:    at org.omegat.gui.editor.EditorController.gotoEntry(EditorController.java:1542)
10:47:52.659: Error:    at org.omegat.gui.editor.EditorController.gotoEntry(EditorController.java:1494)
10:47:52.659: Error:    at org.omegat.gui.search.EntryListPane$DisplayedEntryImpl.lambda$gotoEntryInEditor$0(EntryListPane.java:614)
10:47:52.659: Error:    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
10:47:52.659: Error:    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
10:47:52.659: Error:    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
10:47:52.659: Error:    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
10:47:52.659: Error:    at java.base/java.security.AccessController.doPrivileged(Native Method)
10:47:52.659: Error:    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
10:47:52.659: Error:    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
10:47:52.659: Error:    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
10:47:52.659: Error:    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
10:47:52.659: Error:    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
10:47:52.659: Error:    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
10:47:52.659: Error:    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
10:47:52.659: Error:    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Windows weekly build (2025-01-18, but happened in several previous builds as well), Windows 10, Adoptium Java 11.0.25.9.

Discussion

  • Hiroshi Miura

    Hiroshi Miura - 2025-01-25

    It is very strange and is hard to reproduce.
    Could you give us a whole log of the session, which can be got from Help > Log > Save.
    The log you post is one where long after the problem may be happened.

     
    • khagaroth

      khagaroth - 2025-01-25

      Attached full log, but there doesn't seem to be any other useful info. Btw. before producing the log, I reinstalled OmegaT and installed newer version of Adoptium Java 11.0.26.4.

      I reproduced it by searching for a frequent term and then quickly switching between search results.

       
      • Hiroshi Miura

        Hiroshi Miura - 2025-01-26

        Thank you for providing the log. It might be perfect if you describe all the procedure for other person to reproduce the bug with a sample minimum project files. It is also important that the Operating System you use, and strict java version etc.

        You are encouraged to use Help > About > Copy support information to clipborad then paste it here.

        Now, this is important place in the full log.

        15:38:56.332: Info: Selected LanguageTool source language: en (LANGUAGE_TOOL_SOURCE) 
        15:38:56.332: Info: Selected LanguageTool target language:  (LANGUAGE_TOOL_TARGET) 
        15:38:56.441: Info: Loading glossary MicrosoftTermCollection-cs-CZ.tbx (CT_LOADING_GLOSSARY) 
        15:38:57.103: Info: The optimized code generation is disabled 
        15:38:58.353: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED) 
        15:38:59.959: Info: Initialized Hunspell spellchecker for language 'cs' dictionary C:\Program Files (x86)\OmegaT\spellcheck\cs.dic (SPELLCHECKER_HUNSPELL_INITIALIZED) 
        15:39:00.270: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED) 
        15:39:01.201: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED) 
        15:39:01.604: Info: Added 48,769 glossary entries from MicrosoftTermCollection-cs-CZ.tbx (CT_LOADING_GLOSSARY_DETAILS) 
        15:39:06.306: Info: Click on 'editFindInProjectMenuItem' menu item (LOG_MENU_CLICK) 
        15:39:10.279: Error: Uncatched exception in thread [AWT-EventQueue-0] 
        

        Your taget language is empty. This is wrong status for the project. Please check your OmegaT project configuration Project > Properties > Translated files Language is configured properly such as fr

        The log tell us what operation was executed just before the problem.
        LOG_INFO_EVENT_ENTRY_ACTIVATED tell me the user operated a chaneg of entry on the editor in 10 seconds before the exception. Then Click menu LOG_MENU_CLICK 4 second before the exception.
        And 6 second after the first exception the user operate to switch the entry.

        15:39:16.818: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED) 
        

        This log tell us, the problem might be caused by the menu operation or operation on the search dialog, but the editor pane operation. The editor operation cause 2nd NPE.

         
  • khagaroth

    khagaroth - 2025-01-26

    It is also important that the Operating System you use, and strict java version etc.

    This info was already at the end of the first post and I mentioned updating java to a newer version in the post with complete log. Just checked the about dialog and the only additional info there is memory info and bitness, which in my case is 64 bit, on the other hand it is missing info on which java variant is used.

    Your taget language is empty.

    No, its properly set, both in the properties dialog and the project file on disk. Source is set to 'en' and target to 'cs'. Don't know why it doesn't show in the log.

    I will try to find a way to reproduce it reliably, but it happens quite randomly, sometimes it happens on the first search right after launch and other times it could take dozens of minutes and hundreds of UI interactions before it bugs out.

     
  • DiGro

    DiGro - 2025-02-03

    I encounter the same behaviour since a while.
    If I start a project it wil function normally. As soon as I go to Edit > Search and make a search, which will complete and gives me the results, the cursor stays in Search pane.
    Clicking the searched item I want, Editor pane moves to searched item. Cursor stays in Search pane
    Only way to move cursor is to click in Editor pane.
    Trying to adapt the searched item I notice that editing mode is LTR instead of RTL.
    No noticable way to change it back to RTL, so have to close fully.
    After that, and starting again, all is well until I hit Edit > Search, make search .......
    As a side note:
    I added updated file to Sourcefiles. Pop-up asks me to Replace or Cancel. Click Replace.
    Seems to work, but cursor will not move to added file, Stays in file it was. Don't know if that is the wanted behaviour. Also noticed that the pop-up stays on my dekstop and I can't acces it in any way.
    T make it go away I have to close OmegaT fully

    Then again, don't know if the last has anything to do with the former.

    Version: OmegaT-6.1.0_0_153d7fe
    Platform: Windows 11 10.0
    Java: 17.0.11 amd64
    Memory: 484MiB total / 90MiB free / 3072MiB max

     
  • DiGro

    DiGro - 2025-02-03

    Just to be clear: this happens every time I use Search and want to adapt one of the found items

     
  • DiGro

    DiGro - 2025-02-03

    Please accept my apologies. I attached the wrong logfile (well it has the same error, but it wasn't the one I tried to send)

     
  • khagaroth

    khagaroth - 2025-02-23

    So, in the end I didn't figure out a way to reproduce this reliably, but doing a search will hit the bug sooner or later. In any case the exception happens because "activeTranslationBeginM1" always randomly ends up being null.

     
  • Philippe

    Philippe - 2025-03-22

    Strangely, I've only gotten a dialog box with an error on my work system (Windows 11, either Professional or Enterprise).

    On my Linux and personal Windows 11 (Home) system, I don't get an error message, but the error does come up in the log.

    I haven't gotten the same type of errors Jean-Christophe did, but I did get characters getting inserted to the left of the previous character (so I get "ehT" if I try to type "The") the first time I start OmegaT. This problem usually fixes itself if I close OmegaT and start it again, but comes back the next time I close and relaunch the program.

    When I tried the branch for PR1294, the problem of the characters getting typed to the left seems to be fixed. However, I still see a java.lang.NullPointerException error in the log, but it's a shorter list of errors. (I won't have a chance to try this branch on my work computer until Monday at the earliest. I'll report on whether I still get an error dialog then.)

    In the meantime, I'm attaching the two different error logs I get from the master and PR1297 branches. I hope they prove useful.

     
  • Hiroshi Miura

    Hiroshi Miura - 2025-04-27
    • status: open --> open-fixed
    • assigned_to: Hiroshi Miura
     
  • Hiroshi Miura

    Hiroshi Miura - 2025-04-27

    The PR is merged.

     

Log in to post a comment.

MongoDB Logo MongoDB