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 183407 - [69cat] NullPointerException at java.util.Arrays$ArrayList.<init>
Summary: [69cat] NullPointerException at java.util.Arrays$ArrayList.<init>
Status: VERIFIED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-02 13:56 UTC by Exceptions Reporter
Modified: 2012-05-11 13:53 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 167384


Attachments
stacktrace (735 bytes, text/plain)
2010-04-02 13:56 UTC, Exceptions Reporter
Details
stacktrace (735 bytes, text/plain)
2010-04-02 19:55 UTC, laurin1
Details
stacktrace (755 bytes, text/plain)
2010-04-19 19:31 UTC, ashenrandika
Details
stacktrace (755 bytes, text/plain)
2010-04-30 09:36 UTC, abajja
Details
stacktrace (755 bytes, text/plain)
2010-05-04 14:41 UTC, abajja
Details
stacktrace (755 bytes, text/plain)
2010-05-05 11:59 UTC, Jaroslav Tulach
Details
stacktrace (755 bytes, text/plain)
2010-05-13 08:52 UTC, Jaroslav Pospisil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2010-04-02 13:56:43 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) Client VM, 16.2-b04, Java(TM) SE Runtime Environment, 1.6.0_19-b04
OS: Windows XP

User Comments:
GUEST: opening project

GUEST: opening new project from remote server (on samba)




Stacktrace: 
java.lang.NullPointerException
   at java.util.Arrays$ArrayList.<init>(Arrays.java:0)
   at java.util.Arrays.asList(Arrays.java:0)
   at sun.awt.shell.Win32ShellFolderManager2.isFileSystemRoot(Win32ShellFolderManager2.java:0)
   at sun.awt.shell.ShellFolder.isFileSystemRoot(ShellFolder.java:0)
   at javax.swing.filechooser.FileSystemView.isFileSystemRoot(FileSystemView.java:0)
   at javax.swing.filechooser.FileSystemView.getShellFolder(FileSystemView.java:0)
Comment 1 Exceptions Reporter 2010-04-02 13:56:47 UTC
Created attachment 96606 [details]
stacktrace
Comment 2 laurin1 2010-04-02 19:55:48 UTC
Created attachment 96623 [details]
stacktrace
Comment 3 Exceptions Reporter 2010-04-03 11:55:10 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=167384
Comment 4 Exceptions Reporter 2010-04-19 06:41:18 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=167384
Comment 5 David Simonek 2010-04-19 13:59:55 UTC
Unfortunately, I found that this is regression in JDK, starting from jdk 1.6.0 update 19. More information should be visible sometimes in future at:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6940843

As a workaround, users may use "nb.FileChooser.useShellFolder=false" in netbeans.conf, as explained in http://wiki.netbeans.org/FaqWindowsCPU
Comment 6 laurin1 2010-04-19 16:27:14 UTC
I don't understand. Why is this WONTFIX? If it causes an error, why not make the option not available on Windows?
Comment 7 ashenrandika 2010-04-19 19:31:56 UTC
Created attachment 97660 [details]
stacktrace
Comment 8 Stanislav Aubrecht 2010-04-20 10:03:46 UTC
re comment #6: the jdk bug will hopefully be fixed in the next jdk update so turning shell folders off in netbeans 6.9 would make file chooser windows look bad for windows users until the next netbeans release
Comment 9 laurin1 2010-04-20 12:36:45 UTC
"hopefully"???

Yes, but if it's not, then we're signing off on bug in our application, since we ARE dependent on Netbeans, until the next JDK release and what if they don't fix it?
Comment 10 abajja 2010-04-30 09:36:35 UTC
Created attachment 98318 [details]
stacktrace
Comment 11 abajja 2010-05-04 14:41:22 UTC
Created attachment 98437 [details]
stacktrace

creating a new suite
Comment 12 Jaroslav Tulach 2010-05-05 11:59:24 UTC
Created attachment 98480 [details]
stacktrace
Comment 13 Antonin Nebuzelsky 2010-05-10 15:18:36 UTC
Can someone from the reporters on CC comment if filechooser works for them or not after this exception is raised? In the discussion of the related JDK bug it seems to me this is the case.

Please, comment also about frequency of encountering this exception.

Thanks.
Comment 14 Jaroslav Pospisil 2010-05-13 08:52:28 UTC
Created attachment 98917 [details]
stacktrace

Added opensource Gf v3 server through Services > Add Server into builded enterprise IDE with no server and clean userdir.
Dev 100513-28ca875b5030
Comment 15 Jaroslav Pospisil 2010-05-13 09:57:59 UTC
I'm using JDK1.6.0_20 and for me everything works OK after I got this NPE.As to frequency - I've got NPE each time I try to add first server with clean userdir, otherwise this works fine,I guess.
Comment 16 David Simonek 2010-05-13 12:49:10 UTC
Thanks Jaro for confirming what JDK guys told us - that this exception is harmless and system continues to work OK. In NB release, even this exception will not be so visible, hidden under small red icon in status bar.

So I'm closing as wontfix again, there is nothing more what we can do, as the bug is *in different product*, not in Netbeans and therefore we can't fix it. For users that are affected by this bug, there are a couple of workarounds as I already mentioned:
- stay with older version of JDK
- use "nb.FileChooser.useShellFolder=false" in netbeans.conf, as explained in http://wiki.netbeans.org/FaqWindowsCPU
- use final release of Netbeans and ignore small red icon
Comment 17 bruehlicke 2010-05-13 13:56:48 UTC
I have encountered this on my 6.5 based NetBeans app after switching to 1.6.0_20 on Windows XP 32 bit SP2

As I do not have 6.7 I cannot take advantage of the nb.FileChooser.useShellFolder=false http://wiki.netbeans.org/FaqWindowsCPU   

I have found that building with 1.6.0_10 and running in 1.6.0_18 is by-passing this problem - even though some other side-effects do happen, but at least not a NPE. Building my app with 1.6.0_18 and running in 1.6.0_18 is failing with the NPE below just by initially opening the Project lists (very similar as reported by other NetBeans based apps like:  https://www.chemaxon.com/forum/ftopic6197.html

Windows 7 support was from 1.6.0_14 and Firefox 3.5.1 support from 1.6.0_16. 

It turns out version 1.6.0_16 works perfect ! I stick to that until this Java bug has been fixed (on Windows)

B-)






java.lang.NullPointerException
	at java.awt.image.BufferedImage.setRGB(BufferedImage.java:1013)
	at sun.awt.shell.Win32ShellFolderManager2.getStandardViewButton(Win32ShellFolderManager2.java:96)
	at sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.java:300)
	at sun.awt.shell.ShellFolder.get(ShellFolder.java:227)
	at com.sun.java.swing.plaf.windows.WindowsLookAndFeel$LazyWindowsIcon.createValue(WindowsLookAndFeel.java:2206)
	at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:199)
	at javax.swing.UIDefaults.get(UIDefaults.java:144)
	at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:47)
	at javax.swing.UIDefaults.getIcon(UIDefaults.java:431)
	at javax.swing.UIManager.getIcon(UIManager.java:704)
	at javax.swing.plaf.basic.BasicFileChooserUI.installIcons(BasicFileChooserUI.java:237)
	at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:219)
	at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:135)
	at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:129)
	at javax.swing.JComponent.setUI(JComponent.java:662)
	at javax.swing.JFileChooser.updateUI(JFileChooser.java:1763)
	at javax.swing.JFileChooser.setup(JFileChooser.java:360)
	at javax.swing.JFileChooser.<init>(JFileChooser.java:333)
	at javax.swing.JFileChooser.<init>(JFileChooser.java:286)
	at org.netbeans.modules.project.ui.ProjectChooserAccessory$ProjectFileChooser.<init>(ProjectChooserAccessory.java:525)
	at org.netbeans.modules.project.ui.ProjectChooserAccessory$ProjectFileChooser.<init>(ProjectChooserAccessory.java:525)
	at org.netbeans.modules.project.ui.ProjectChooserAccessory.createProjectChooser(ProjectChooserAccessory.java:469)
	at org.netbeans.modules.project.ui.actions.OpenProject.actionPerformed(OpenProject.java:78)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.Component.processMouseEvent(Component.java:6263)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6028)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4460)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 18 tomwheeler 2010-07-14 16:01:17 UTC
I have verified that installing JDK 1.6.0u21 fixes the underlying issue (JDK bug #1.6.0u21).  I did so using the following environment:


Product Version: NetBeans IDE Dev (Build NB-Core-Build-4862-on-100712)
Java: 1.6.0_21; Java HotSpot(TM) Client VM 17.0-b16
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 19 bruehlicke 2012-05-11 13:53:54 UTC
Just got the same error back when using 1.6.0_26 or latest 1.6.0_31 on xp 32 bit. I am still on Nb 6.5 and cannot take advantage of
nb.FileChooser.useShellFolder=false  as stated in http://wiki.netbeans.org/FaqWindowsCPU   

have to go back to 1.6.0_16 for 32 bit. Looks like 1.6.0_31 works for 64 bit Windows 7.