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.

Bug 94677 - Display breaks for no apparent reason. Get NPE
Summary: Display breaks for no apparent reason. Get NPE
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: Macintosh All
: P1 blocker with 1 vote (vote)
Assignee: _ sandipchitale
URL:
Keywords:
: 94879 96496 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-06 17:31 UTC by David Botterill
Modified: 2007-03-21 17:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
LoginPage.jsp (12.63 KB, text/xml)
2007-02-06 17:32 UTC, David Botterill
Details
LoginPage.java (21.52 KB, text/plain)
2007-02-06 17:42 UTC, David Botterill
Details
plugin portal project (3.87 MB, application/octet-stream)
2007-02-27 22:32 UTC, David Botterill
Details
Another project (23.83 KB, application/octet-stream)
2007-03-07 23:52 UTC, _ sandipchitale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Botterill 2007-02-06 17:31:12 UTC
Working with a complex document in flow layout, the components keep
automatically rearranging themselves.  Even if I reorder them in the outline,
when I hit refresh, the components will randomly reorder.  Also with the
attached page, after trying to get the arrangement to stick multiple times, I
get the following exception and the entire "fixed_footer1" section does not
display properly:

java.lang.NullPointerException
	at
com.sun.webui.jsf.component.PanelLayoutDesignInfo.acceptParent(PanelLayoutDesignInfo.java:67)
	at com.sun.rave.insync.live.LiveUnit.canCreateChild(LiveUnit.java:516)
	at com.sun.rave.insync.live.LiveUnit.canCreateBean(LiveUnit.java:489)
	at
com.sun.rave.insync.live.DesignBeanNode.createPasteTypes(DesignBeanNode.java:519)
	at org.openide.nodes.AbstractNode.getPasteTypes(AbstractNode.java:501)
	at
org.openide.explorer.ExplorerActionsImpl.updatePasteTypes(ExplorerActionsImpl.java:324)
	at
org.openide.explorer.ExplorerActionsImpl.updatePasteAction(ExplorerActionsImpl.java:314)
	at
org.openide.explorer.ExplorerActionsImpl.updateActions(ExplorerActionsImpl.java:258)
	at org.openide.explorer.ExplorerActionsImpl.access$400(ExplorerActionsImpl.java:65)
	at
org.openide.explorer.ExplorerActionsImpl$ActionStateUpdater.actionPerformed(ExplorerActionsImpl.java:667)
	at javax.swing.Timer.fireActionPerformed(Timer.java:271)
[catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 David Botterill 2007-02-06 17:32:12 UTC
Created attachment 38129 [details]
LoginPage.jsp
Comment 2 David Botterill 2007-02-06 17:42:36 UTC
Created attachment 38131 [details]
LoginPage.java
Comment 3 David Botterill 2007-02-06 18:32:31 UTC
FWIW, I shutdown the IDE, removed the cache, restarted, opened project and the
display was correct in the designer.
Comment 4 Jayashri Visvanathan 2007-02-16 19:25:53 UTC
Assigning for Peter for evaluation. This seems to be duplicate of 94879. Can you
confirm ? thanks
Comment 5 Peter Zavadsky 2007-02-20 21:21:03 UTC
The designer displays only what is produced by the model+renderers machinery.
The rearanging is not in the hands of designer or outline but in the the nodes
impl themselves, representing the beans/components. Sandip was working on the
reaarranging the children nodes, passing this to him first.

The exception however refers to a problem in the components (design time), needs
to get there too.


Comment 6 _ sandipchitale 2007-02-20 21:47:18 UTC
Seems like and NPE in designinfo.
Comment 7 Gregory Murphy 2007-02-27 01:14:25 UTC
It looks like DesignInfo.acceptParent() threw an NPE because
DesignBean.getInstance() returned null. This method should _never_ return null.

Has anyone successfully reproduced the NPE?
Comment 8 David Botterill 2007-02-27 22:32:23 UTC
Created attachment 38958 [details]
plugin portal project
Comment 9 _ sandipchitale 2007-03-02 20:01:25 UTC
*** Issue 96496 has been marked as a duplicate of this issue. ***
Comment 10 _ sandipchitale 2007-03-02 20:05:16 UTC
*** Issue 94879 has been marked as a duplicate of this issue. ***
Comment 11 _ sandipchitale 2007-03-05 19:19:43 UTC
While trying to reproduce the problem I am seeing these exceptions:

1. When calling refresh after reordering.
INFORMATIONAL *********** Exception occurred ************ at 9:32 AM on Mar 5, 
2007
java.lang.IllegalStateException: Unexpected floating value, 
cssFloating=com.sun.rave.designer.cssengine.CssValueImpl@1c6b306[value=none]
   at com.sun.rave.css2.LineBoxGroup.positionFloatBox(LineBoxGroup.java:616)
   at com.sun.rave.css2.LineBoxGroup.finishFloats(LineBoxGroup.java:570)
   at com.sun.rave.css2.LineBoxGroup.finishLine(LineBoxGroup.java:448)
   at com.sun.rave.css2.LineBoxGroup.relayout(LineBoxGroup.java:236)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188)
   at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137)
   at com.sun.rave.css2.DocumentBox.layoutContext(DocumentBox.java:336)
   at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:252)
   at com.sun.rave.css2.PageBox.layout(PageBox.java:511)
   at com.sun.rave.css2.PageBox.relayout(PageBox.java:576)
   at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:378)
   at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:589)
   at com.sun.rave.designer.DesignerTopComp.componentShowing
(DesignerTopComp.java:960)
   at com.sun.rave.designer.WebForm.componentShowing(WebForm.java:1762)
   at com.sun.rave.designer.jsf.ui.JsfMultiViewElement.componentShowing
(JsfMultiViewElement.java:62)
   at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement
(MultiViewPeer.java:265)
   at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement
(MultiViewPeer.java:235)
   at 
org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionChanged
(MultiViewPeer.java:626)
   at org.netbeans.core.multiview.MultiViewModel.fireSelectionChanged
(MultiViewModel.java:230)
   at org.netbeans.core.multiview.MultiViewModel.setActiveDescription
(MultiViewModel.java:99)
   at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected
(MultiViewModel.java:280)
   at javax.swing.JToggleButton$ToggleButtonModel.setSelected
(JToggleButton.java:215)
   at javax.swing.ButtonGroup.setSelected(ButtonGroup.java:139)
   at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected
(MultiViewModel.java:276)
   at 
org.netbeans.core.multiview.TabsComponent$ButtonMouseListener.mousePressed
(TabsComponent.java:420)
   at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
   at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
   at java.awt.Component.processMouseEvent(Component.java:5485)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
   at java.awt.Component.processEvent(Component.java:5253)
   at java.awt.Container.processEvent(Container.java:1966)
   at java.awt.Component.dispatchEventImpl(Component.java:3955)
   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.processMouseEvent(Container.java:3889)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
   at java.awt.Container.dispatchEventImpl(Container.java:2010)
   at java.awt.Window.dispatchEventImpl(Window.java:1774)
   at java.awt.Component.dispatchEvent(Component.java:3803)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
   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)

2. When clicking on the hyperlinks in the footer:

java.lang.AssertionError: Invalid box index: 9, size is 1; this list is 
{LineBox:com.sun.rave.designer.markup.RaveRenderedElementImpl@172f7c3[div], 
id=form1:center_container:page_border:fixed_footer1:footer_text1:footer_navig1,
 rendered=true}
	at com.sun.rave.css2.BoxList.get(BoxList.java:91)
	at com.sun.rave.css2.ContainerBox.getBox(ContainerBox.java:189)
	at com.sun.rave.css2.CssBox.getPrevNormalBlockBox(CssBox.java:2738)
	at com.sun.rave.css2.ModelViewMapper.findPrevLineBox
(ModelViewMapper.java:960)
	at com.sun.rave.css2.ModelViewMapper.findClosestPosition
(ModelViewMapper.java:1849)
[catch] at com.sun.rave.css2.ModelViewMapper.viewToModel
(ModelViewMapper.java:1788)
	at com.sun.rave.designer.DesignerPaneUI.viewToModel
(DesignerPaneUI.java:1087)
	at com.sun.rave.text.DesignerCaret.positionCaret
(DesignerCaret.java:219)
	at com.sun.rave.text.DesignerCaret.adjustCaret(DesignerCaret.java:410)
	at com.sun.rave.text.DesignerCaret.adjustCaretAndFocus
(DesignerCaret.java:399)
	at com.sun.rave.text.DesignerCaret.mousePressed(DesignerCaret.java:393)
	at com.sun.rave.designer.InteractionManager$MouseHandler.mousePressed
(InteractionManager.java:1600)
	at java.awt.Component.processMouseEvent(Component.java:5485)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	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.processMouseEvent
(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	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)

Comment 12 Peter Zavadsky 2007-03-05 23:57:34 UTC
The Flow layout is not implemented well. It has big architectural issues, and at
this moment it is not easily fixable, at least not quickly.
I've put there changes to supress throwing user exceptions, just to log them. So
they are preserved, but user is not annoyed with no help.
Comment 13 _ sandipchitale 2007-03-06 23:18:14 UTC
This is a fix for the problem related to the moving of components in the 
Outline window. The problem occured because because the index in the design 
bean children array was also used to move the Nodes in the JSP source DOM. 
However the Nodes in the JSP DOM do not correspond 1 to 1 with the 
DesignBeans. That is because the white space between tags becomes Text nodes. 
The comment and passthrough become other Nodes. To get around the problem the 
next sibling bean's element is used instead to insert this bean's elemnt. If 
this is the last DesignBean then the corresponding element is inserted at the 
end.
Comment 14 _ sandipchitale 2007-03-07 23:52:17 UTC
Created attachment 39280 [details]
Another project
Comment 15 _ krystyna 2007-03-21 17:57:09 UTC
Verified NB 030506 with VWP 0313_1 that re-ordering components within panels
from outline has been fixed. A side issue regarding re-parenting components to
panels from outline has been opened. 
http://www.netbeans.org/issues/show_bug.cgi?id=98333