apertium/apertium-viewer

runs amok and gets destroyed

unhammer opened this issue · 6 comments

On trying with apertium-nno-nob and mode nob-nno_e, I see

$ apertium-viewer
sourcedirs AP_SUBDIRS =  ../apertium-nno ../apertium-nob
task probably runned amok, destroying: lt-proc -w -e '/home/kiwibird/src/ap/apertium-nno-nob/nob-nno.automorf.bin'

and then after a few seconds I get

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at apertiumview.Pipeline$PipelineTask.access$000(Pipeline.java:102)
        at apertiumview.Pipeline.queueAsyncProcessing(Pipeline.java:65)
        at apertiumview.TextWidget.setText(TextWidget.java:215)
        at apertiumview.Pipeline$PipelineTask$1.run(Pipeline.java:183)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid location
        at java.desktop/javax.swing.text.JTextComponent.getSelectedText(JTextComponent.java:1784)
        at java.desktop/javax.swing.text.DefaultCaret.updateSystemSelection(DefaultCaret.java:1360)
        at java.desktop/javax.swing.text.DefaultCaret.focusGained(DefaultCaret.java:355)
        at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:228)
        at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:227)
        at java.desktop/java.awt.Component.processFocusEvent(Component.java:6521)
        at java.desktop/java.awt.Component.processEvent(Component.java:6388)
        at java.desktop/java.awt.Container.processEvent(Container.java:2263)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1050)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:674)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid location
        at java.desktop/javax.swing.text.JTextComponent.getSelectedText(JTextComponent.java:1784)
        at java.desktop/javax.swing.text.DefaultCaret.updateSystemSelection(DefaultCaret.java:1360)
        at java.desktop/javax.swing.text.DefaultCaret.focusGained(DefaultCaret.java:355)
        at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:228)
        at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:227)
        at java.desktop/java.awt.Component.processFocusEvent(Component.java:6521)
        at java.desktop/java.awt.Component.processEvent(Component.java:6388)
        at java.desktop/java.awt.Container.processEvent(Container.java:2263)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1050)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:674)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid location
        at java.desktop/javax.swing.text.JTextComponent.getSelectedText(JTextComponent.java:1784)
        at java.desktop/javax.swing.text.DefaultCaret.updateSystemSelection(DefaultCaret.java:1360)
        at java.desktop/javax.swing.text.DefaultCaret.focusGained(DefaultCaret.java:355)
        at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:228)
        at java.desktop/java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:227)
        at java.desktop/java.awt.Component.processFocusEvent(Component.java:6521)
        at java.desktop/java.awt.Component.processEvent(Component.java:6388)
        at java.desktop/java.awt.Container.processEvent(Container.java:2263)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1050)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:674)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Hej Kevin @unhammer , længe siden!
Hvilken Java kører du? Er det Java 8, Java 11 eller Java 13?
Sker det kun med nob-nno_e, eller også med andre sprogpar?

hei :)

Det skjer med dan→swe òg.

Eg har

$ java --version
openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu219.04)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu219.04, mixed mode, sharing)

Men eg ser at viss eg

  1. trykkar C++,
  2. ventar til den Exception-stacktracen kjem i terminalen, og
  3. skriv noko (kva som helst) i input, så kjem det vanleg output.

(viss eg er utålmodig og skriv for tidleg, så får eg mange sånne «task probably runned amok» og må venta lenger)

Se https://github.com/apertium/apertium-viewer/blob/master/src/apertiumview/Pipeline.java#L64
beskeden kommer hvis en proces i modes-pipelinen ikke afslutter indenfor 5 sekunder

Kunne du køre
echo '(dit input)' | lt-proc -w -e '/home/kiwibird/src/ap/apertium-nno-nob/nob-nno.automorf.bin'
på kommandolinjen og se hvad der sker? Tager det mere end 5 sekunder?

Kan du linke til modes.xml så jeg kan se pipelinen? (er det https://github.com/apertium/apertium-nno-nob/blob/master/modes.xml#L6 ?)

Det ville være godt om jeg kunne se det ske på min maskine.

Du siger det også sker med dan→swe ?
Sker det for alle sprogpar og retninger du prøver, eller kun nogle specifikke af dem?

Kan du sige noget om hvornår det begyndte at ske?
Er det et nyt problem, som måske skyldes en ny version af C++ bibliotekerne, eller tror du problemet altid har være der?
Sker det også på andre computere?

$ time echo '(dit input)' | lt-proc -w -e '/home/kiwibird/src/ap/apertium-nno-nob/nob-nno.automorf.bin'
^(/(<lpar>$^dit/dit<pr>$ ^input/input<n><m><sg><ind>/input<n><m><sg><ind>$^)/)<rpar>$

real    0m0,097s
user    0m0,079s
sys     0m0,012s

Det er https://github.com/apertium/apertium-nno-nob/blob/master/modes.xml#L6 , ja.

Det skjer på alt eg prøver, men berre første gongen etter oppstart. Etter at eg har venta på stacktracen éin gong, så går det fint å bytta språkpar. Så det er jo godt :)
(Når eg bytta til swe→dan og så avslutta og starta opp igjen slik at swe→dan var valt ved oppstart, så stod det task probably runned amok, destroying: lt-proc -w -e '/home/kiwibird/src/ap/apertium-swe-dan/swe-dan.automorf.bin'.)

Sånn ser det ut før eg byttar til C++ på swe-dan, veit ikkje om det er relevant:
viewer2

Det er ein stund sidan sist eg brukte apertium-viewer, så eg veit ikkje når det starta.

Eg har ikkje fått prøvd andre maskinar enno.

Men det at det fungerer etter første timeout gjer at det verkar som C++-biblioteka faktisk fungerer – derimot har eg ikkje fått java-versjonen til å fungera. Kan det vera fordi mode-en bruker ting som ikkje er implementert i java-versjonen?

Looks fixed in 2.5.5 =D