You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a GUI-specific issue within the Trainable Weka Segmentation (TWS) plugin in Fiji that leads to a loss of functionality and an ArrayIndexOutOfBoundsException error. This problem arises when using the standard Fiji keyboard shortcut for scrolling (spacebar + mouse click-and-drag) within a zoomed-in image in the TWS window, when a classifier has just been added and is still selected (indicated by a faint blue outline around the classifier box - see Image 1).
If the spacebar is pressed and an attempt is made to click and drag anywhere in the TWS window while the classifier box is still selected, it triggers a console window displaying the below exception (see Image 2). Subsequently, any attempt to interact with the TWS window using the mouse (clicking on any UI elements) continues to open the console window with the same error, effectively hindering any further additions to Classes and training of the model.
Expected Behavior
The scrolling tool activated by the spacebar should allow for navigation around the zoomed-in image without affecting the functionality of other TWS window elements or triggering exceptions.
Steps to Reproduce
Open an image in the TWS window and zoom in using Fiji Magnifying Glass tool.
Add a classifier, and click a "Add to Class" ensuring the classifier box button appears selected (faint blue outline).
Without clicking elsewhere to deselect the classifier box, press the spacebar and attempt to click and drag with the mouse to view a different part of the image.
Console box will appear with error. Close this and then attempt to draw on the image using Freehand tool or similar - Console box will reappear.
Image 1 - Example of 'Add To Class' button still selected with blue outline
Image 2 - Example of Console window that appears with error
Temporary Workaround
Before using the spacebar + click-and-drag method to scroll, click on another UI element in the TWS window (such as the boxes beneath the 'Add to Class' buttons) to ensure the 'Add to Class' box is deselected. This sequence of actions prevents the error from occurring.
System Information
I've tested this on two systems with different OSs and functionality is the same:
System 1:
Apple M1 Max - Sonoma 14.3.1
Fiji/ImageJ2 version: 2.14.0/1.54f
Trainable Weka Segmentation v3.3.4
Allocated RAM: 32Gb
System 2:
Windows 10 - Version 22H2
Fiji/ImageJ1 version: 1.54f
Trainable Weka Segmentation v3.3.4
Allocated RAM: 12Gb
Error Message
WARNING: core mtj jar files are not available as resources to this classloader (sun.misc.Launcher$AppClassLoader@764c12b6)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
ij.gui.Roi.convertLineToArea(Roi.java:2754)
ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
ij.gui.ImageCanvas.update(ImageCanvas.java:209)
sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
sun.awt.RepaintArea.paint(RepaintArea.java:232)
sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
java.awt.Component.dispatchEventImpl(Component.java:4965)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
at ij.gui.Roi.convertLineToArea(Roi.java:2754)
at ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
at trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
at fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
at trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
at ij.gui.ImageCanvas.update(ImageCanvas.java:209)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
at sun.awt.RepaintArea.paint(RepaintArea.java:232)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
ij.gui.Roi.convertLineToArea(Roi.java:2754)
ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
ij.gui.ImageCanvas.update(ImageCanvas.java:209)
sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
sun.awt.RepaintArea.paint(RepaintArea.java:232)
sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
java.awt.Component.dispatchEventImpl(Component.java:4965)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
at ij.gui.Roi.convertLineToArea(Roi.java:2754)
at ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
at trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
at fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
at trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
at ij.gui.ImageCanvas.update(ImageCanvas.java:209)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
at sun.awt.RepaintArea.paint(RepaintArea.java:232)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
ij.gui.Roi.convertLineToArea(Roi.java:2754)
ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
ij.gui.ImageCanvas.update(ImageCanvas.java:209)
sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
sun.awt.RepaintArea.paint(RepaintArea.java:232)
sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
java.awt.Component.dispatchEventImpl(Component.java:4965)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
at ij.gui.Roi.convertLineToArea(Roi.java:2754)
at ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
at trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
at fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
at trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
at ij.gui.ImageCanvas.update(ImageCanvas.java:209)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
at sun.awt.RepaintArea.paint(RepaintArea.java:232)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
ij.gui.Roi.convertLineToArea(Roi.java:2754)
ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
ij.gui.ImageCanvas.update(ImageCanvas.java:209)
sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
sun.awt.RepaintArea.paint(RepaintArea.java:232)
sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
java.awt.Component.dispatchEventImpl(Component.java:4965)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
at ij.gui.Roi.convertLineToArea(Roi.java:2754)
at ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
at trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
at fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
at trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
at ij.gui.ImageCanvas.update(ImageCanvas.java:209)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
at sun.awt.RepaintArea.paint(RepaintArea.java:232)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
ij.gui.Roi.convertLineToArea(Roi.java:2754)
ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
ij.gui.ImageCanvas.update(ImageCanvas.java:209)
sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
sun.awt.RepaintArea.paint(RepaintArea.java:232)
sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
java.awt.Component.dispatchEventImpl(Component.java:4965)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
at ij.gui.Roi.convertLineToArea(Roi.java:2754)
at ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
at trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
at fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
at trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
at ij.gui.ImageCanvas.update(ImageCanvas.java:209)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
at sun.awt.RepaintArea.paint(RepaintArea.java:232)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
ij.gui.Roi.convertLineToArea(Roi.java:2754)
ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
ij.gui.ImageCanvas.update(ImageCanvas.java:209)
sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
sun.awt.RepaintArea.paint(RepaintArea.java:232)
sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
java.awt.Component.dispatchEventImpl(Component.java:4965)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
at ij.gui.Roi.convertLineToArea(Roi.java:2754)
at ij.gui.ShapeRoi.roiToShape(ShapeRoi.java:271)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:129)
at ij.gui.ShapeRoi.<init>(ShapeRoi.java:87)
at trainableSegmentation.RoiListOverlay.paint(RoiListOverlay.java:98)
at fiji.util.gui.OverlayedImageCanvas.paint(OverlayedImageCanvas.java:98)
at trainableSegmentation.Weka_Segmentation$CustomCanvas.paint(Weka_Segmentation.java:567)
at ij.gui.ImageCanvas.update(ImageCanvas.java:209)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:255)
at sun.lwawt.LWRepaintArea.updateComponent(LWRepaintArea.java:47)
at sun.awt.RepaintArea.paint(RepaintArea.java:232)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1314)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1198)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
[INFO] Reading available sites from https://imagej.net/
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
The text was updated successfully, but these errors were encountered:
Description of Issue
I've encountered a GUI-specific issue within the Trainable Weka Segmentation (TWS) plugin in Fiji that leads to a loss of functionality and an
ArrayIndexOutOfBoundsException
error. This problem arises when using the standard Fiji keyboard shortcut for scrolling (spacebar + mouse click-and-drag) within a zoomed-in image in the TWS window, when a classifier has just been added and is still selected (indicated by a faint blue outline around the classifier box - see Image 1).If the spacebar is pressed and an attempt is made to click and drag anywhere in the TWS window while the classifier box is still selected, it triggers a console window displaying the below exception (see Image 2). Subsequently, any attempt to interact with the TWS window using the mouse (clicking on any UI elements) continues to open the console window with the same error, effectively hindering any further additions to Classes and training of the model.
Expected Behavior
The scrolling tool activated by the spacebar should allow for navigation around the zoomed-in image without affecting the functionality of other TWS window elements or triggering exceptions.
Steps to Reproduce
Image 1 - Example of 'Add To Class' button still selected with blue outline
Image 2 - Example of Console window that appears with error
Temporary Workaround
Before using the spacebar + click-and-drag method to scroll, click on another UI element in the TWS window (such as the boxes beneath the 'Add to Class' buttons) to ensure the 'Add to Class' box is deselected. This sequence of actions prevents the error from occurring.
System Information
I've tested this on two systems with different OSs and functionality is the same:
System 1:
Apple M1 Max - Sonoma 14.3.1
Fiji/ImageJ2 version: 2.14.0/1.54f
Trainable Weka Segmentation v3.3.4
Allocated RAM: 32Gb
System 2:
Windows 10 - Version 22H2
Fiji/ImageJ1 version: 1.54f
Trainable Weka Segmentation v3.3.4
Allocated RAM: 12Gb
Error Message
The text was updated successfully, but these errors were encountered: