[kepler-dev] Java 1.7

Tomasz Żok tzok at man.poznan.pl
Mon Nov 5 00:39:29 PST 2012


On 11/04/12 at 10:40am, Christopher Brooks wrote:
> To my knowledge, Ptolemy II and Kepler compile and run properly
> under Java 1.7.

There is one problem with Java 1.7 I know of. When you try to edit the script
in PythonScript actor, you get an exception: "Failed to open a dialog to edit
the target" with the stacktrace starting with:

    java.lang.NullPointerException
        at ptolemy.actor.gui.TextEditor.getBackground(TextEditor.java:144)

AFAIR, there was some discussion about this problem, but I do not think we got
to solve it anyhow. Also, it probably concerns not only the PythonScript actor.


Some information about my environment: (this is the latest java 1.7)

    $ java -version
    java version "1.7.0_09"
    OpenJDK Runtime Environment (IcedTea7 2.3.3) (ArchLinux build 7.u9_2.3.3-1-x86_64)
    OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

I am using kepler-2.3 from:
http://code.kepler-project.org/code/kepler/releases/release-branches/kepler-2.3


Here is the whole stacktrace:

    java.lang.NullPointerException
        at ptolemy.actor.gui.TextEditor.getBackground(TextEditor.java:144)
        at java.awt.Window.setBackground(Window.java:3798)
        at java.awt.Frame.setBackground(Frame.java:988)
        at ptolemy.gui.Top.access$1001(Top.java:141)
        at ptolemy.gui.Top$SetBackgroundRunnable.run(Top.java:1889)
        at ptolemy.gui.Top.deferIfNecessary(Top.java:247)
        at ptolemy.gui.Top.setBackground(Top.java:501)
        at ptolemy.actor.gui.TextEditor.setBackground(TextEditor.java:238)
        at javax.swing.JFrame.frameInit(JFrame.java:253)
        at javax.swing.JFrame.<init>(JFrame.java:175)
        at ptolemy.gui.Top.<init>(Top.java:162)
        at ptolemy.actor.gui.TableauFrame.<init>(TableauFrame.java:133)
        at ptolemy.actor.gui.TableauFrame.<init>(TableauFrame.java:168)
        at ptolemy.actor.gui.TextEditor.<init>(TextEditor.java:104)
        at ptolemy.actor.gui.TextEditor.<init>(TextEditor.java:91)
        at ptolemy.actor.gui.TextEditor.<init>(TextEditor.java:81)
        at ptolemy.vergil.toolbox.TextEditorForStringAttributes.<init>(TextEditorForStringAttributes.java:59)
        at ptolemy.vergil.toolbox.TextEditorConfigureFactory.createEditor(TextEditorConfigureFactory.java:135)
        at ptolemy.vergil.toolbox.ConfigureAction._openDialog(ConfigureAction.java:143)
        at ptolemy.vergil.toolbox.ConfigureAction.actionPerformed(ConfigureAction.java:99)
        at diva.canvas.interactor.ActionInteractor.mousePressed(ActionInteractor.java:74)
        at diva.canvas.interactor.CompositeInteractor.mousePressed(CompositeInteractor.java:199)
        at diva.canvas.interactor.SelectionInteractor.mousePressed(SelectionInteractor.java:202)
        at diva.canvas.FigureLayer.dispatchEventUpTree(FigureLayer.java:551)
        at diva.canvas.FigureLayer.grabPointer(FigureLayer.java:319)
        at diva.canvas.FigureLayer.processLayerEvent(FigureLayer.java:673)
        at diva.canvas.FigureLayer.dispatchEvent(FigureLayer.java:203)
        at diva.canvas.CanvasPane.processLayerEvent(CanvasPane.java:280)
        at diva.canvas.CanvasPane.dispatchEvent(CanvasPane.java:89)
        at diva.canvas.JCanvas.internalProcessMouseEvent(JCanvas.java:520)
        at diva.canvas.JCanvas.processMouseEvent(JCanvas.java:474)
        at java.awt.Component.processEvent(Component.java:6270)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4861)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2719)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:682)
        at java.awt.EventQueue$3.run(EventQueue.java:680)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:696)
        at java.awt.EventQueue$4.run(EventQueue.java:694)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)


Regards,
Tomek

-- 
Tomasz Zok
Poznan Supercomputing and Networking Center
ul. Noskowskiego 10, 61-704 Poznan, POLAND
http://www.man.poznan.pl


More information about the Kepler-dev mailing list