[kepler-dev] NPE in diva.gui.GUIUtilities.addHotKey

Christopher Brooks cxh at eecs.berkeley.edu
Thu Sep 29 17:29:16 PDT 2011


Hi Daniel,
Thanks for point this out.
The issue came up when Miro refactored some code so that the layout 
mechanism
could store the layout parameters.

The issue here was that kepler/gui/src/org/kepler/gui/KeplerGraphFrame.java
has an _initBasicGraphFrame() method that has quite a bit of code 
duplication.

As an initial workaround, I created 6 protected methods that include the 
common code
and added a comment to BasicGraphFrame._initBasicGraphFrame so that 
maybe we can
avoid this issue in the future.

_Christopher

On 9/29/11 3:45 PM, Daniel Crawl wrote:
>
> Hi Christopher,
>
> I recently updated my Ptolemy sources to r62163, and get this error when
> starting Kepler:
>
>       [run] java.lang.NullPointerException
>       [run]     at diva.gui.GUIUtilities.addHotKey(GUIUtilities.java:104)
>       [run]     at diva.gui.GUIUtilities.addHotKey(GUIUtilities.java:94)
>       [run]     at 
> ptolemy.vergil.actor.ActorGraphFrame._addMenus(ActorGraphFrame.java:205)
>       [run]     at 
> org.kepler.gui.KeplerGraphFrame._addMenus(KeplerGraphFrame.java:1356)
>       [run]     at ptolemy.gui.Top$DoPackRunnable.run(Top.java:1845)
>       [run]     at ptolemy.gui.Top.deferIfNecessary(Top.java:246)
>       [run]     at ptolemy.gui.Top.pack(Top.java:457)
>       [run]     at 
> ptolemy.actor.gui.TableauFrame.pack(TableauFrame.java:322)
>       [run]     at ptolemy.actor.gui.Tableau.show(Tableau.java:354)
>       [run]     at 
> ptolemy.actor.gui.Configuration.createPrimaryTableau(Configuration.java:594)
>       [run]     at 
> ptolemy.vergil.VergilApplication._createEmptyConfiguration(VergilApplication.java:421)
>       [run]     at 
> ptolemy.actor.gui.ConfigurationApplication._parseArgs(ConfigurationApplication.java:1273)
>       [run]     at 
> ptolemy.vergil.VergilApplication._parseArgs(VergilApplication.java:497)
>       [run]     at 
> ptolemy.actor.gui.ConfigurationApplication.<init>(ConfigurationApplication.java:244)
>       [run]     at 
> ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:80)
>       [run]     at 
> ptolemy.vergil.VergilApplication.<init>(VergilApplication.java:111)
>       [run]     at 
> ptolemy.vergil.VergilApplication$1.run(VergilApplication.java:239)
>       [run]     at 
> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>       [run]     at 
> java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
>       [run]     at java.awt.EventQueue.access$000(EventQueue.java:85)
>       [run]     at java.awt.EventQueue$1.run(EventQueue.java:638)
>       [run]     at java.awt.EventQueue$1.run(EventQueue.java:636)
>       [run]     at java.security.AccessController.doPrivileged(Native 
> Method)
>       [run]     at 
> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>       [run]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
>       [run]     at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
>       [run]     at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
>       [run]     at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
>       [run]     at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
>       [run]     at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
>       [run]     at 
> java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>
>
> I checked out a few previous revisions, and it appears r62155 is the
> last revision that without the error.
>
>   --dan
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670



More information about the Kepler-dev mailing list