This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Got NPE in XSD editor design view. Steps to reproduce: 1. Create a new XSD 2. Add an element declaration in schema view 3. Go to design view 4. Expand the element declaration (no child components for now) 5. Drag and drop a new element declaration as the child of the existing element declaration 6. Drag a new element declaration as the sibling of the one just added and drop to the beginning of the model group. 7. Save the XSD 8. Close the XSD editor window 9. Double click the XSD to open it in XSD editor again 10. Go to design view 11. Expand the global element declaration (it should have two child element declarations) 12. Drag a new element declaration and drop it to the beginning of the model group of the global element declaration. NPE occurs at this time. Video is also attached. Stack trace: java.lang.NullPointerException at org.netbeans.modules.xml.schema.abe.ElementsContainerPanel$1._propertyChange (ElementsContainerPanel.java:62) at org.netbeans.modules.xml.schema.abe.ModelEventMediator.propertyChange (ModelEventMediator.java:55) at org.netbeans.modules.xml.xam.AbstractComponent$DelegateListener.propertyChange (AbstractComponent.java:401) at java.beans.PropertyChangeSupport.firePropertyChange (PropertyChangeSupport.java:333) at org.netbeans.modules.xml.xam.AbstractModel$Transaction.fireCompleteEventSet (AbstractModel.java:401) at org.netbeans.modules.xml.xam.AbstractModel$Transaction.fireEvents (AbstractModel.java:389) at org.netbeans.modules.xml.xam.AbstractModel.endTransaction (AbstractModel.java:292) at org.netbeans.modules.xml.xam.AbstractModel.endTransaction (AbstractModel.java:284) at org.netbeans.modules.xml.schema.abe.ElementsContainerPanel.addNewElementAt (ElementsContainerPanel.java:195) at org.netbeans.modules.xml.schema.abe.ElementsContainerPanel.tweenerDrop (ElementsContainerPanel.java:208) at org.netbeans.modules.xml.schema.abe.CompositorPanel.tweenerDrop (CompositorPanel.java:537) at org.netbeans.modules.xml.schema.abe.ContainerPanel$2.drop (ContainerPanel.java:429) at org.netbeans.modules.xml.schema.abe.TweenerPanel.drop (TweenerPanel.java:223) at org.netbeans.modules.xml.schema.abe.ABEBaseDropPanel$2.drop (ABEBaseDropPanel.java:109) at java.awt.dnd.DropTarget.drop(DropTarget.java:430) at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage (SunDropTargetContextPeer.java:500) at sun.awt.dnd.SunDropTargetContextPeer.access$800 (SunDropTargetContextPeer.java:53) at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent (SunDropTargetContextPeer.java:812) at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent (SunDropTargetContextPeer.java:736) at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29) at java.awt.Component.dispatchEventImpl(Component.java:3826) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processDropTargetEvent (Container.java:3963) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3817) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1778) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
I have fixed this bug partially. The below mentioned problem may not occur anymore. But the fix might not take care of the memory leaks. So, I am leaving this bug open to investigate further. You can verify this bug in the current builds.
"XML Schema Core" SchemaABEViewMultiViewElement.java new revision: 1.1.2.47.6.6; previous revision: 1.1.2.47.6.5 "XML Schema Design" ABEBaseDropPanel.java new revision: 1.1.2.11.6.3; previous revision: 1.1.2.11.6.2 InstanceDesignerPanel.java new revision: 1.1.2.43.6.4; previous revision: 1.1.2.43.6.3 InstanceUIContext.java new revision: 1.1.2.18.6.4; previous revision: 1.1.2.18.6.3 ABEAbstractNode.java new revision: 1.1.2.54.6.5; previous revision: 1.1.2.54.6.4
Verified fixed in build 070307_11