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 105790 - NPE switching Windows display with open project
Summary: NPE switching Windows display with open project
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: David Simonek
URL:
Keywords:
: 121824 145244 148698 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-05 21:40 UTC by _ krystyna
Modified: 2008-12-22 13:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2007-06-05 21:40:29 UTC
Build 06051200
XP
JDK1.6.0_01

1. create a new VWP project
2. after project opens (and scanning finishes) via the  
   Control Panel, change the Windows Display. e.g. select
   an alternate Theme from the dropdown than the active 
   one, swithing e.g. from Windows XP style -> Windows Classic
>get NPE:

java.lang.NullPointerException
	at com.sun.java.swing.plaf.windows.XPStyle$Skin.getWidth
(XPStyle.java:507)
	at com.sun.java.swing.plaf.windows.XPStyle$Skin.getWidth
(XPStyle.java:511)
	at com.sun.java.swing.plaf.windows.WindowsScrollBarUI.paintThumb
(WindowsScrollBarUI.java:175)
	at javax.swing.plaf.basic.BasicScrollBarUI.paint
(BasicScrollBarUI.java:366)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
	at javax.swing.JComponent.paintComponent(JComponent.java:758)
	at javax.swing.JComponent.paint(JComponent.java:1022)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at org.netbeans.core.windows.view.ui.MultiSplitPane.paint
(MultiSplitPane.java:294)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at org.netbeans.core.windows.view.ui.MultiSplitPane.paint
(MultiSplitPane.java:294)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paint(JComponent.java:1031)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
	at javax.swing.JComponent.paintChildren(JComponent.java:859)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5111)
	at javax.swing.BufferStrategyPaintManager.paint
(BufferStrategyPaintManager.java:285)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
	at javax.swing.JComponent.paint(JComponent.java:1008)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
	at sun.awt.SunGraphicsCallback.runOneComponent
(SunGraphicsCallback.java:60)
	at sun.awt.SunGraphicsCallback.runComponents
(SunGraphicsCallback.java:97)
	at java.awt.Container.paint(Container.java:1797)
	at org.netbeans.core.windows.view.ui.MainWindow.paint
(MainWindow.java:507)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
	at javax.swing.RepaintManager.seqPaintDirtyRegions
(RepaintManager.java:659)
[catch] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run
(SystemEventQueueUtilities.java:128)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at java.awt.EventDispatchThread.pumpOneEventForFilters
(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter
(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Petr Nejedly 2007-06-05 22:17:19 UTC
Nothing to do with explorer.
Either JDK issue or PLAF integration issue.
Reassigning...
Comment 2 David Simonek 2007-06-06 11:56:00 UTC
This looks like bug in JDK, but I couldn't find it in JDK bug system. krystyna
please try the following:

- run NetBeans with various JDK versions and see if the bug appears
- try to reproduce with SwingSet2 demo coming with JDK

so that we see if this is JDK/Swing bug or NetBeans specific, please reopen with
requested info, thanks a lot.
Comment 3 _ krystyna 2007-06-06 19:56:59 UTC
In preparing to setup to run the SwingSet2 demo, I discovered that both my
System and User PATH and JAVA_HOME environment variables had been pointing to
1.5.0_09 while I was running Netbeans under 1.6.0_01. Synching the vars up to
1.6.0_01 did not produce any exception when switching Windows display with a VWP
open project. This issue can be closed. 
Comment 4 David Simonek 2007-06-07 10:42:37 UTC
Thank you.
Comment 5 David Simonek 2007-11-13 15:38:08 UTC
*** Issue 121824 has been marked as a duplicate of this issue. ***
Comment 6 Jesse Glick 2007-11-13 16:34:42 UTC
If it's a JDK bug, it needs to be reported to the JDK team and the jdk_bug_nnnnnnn notation added to Status Whiteboard.

I was running NB on JDK 6u3; I also had JDK 5u14 installed. I had recently updated both JDKs so it is quite possible
some env vars were not up to date. This should not cause a NPE in the middle of L&F code, however.
Comment 7 David Simonek 2007-11-14 07:55:51 UTC
OK, I entered JDK bug
http://bugs.sun.com/view_bug.do?bug_id=6629522

Let's hope it won't be just a waste of my time, note that error is not reproducible.
Comment 8 _ krystyna 2007-11-15 01:14:23 UTC
Actually I have found a way to reproduce this: 
it seems that it is always on switch FROM WindowsXP style.
With NB6 RC1 build, using jdk1.6.0_03

I start with my custom windows theme active. OK.

1. created a NB ee5 web project
2. set Windows Display -> XP style . OK. no exceptions
3. create another NB web project
4. switch Windows display from XP -> Classic (or back to custom)

I will update the JDK bug with this info.
Comment 9 Jesse Glick 2007-11-15 04:22:08 UTC
BTW I now recall that around the time I filed issue #121824, I had tried to set my Win XP display to use "large fonts"
and then back to normal point size. So that might be another way to reproduce.
Comment 10 David Simonek 2008-08-27 11:21:14 UTC
*** Issue 145244 has been marked as a duplicate of this issue. ***
Comment 11 Stanislav Aubrecht 2008-09-30 11:43:37 UTC
*** Issue 148698 has been marked as a duplicate of this issue. ***