Bugs item #3611412, was opened at 2013-04-19 14:55
Message generated for change (Comment added) made by andrei-n1
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=679906&aid=3611412&group_id=118054

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Andrei_n (andrei-n1)
Assigned to: Nobody/Anonymous (nobody)
Summary: Null pointer error

Initial Comment:
After some tine (30 min.), while editing vertices, I receive the following Null 
pointer error:
Tested rev 3514


java.lang.NullPointerException
        at 
com.vividsolutions.jump.feature.FeatureDataset.query(FeatureDataset.java:127)
        at 
com.vividsolutions.jump.feature.FeatureCollectionWrapper.query(FeatureCollectionWrapper.java:138)
        at 
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.layerToFeaturesMap(LayerRenderer.java:162)
        at 
com.vividsolutions.jump.workbench.ui.renderer.FeatureCollectionRenderer.createRunnable(FeatureCollectionRenderer.java:55)
        at 
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.createRunnable(LayerRenderer.java:87)
        at 
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.render(RenderingManager.java:207)
        at 
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.render(RenderingManager.java:187)
        at 
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.renderAll(RenderingManager.java:161)
        at 
com.vividsolutions.jump.workbench.ui.LayerViewPanel.repaint(LayerViewPanel.java:530)
        at 
com.vividsolutions.jump.workbench.ui.Viewport.update(Viewport.java:117)
        at com.vividsolutions.jump.workbench.ui.Viewport.zoom(Viewport.java:266)
        at 
com.vividsolutions.jump.workbench.ui.zoom.AbstractZoomTool.zoomAt(AbstractZoomTool.java:217)
        at 
com.vividsolutions.jump.workbench.ui.zoom.ZoomTool.zoomAt(ZoomTool.java:133)
        at 
com.vividsolutions.jump.workbench.ui.zoom.ZoomTool.mouseClicked(ZoomTool.java:114)
        at 
com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool.mouseClicked(DelegatingTool.java:88)
        at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)


----------------------------------------------------------------------

Comment By: Andrei_n (andrei-n1)
Date: 2013-04-21 09:56

Message:
Ok. Here's another instance.

1. Create 2 layers.
2. In one of the layers, draw several polygons or lines. Merge some of
these objects. 
3. Reorder the layers 

----------------------------------------------------------------------

Comment By: michael michaud (michaudm)
Date: 2013-04-20 15:49

Message:
Thanks Andrei, this helped much.
There is a bug in MergeSelectedFeatures which should be fixed in r3518
Let me know if you noticed also this NPE without using
MergeSelectedFeatures
before I close the bug.

----------------------------------------------------------------------

Comment By: Andrei_n (andrei-n1)
Date: 2013-04-20 14:09

Message:
I think I discovered why this error appears.

It is somehow related to the attribute schema and the ''merge selected
features'' command. If you follow these steps you will get a Null Pointer
Exception:

1. Draw some lines or polygons in a new layer
2. Merge some of these objects (you can also create multilines or
multipolygons).
3. Insert a new field in the layer attribute schema. Apply the changes.

----------------------------------------------------------------------

Comment By: Andrei_n (andrei-n1)
Date: 2013-04-20 12:24

Message:
The initial datasets are valid. The 2 shapefiles can be downloaded from
here:
https://www.wetransfer.com/downloads/8e74a21a7675bf2dc9e2af3a7b1a39c320130420191545/bd203cef23182ff13d32115f7846ef1520130420191545/5f318a

I don't remember the sequence of operations because I received this error
several times in different contexts. I was snapping, splitting, and merging
line features and the error just came out one time when deleted a vertex,
another time when merging 2 lines, when snapping 2 vertices. I don't
remember the feature id's either. I will try to redo the steps, but it
looks the error just comes out randomly.

----------------------------------------------------------------------

Comment By: michael michaud (michaudm)
Date: 2013-04-20 10:48

Message:
Can you check if your initial dataset is valid with the validation tool.
Would be very helpful if you could provide 
- a shapefile
- a sequence of operation and a feature id which allow us to reproduce
exactly the bug you noticed

Thanks for your help


----------------------------------------------------------------------

Comment By: Andrei_n (andrei-n1)
Date: 2013-04-20 05:12

Message:
I now notice that the file is actually damaged afterwards. The feature with
empty geometry is in fact a random line feature from the dataset with the
geometry removed. 

----------------------------------------------------------------------

Comment By: Andrei_n (andrei-n1)
Date: 2013-04-20 04:50

Message:
I also received this error while merging 2 line features.

----------------------------------------------------------------------

Comment By: Andrei_n (andrei-n1)
Date: 2013-04-20 04:47

Message:
Hi,

The error pop up is repeatable and the layer features start disappearing.
The file is not damaged, but when reopening the layer, a new object with no
geometry (empty geometry collection) appears in the attribute table.

I was editing a Natural Earth shapefile. The tools I used were the ''split
line'' and the ''move vertex''. I encountered the error about 5 times, and
each time I was doing some vertex adjustments.

----------------------------------------------------------------------

Comment By: michael michaud (michaudm)
Date: 2013-04-20 04:26

Message:
Seems related to a feature with no geometry (null geometry).
Is the error repeatable ? Which tools were you using just before the NPE ?
Can you give the sequence of operation to produce the error ?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=679906&aid=3611412&group_id=118054

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to