Subject: | |
From: | |
Reply To: | |
Date: | Mon, 12 Aug 2013 18:20:09 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Norman, I am afraid to tell you but our two primary maintainers of GeoMASON (Mark Coletti and Keith Sullivan) are both rushing to finish out their PhDs. So I'm not sure how soon they'd get back to you on this. This is clearly a GeoMASON thing and not a MASON thing.
Trying to be helpful, I looked at the backtrace and it's a bit mysterious. The null pointer exception appears at this line I think:
Point pt = gm.geometry.getCentroid();
Clearly gm.geometry is returning null. Thing is, this can't be true! Because a bit earlier it was already tested for like this:
Geometry geom = gm.getGeometry();
if (clipGeometry.intersects(geom.getEnvelope()))
[gm.getGeometry() is identical to gm.geometry]
So that code should have triggered a NullPointerException *first*. Maybe you've got different code from me and so your line 325 isn't what I thought it was?
Anyway, I think you'll have to bug Mark until he responds.
Sean
On Aug 8, 2013, at 11:40 AM, Norman Langner wrote:
> Hi folks,
>
> it is me again. I have another problem (of course). My Simstate class runs perfectly but when I try to get it working with the GUI it fails with following error:
>
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
> at sim.portrayal.geo.GeomVectorFieldPortrayal.hitOrDraw2(GeomVectorFieldPortrayal.java:325)
> at sim.portrayal.geo.GeomVectorFieldPortrayal.hitOrDraw(GeomVectorFieldPortrayal.java:219)
> at sim.portrayal.FieldPortrayal2D.draw(FieldPortrayal2D.java:84)
> at sim.display.Display2D$InnerDisplay2D.paintUnbuffered(Display2D.java:643)
> at sim.display.Display2D$InnerDisplay2D.paint(Display2D.java:568)
> at sim.display.Display2D$InnerDisplay2D.paintComponent(Display2D.java:498)
> at sim.display.Display2D$InnerDisplay2D.paintComponent(Display2D.java:485)
> at javax.swing.JComponent.paint(JComponent.java:1054)
> at javax.swing.JComponent.paintChildren(JComponent.java:887)
> at javax.swing.JComponent.paint(JComponent.java:1063)
> at javax.swing.JViewport.paint(JViewport.java:731)
> at javax.swing.JComponent.paintChildren(JComponent.java:887)
> at javax.swing.JComponent.paint(JComponent.java:1063)
> at javax.swing.JComponent.paintChildren(JComponent.java:887)
> at javax.swing.JComponent.paint(JComponent.java:1063)
> at javax.swing.JComponent.paintChildren(JComponent.java:887)
> at javax.swing.JComponent.paint(JComponent.java:1063)
> at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221)
> at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
> at javax.swing.RepaintManager.paint(RepaintManager.java:1236)
> at javax.swing.JComponent._paintImmediately(JComponent.java:5169)
> at javax.swing.JComponent.paintImmediately(JComponent.java:4980)
> at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
> at javax.swing.RepaintManager$3.run(RepaintManager.java:784)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
> at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
> at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
> at javax.swing.RepaintManager.access$1000(RepaintManager.java:62)
> at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1647)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
> at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
> at java.awt.EventQueue.access$200(EventQueue.java:103)
> at java.awt.EventQueue$3.run(EventQueue.java:694)
> at java.awt.EventQueue$3.run(EventQueue.java:692)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
>
> The simulation worked before, even in the GUI. The only thing which changed is how I calculate the next movement of the agents. As how i understand MASON/GEOMASON the gui gets the coordinates of the agents via the GeomVectorFieldPortrayal of the agents which has the GeomVectorfield as field. Is that right?
> Because what didn't change is how the coordinate is set for the agent. Do you have any idea how I can solve this problem? If you need code-passages let me know.
>
> Thanks,
> Norman
|
|
|