Issue Details (XML | Word | Printable)

Key: AGROSENSE-1481
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Timon Veenstra
Reporter: Tom Verhage
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
agrosense

Shape import behaving strange

Created: 17/Feb/13 01:13 PM   Updated: 23/Apr/13 08:13 AM   Resolved: 23/Apr/13 08:13 AM
Component/s: Core
Affects Version/s: 13.01
Fix Version/s: 13.04

Time Tracking:
Not Specified

Tags:
Participants: Merijn Zengers, Timon Veenstra and Tom Verhage


 Description  « Hide

Open AgroSense
(this step maybe caused the problems) Import invalid sensordata (e.g. a file with only the header information, and no measurements)
Import shapes

Expected: the shapes appear in the explorer
Result: nothing appears in the explorer

Restart AgroSense
Result: the shapes appear in the explorer

Import another shapefile
Expected: the shape appears in the explorer
Result: Shapes did appear, but with error

java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Unknown Source)
at java.nio.DirectByteBuffer.getInt(Unknown Source)
at org.geotools.data.shapefile.shp.ShapefileHeader.read(ShapefileHeader.java:81)
at org.geotools.data.shapefile.shp.IndexFile.<init>(IndexFile.java:99)
Caused: java.io.IOException
at org.geotools.data.shapefile.shp.IndexFile.<init>(IndexFile.java:110)
[catch] at org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:244)
at org.geotools.data.shapefile.ShapefileDataStore.openShapeReader(ShapefileDataStore.java:557)
at org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:784)
at org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:742)
at org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:736)
at org.geotools.data.shapefile.ShapefileDataStore.getFeatureSource(ShapefileDataStore.java:1070)
at nl.cloudfarming.client.field.shape.ShapeDataObject.getShapes(ShapeDataObject.java:341)
at nl.cloudfarming.client.field.shape.ShapeDataObject.getStringAttributes(ShapeDataObject.java:513)
at nl.cloudfarming.client.field.shape.ShapeDataObject.updateMappingAttributes(ShapeDataObject.java:145)
at nl.cloudfarming.client.field.shape.ShapeDataObject.checkDefaultAttributes(ShapeDataObject.java:119)
at nl.cloudfarming.client.field.shape.ShapeDataObject.<init>(ShapeDataObject.java:110)
at nl.cloudfarming.client.field.shape.ShapeFileLoader.createMultiObject(ShapeFileLoader.java:133)
at org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:145)
at org.openide.loaders.DataObjectPool.handleFindDataObject(DataObjectPool.java:161)
at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:407)
at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:380)
at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:535)
at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:493)
at org.openide.loaders.DataObject.find(DataObject.java:532)
at nl.cloudfarming.client.imp.ImportSource.accept(ImportSource.java:61)
at nl.cloudfarming.client.field.shape.ShapeImportProcessor$ImportedShapesNodeChildren.createNodes(ShapeImportProcessor.java:187)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterNodeEntry.nodes(FilterNode.java:1894)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:294)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterLazySnapshot.get(FilterNode.java:1740)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterNodeEntry.nodes(FilterNode.java:1885)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:294)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterLazySnapshot.get(FilterNode.java:1740)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:880)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:865)
at org.openide.explorer.view.VisualizerChildren.getChildAt(VisualizerChildren.java:127)
at org.openide.explorer.view.VisualizerNode.getChildAt(VisualizerNode.java:321)
at javax.swing.tree.DefaultTreeModel.getChild(Unknown Source)
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(Unknown Source)
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(Unknown Source)
at javax.swing.tree.AbstractLayoutCache.getPreferredWidth(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at org.openide.explorer.view.TreeView$ExplorerScrollPaneLayout.layoutContainer(TreeView.java:1724)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at org.openide.explorer.view.TreeView.access$101(TreeView.java:151)
at org.openide.explorer.view.TreeView$3.run(TreeView.java:670)
at org.openide.util.Mutex.readAccess(Mutex.java:367)
at org.openide.util.Mutex$1R.run(Mutex.java:1309)
at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1921)
at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1328)
at org.openide.util.Mutex.readAccess(Mutex.java:356)
at org.openide.explorer.view.TreeView.validate(TreeView.java:667)
at javax.swing.RepaintManager$2.run(Unknown Source)
at javax.swing.RepaintManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(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.awt.EventQueue.dispatchEvent(Unknown Source)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
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)



Merijn Zengers added a comment - 28/Mar/13 10:08 AM - edited

Created bug AGROSENSE-1525

When i imported crop circle data with only header got a nullpointer.

java.lang.NullPointerException
at org.openide.util.lookup.InstanceContent$SimpleItem.<init>(InstanceContent.java:198)
at org.openide.util.lookup.InstanceContent.add(InstanceContent.java:90)
at nl.cloudfarming.client.sensor.SensorDataObject.getSensorGrid(SensorDataObject.java:101)
at nl.cloudfarming.client.sensor.SensorDataObject.createNodeDelegate(SensorDataObject.java:80)
at nl.cloudfarming.client.sensor.cropcircle.CropCircleDataObject.createNodeDelegate(CropCircleDataObject.java:52)
at org.openide.loaders.DataObject$1.run(DataObject.java:310)
at org.openide.util.Mutex.readAccess(Mutex.java:367)
at org.openide.util.Mutex$1R.run(Mutex.java:1309)
at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1921)
at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1328)
at org.openide.util.Mutex.readAccess(Mutex.java:356)
at org.openide.loaders.DataObject.getNodeDelegateImpl(DataObject.java:306)
at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:298)
at org.openide.loaders.DataObject.getClonedNodeDelegate(DataObject.java:331)
at org.openide.loaders.FolderChildren.createNode(FolderChildren.java:239)
at org.openide.loaders.FolderChildren$DelayedNode.run(FolderChildren.java:425)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
at org.openide.util.RequestProcessor.post(RequestProcessor.java:424)
at org.openide.loaders.FolderChildren$DelayedNode.<init>(FolderChildren.java:420)
at org.openide.loaders.FolderChildren$DelayedNode.<init>(FolderChildren.java:409)
at org.openide.loaders.FolderChildren$DelayedNode.<init>(FolderChildren.java:405)
at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:220)
at org.openide.loaders.FolderChildren.createNodes(FolderChildren.java:73)
at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1662)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:294)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:260)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:885)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterNodeEntry.nodes(FilterNode.java:1885)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:294)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterLazySnapshot.get(FilterNode.java:1740)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterNodeEntry.nodes(FilterNode.java:1885)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:294)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterLazySnapshot.get(FilterNode.java:1740)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:880)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:865)
at org.openide.explorer.view.VisualizerChildren.getChildAt(VisualizerChildren.java:127)
at org.openide.explorer.view.VisualizerNode.getChildAt(VisualizerNode.java:321)
at javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:174)
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(FixedHeightLayoutCache.java:1523)
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(FixedHeightLayoutCache.java:1478)
at javax.swing.tree.AbstractLayoutCache.getPreferredWidth(AbstractLayoutCache.java:245)
at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(BasicTreeUI.java:1882)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:1985)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:1973)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1660)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:790)
at org.openide.explorer.view.TreeView$ExplorerScrollPaneLayout.layoutContainer(TreeView.java:1724)
at java.awt.Container.layout(Container.java:1503)
at java.awt.Container.doLayout(Container.java:1492)
at java.awt.Container.validateTree(Container.java:1688)
at java.awt.Container.validate(Container.java:1623)
at org.openide.explorer.view.TreeView.access$101(TreeView.java:151)
at org.openide.explorer.view.TreeView$3.run(TreeView.java:670)
at org.openide.util.Mutex.readAccess(Mutex.java:367)
at org.openide.util.Mutex$1R.run(Mutex.java:1309)
at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1921)
at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1328)
at org.openide.util.Mutex.readAccess(Mutex.java:356)
at org.openide.explorer.view.TreeView.validate(TreeView.java:667)
at javax.swing.RepaintManager$2.run(RepaintManager.java:679)
at javax.swing.RepaintManager$2.run(RepaintManager.java:677)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:676)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1650)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
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)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


Merijn Zengers added a comment - 28/Mar/13 12:14 PM - edited

After fixing AGROSENSE-1525 could import empty sensor data files. But cannot reproduce the problems you mentioned. Could you test again with new patch? And which empty type are you importing?