autoplot / python

bridge from python, using jpype
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

sequence for NPE createGUI #5

Open jbfaden opened 4 years ago

jbfaden commented 4 years ago
from autoplot import *
org= javaaddpath('https://ci-pw.physics.uiowa.edu/job/autoplot-release/lastSuccessfulBuild/artifact/autoplot/Autoplot/dist/autoplot.jar',jdwpPort=12345)
applot( [1,2,3,4,5,6,7] )
sc=org.autoplot.ScriptContext
sc.createGui()

java.lang.reflect.InvocationTargetException at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1367) at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1342) at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480) at org.autoplot.ScriptContext.maybeInitView(ScriptContext.java:422) at org.autoplot.ScriptContext.createGui(ScriptContext.java:1407) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 37 out of bounds for length 37 at org.das2.event.DasMouseInputAdapter.removeMenuItem(DasMouseInputAdapter.java:1282) at org.autoplot.GuiSupport.addPlotContextMenuItems(GuiSupport.java:2086) at org.autoplot.AutoplotUI$31.propertyChange(AutoplotUI.java:1001) at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341) at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333) at org.autoplot.dom.DebugPropertyChangeSupport.firePropertyChange(DebugPropertyChangeSupport.java:132) at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266) at org.autoplot.dom.ApplicationController.addDas2PeerChangeListener(ApplicationController.java:222) at org.autoplot.AutoplotUI.(AutoplotUI.java:996) at org.autoplot.ScriptContext$6.run(ScriptContext.java:413) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303) 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)

jbfaden commented 4 years ago

If you set headless=false, the problem is avoided. This should be the default on macs, I think. See https://github.com/autoplot/python/blob/master/moredemos/testGUI.py