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.
During the first start of IDE ( Build 200303060100) with JDK 1.4.0_03 I got following NPE. Unfortunately I was unable to reproduce it again. java.lang.NullPointerException at javax.swing.text.html.ParagraphView.paint (ParagraphView.java:217) at javax.swing.text.html.TableView.paint (TableView.java:726) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint(BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint(BoxView.java:407) at javax.swing.text.html.TableView$RowView.paint (TableView.java:1360) at javax.swing.text.html.TableView.paint (TableView.java:726) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint(BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.text.BoxView.paintChild (BoxView.java:144) at javax.swing.text.BoxView.paint(BoxView.java:407) at javax.swing.text.html.BlockView.paint (BlockView.java:264) at javax.swing.plaf.basic.BasicTextUI$RootView.paint (BasicTextUI.java:1248) at javax.swing.plaf.basic.BasicTextUI.paintSafely (BasicTextUI.java:565) at javax.swing.plaf.basic.BasicTextUI.paint (BasicTextUI.java:699) at javax.swing.plaf.basic.BasicTextUI.update (BasicTextUI.java:678) at javax.swing.JComponent.paintComponent (JComponent.java:537) at javax.swing.JComponent.paint (JComponent.java:804) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JViewport.paint(JViewport.java:707) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at org.netbeans.core.windows.frames.CloseButtonTabbedPane.pain t(CloseButtonTabbedPane.java:209) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at org.netbeans.core.windows.frames.PerimeterPane.paint (PerimeterPane.java:103) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JLayeredPane.paint (JLayeredPane.java:552) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JLayeredPane.paint (JLayeredPane.java:552) at org.netbeans.core.windows.frames.DesktopPane$CenterDesktopP ane.paint(DesktopPane.java:427) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JViewport.paint(JViewport.java:707) at javax.swing.JComponent.paintChildren (JComponent.java:643) at javax.swing.JComponent.paint (JComponent.java:813) at javax.swing.JComponent.paintWithOffscreenBuffer (JComponent.java:4735) at javax.swing.JComponent.paintDoubleBuffered (JComponent.java:4688) at javax.swing.JComponent._paintImmediately (JComponent.java:4632) at javax.swing.JComponent.paintImmediately (JComponent.java:4464) at javax.swing.RepaintManager.paintDirtyRegions (RepaintManager.java:410) [catch] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest. run(SystemEventQueueUtilities.java:117) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent (EventQueue.java:443) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:191) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:138) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:130) at java.awt.EventDispatchThread.run (EventDispatchThread.java:98)
Looks like the famous, elusive html rendering timing bug in Swing html rendering. It pops up from time to time when using the internal web browser as well. Unfortunately, this is a JDK bug (as far as I know nobody's been able to create a case where it happens consistently). Closing as invalid - there's nothing we can do to fix it on the in NetBeans' code. The code in question is: public void paint(Graphics g, Shape a) { Rectangle r; if (a instanceof Rectangle) { r = (Rectangle) a; } else { r = a.getBounds(); //NULL POINTER EXCEPTION HERE } painter.paint(g, r.x, r.y, r.width, r.height, this); super.paint(g, a); } Walking the stack trace a bit, the offending rectangle is a "scratchpad" object allocated in the constructor of javax.swing.text.BoxView. The only way I can see for it to be null is as follows: - one thread constructs the BoxView instance - the thread scheduler switches contexts and the thread running the constructor is starved for a while, while still early in the BoxView constructor - another thread asks the new BoxView to paint itself before it's fully initialized You might be able to achieve this once in a while with something like SwingUtilities.invokeLater (new BoxView(blah).paint(...)). There is a call to javax.swing.SystemEventQueueUtilities$ComponentWorkRequest. run(SystemEventQueueUtilities.java:117) deep in the stack trace, which suggests that could be exactly what's happening. I'll try to put together enough data to file a JDK bug.
IMHO we can file a bug just from the stack trace - TableView.paint calls View.paint (ParagraphView) with a null second Shape param, not permitted for that method, which it got from calling BoxView.getChildAllocation, which is documented to sometimes return null. No idea what happened to the view that caused the child shape allocation to be invalid, but anyway the code should be more robust and produce a useful exception with helpful diagnostics. Also see possibly related: Issue #12907: AIIOBE from BoxView.updateLayoutArray, NPE from CompositeView.replace, NPE from FlowView.FlowStrategy.adjustRow Issue #16993: NPE from CompositeView.replace Issue #20760: NPE from CompositeView.replace again, as well as NPE from BoxView.calculateMajorAxisRequirements Issue #26506: NPE from CompositeView.replace again, plus NPE from FlowView.FlowStrategy.layoutRow, plus AIOOBE from BoxView.updateLayoutArray, plus NPE from BoxView.layout Issue #30188: AIIOBE from VariableHeightLayoutCache.getNode Issue #30517: NPE from CompositeView.replace, AIOOBE from BoxView.updateLayoutArray
Also see other bugs with ParagraphView.paint, pls. check to see if they are the same: Issue #9979 Issue #12907 Issue #27069 Issue #28219 Issue #29662
Found a related JDK bug 4760435 and attached link and notes. Closing.
Hmm, I'm not convinced all of these bugs have anything to do with #4760435, though some of them do. The Swing folks will probably ask you to collate these stack traces better. Or they will just fix the single exception for which a test case was given and ignore or not notice the rest.
*** Issue 25346 has been marked as a duplicate of this issue. ***
*** Issue 33476 has been marked as a duplicate of this issue. ***
*** Issue 34601 has been marked as a duplicate of this issue. ***
*** Issue 34970 has been marked as a duplicate of this issue. ***
*** Issue 35012 has been marked as a duplicate of this issue. ***
Not our bug - closing.
*** Issue 35326 has been marked as a duplicate of this issue. ***
*** Issue 35391 has been marked as a duplicate of this issue. ***
I was having the follwing maybe related error when running my program (netbeans was not running) which contains debug code, but also libraries which don't. Therefore probably all Unknown Source references. The exception occured when selecting a cell from a table. Program had to be finished, by task manager. The code lines do not contain reference to any of my code. The program contains a lot of threading. So it is possible to be a thread issue. Note that the final routine in which the error occurs is called recursively, maybe it is possible to create code that will create this error, and/or a solution can be obtained. In my case it did not reproduce. I realize it is not a netbeans error but assume that it will reach those who are interested from here. Thread Stopped: null null Stack Trace: null null javax.swing.text.BoxView.calculateMajorAxisRequirements(Unknown Source) javax.swing.text.BoxView.checkRequests(Unknown Source) javax.swing.text.BoxView.getMinimumSpan(Unknown Source) javax.swing.text.BoxView.calculateMajorAxisRequirements(Unknown Source) javax.swing.text.BoxView.checkRequests(Unknown Source) javax.swing.text.BoxView.setSpanOnAxis(Unknown Source) javax.swing.text.BoxView.layout(Unknown Source) javax.swing.text.BoxView.setSize(Unknown Source) javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source) javax.swing.plaf.basic.BasicTextUI$RootView.paint(Unknown Source) javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source) javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source) javax.swing.plaf.basic.BasicTextUI.update(Unknown Source) javax.swing.JComponent.paintComponent(Unknown Source) javax.swing.JComponent.paint(Unknown Source) javax.swing.JComponent.paintChildren(Unknown Source) javax.swing.JComponent.paint(Unknown Source) javax.swing.JViewport.paint(Unknown Source) javax.swing.JComponent.paintChildren(Unknown Source) javax.swing.JComponent.paint(Unknown Source) javax.swing.JComponent.paintToOffscreen(Unknown Source) javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) javax.swing.RepaintManager$PaintManager.paint(Unknown Source) javax.swing.BufferStrategyPaintManager.paint(Unknown Source) javax.swing.RepaintManager.paint(Unknown Source) javax.swing.JComponent._paintImmediately(Unknown Source) javax.swing.JComponent.paintImmediately(Unknown Source) javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source) javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source) java.awt.event.InvocationEvent.dispatch(Unknown Source) java.awt.EventQueue.dispatchEvent(Unknown Source) java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) java.awt.EventDispatchThread.pumpEvents(Unknown Source) java.awt.EventDispatchThread.pumpEvents(Unknown Source) java.awt.EventDispatchThread.run(Unknown Source)
(In reply to comment #14) > I was having the follwing maybe related error when running my program (netbeans > was not running) Then file a bug for Java directly - bugs.sun.com last I checked.