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 116592 - NPE at javax.swing.ScrollPaneLayout.preferredLayoutSize()
Summary: NPE at javax.swing.ScrollPaneLayout.preferredLayoutSize()
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL: http://statistics.netbeans.org/except...
Keywords: REGRESSION, RELNOTE
: 116775 123044 124958 134257 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-24 23:54 UTC by _ gtzabari
Modified: 2011-04-25 03:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 4192


Attachments
stacktrace (2.56 KB, patch)
2007-09-24 23:54 UTC, _ gtzabari
Details | Diff
stacktrace (2.56 KB, text/plain)
2007-09-25 00:01 UTC, _ gtzabari
Details
stacktrace (2.56 KB, text/plain)
2007-10-03 08:38 UTC, egiraudy
Details
stacktrace (2.56 KB, text/plain)
2007-10-09 06:41 UTC, egiraudy
Details
stacktrace (2.53 KB, text/plain)
2008-02-13 03:49 UTC, grimlock81
Details
OpenJDK Fix (1.75 KB, text/plain)
2008-04-08 12:53 UTC, lemmy01
Details
stacktrace (2.65 KB, text/plain)
2008-05-22 10:38 UTC, kduz0
Details
stacktrace (2.65 KB, text/plain)
2008-05-22 10:39 UTC, kduz0
Details
stacktrace (2.84 KB, text/plain)
2008-06-12 05:06 UTC, irex
Details
stacktrace (2.62 KB, text/plain)
2008-06-12 05:14 UTC, irex
Details
stacktrace (2.65 KB, text/plain)
2008-07-04 05:18 UTC, marcelosouza_tk
Details
stacktrace (2.52 KB, text/plain)
2008-07-06 15:58 UTC, cfrias
Details
stacktrace (2.65 KB, text/plain)
2008-07-30 21:41 UTC, jimyjoshi
Details
stacktrace (2.65 KB, text/plain)
2008-08-01 02:42 UTC, jimyjoshi
Details
stacktrace (2.65 KB, text/plain)
2008-08-10 12:02 UTC, sreimers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2007-09-24 23:54:55 UTC
Build: NetBeans IDE Dev (Build 200709200000)
VM: Java HotSpot(TM) Client VM, 11.0-b06
OS: Windows XP, 5.1, x86

User Comments:
Comment 1 _ gtzabari 2007-09-24 23:54:58 UTC
Created attachment 49399 [details]
stacktrace
Comment 2 _ gtzabari 2007-09-25 00:01:23 UTC
Build: NetBeans IDE Dev (Build 200709200000)
VM: Java HotSpot(TM) Client VM, 11.0-b06
OS: Windows XP, 5.1, x86

User Comments: 
Comment 3 _ gtzabari 2007-09-25 00:01:26 UTC
Created attachment 49400 [details]
stacktrace
Comment 4 Jan Lahoda 2007-09-26 07:40:10 UTC
*** Issue 116775 has been marked as a duplicate of this issue. ***
Comment 5 egiraudy 2007-10-03 08:38:12 UTC
Build: NetBeans IDE Dev (Build 200710020000)
VM: Java HotSpot(TM) Client VM, 11.0-b07
OS: Windows XP, 5.1, x86

User Comments: 
in a java source, clicked a hint for auto-fixing some javadocs
Comment 6 egiraudy 2007-10-03 08:38:15 UTC
Created attachment 50063 [details]
stacktrace
Comment 7 egiraudy 2007-10-09 06:41:04 UTC
Build: NetBeans IDE Dev (Build 200710081200)
VM: Java HotSpot(TM) Client VM, 11.0-b07
OS: Windows XP, 5.1, x86

User Comments: 
Comment 8 egiraudy 2007-10-09 06:41:07 UTC
Created attachment 50462 [details]
stacktrace
Comment 9 egiraudy 2007-10-22 11:51:36 UTC
I made some testing with build 200710211200.

The issue occurs with JDK 1.7 b22, but not JDK 1.6 u3.

- open a java source file
- add an 'un-used' import
- click the quick fix icon (remove unsued import)
--> OK with JDK 1.6, NPE with JDK 1.7
Comment 10 Jan Lahoda 2007-10-22 13:42:07 UTC
Seems to be a JDK bug:
http://bugs.sun.com/view_bug.do?bug_id=6612531
Comment 11 Jan Lahoda 2007-11-29 12:02:24 UTC
*** Issue 123044 has been marked as a duplicate of this issue. ***
Comment 12 Jan Lahoda 2008-01-09 17:48:05 UTC
*** Issue 124958 has been marked as a duplicate of this issue. ***
Comment 13 rrohm 2008-02-12 17:46:18 UTC
This seems to be an issue again with JDK 1.7 and NB 6.0.1. 
If it actually is a JDK issue and not one with NB, I'd like to suppose a feature that would it make easier to get around
buggy JDK versions: By now it is only posible to change the default JDK in the netbeans.conf. You cannot change it in
the Java platform manager. Changing it in the project properties does not cure the issue. Many users do not know about
editing the netbeans.conf - posts in various forums can be found via google. Please provide a means to change the
DEFAULT java platform from within the java platforms manager dialogue.
Thank you very much in advance!
Comment 14 grimlock81 2008-02-13 03:49:38 UTC
Build: NetBeans IDE 6.0 (Build 200711261600)
VM: Java HotSpot(TM) Client VM, 12.0-b01
OS: Windows XP, 5.1, x86

User Comments: 
Comment 15 grimlock81 2008-02-13 03:49:41 UTC
Created attachment 56568 [details]
stacktrace
Comment 16 Jiri Prox 2008-02-13 07:37:41 UTC
This is a JDK bug, and I hope it will be fixed in final JDK release.
IMO there is enough info about changing the jdk for running IDE + there already enhancement asking for such change: #89304

FAQ page: http://wiki.netbeans.org/FaqJdkHome
Comment 17 lemmy01 2008-04-08 12:53:11 UTC
Created attachment 59823 [details]
OpenJDK Fix
Comment 18 lemmy01 2008-04-08 12:57:06 UTC
Hi,
in the patch for OpenJdk is the GTKComboBox-patch included too.
It's rendered correctly witch this fix.
This patches are in the net long time don't understand why not in openjdk repo.
Comment 19 Jiri Prox 2008-05-05 08:55:31 UTC
*** Issue 134257 has been marked as a duplicate of this issue. ***
Comment 20 oj 2008-05-20 06:55:48 UTC
The bug occurs in a 6.1 again. See my bug reports and log files I submitted. Thanks.
Comment 21 Jiri Prox 2008-05-20 07:50:26 UTC
Which jdk version do you use?

This is not problem in Netbeans code but issue in jdk, so if you're using older jdk than jdk7 (b27) or openjdk6 (b04)
you'll see this bug.
Comment 22 kduz0 2008-05-22 10:38:46 UTC
Created attachment 61742 [details]
stacktrace
Comment 23 kduz0 2008-05-22 10:39:36 UTC
Created attachment 61743 [details]
stacktrace
Comment 24 Jiri Prox 2008-05-22 10:57:33 UTC
I'm sorry, but the provided stack trace does not contain requested, can you provide the whole messages.log please?
It's located in ${userdir}/var . 
Comment 25 irex 2008-06-12 05:06:19 UTC
Created attachment 62715 [details]
stacktrace
Comment 26 irex 2008-06-12 05:14:41 UTC
Created attachment 62716 [details]
stacktrace
Comment 27 marcelosouza_tk 2008-07-04 05:18:34 UTC
Build: NetBeans IDE 6.1 (Build 200805300101)
VM: Java HotSpot(TM) Client VM, 12.0-b01, Java(TM) SE Runtime Environment, 1.7.0-ea-b24
OS: Windows XP, 5.1, x86

User Comments: 
Comment 28 marcelosouza_tk 2008-07-04 05:18:46 UTC
Created attachment 63918 [details]
stacktrace
Comment 29 cfrias 2008-07-06 15:58:31 UTC
Build: NetBeans IDE Dev (Build 200807040005)
VM: IcedTea Client VM, 1.7.0-b21, IcedTea Runtime Environment, 1.7.0-b21
OS: Linux, 2.6.22-15-generic, i386

User Comments: 
Clicking yellow bulb in groovy class, inside a grails project.
Comment 30 cfrias 2008-07-06 15:58:36 UTC
Created attachment 63973 [details]
stacktrace
Comment 31 jimyjoshi 2008-07-30 21:40:52 UTC
Build: NetBeans IDE 6.1 (Build 200805300101)
VM: IcedTea Client VM, 1.7.0-b21, IcedTea Runtime Environment, 1.7.0-b21
OS: Linux, 2.6.25.10-47.fc8, i386

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:495)
        at java.awt.Container.preferredSize(Container.java:1670)
        at java.awt.Container.getPreferredSize(Container.java:1655)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1646)
        at org.netbeans.modules.editor.hints.borrowed.ScrollCompletionPane.<init>(ScrollCompletionPane.java:104)
        at org.netbeans.modules.editor.hints.HintsUI.showPopup(HintsUI.java:284)
Comment 32 jimyjoshi 2008-07-30 21:41:03 UTC
Created attachment 66118 [details]
stacktrace
Comment 33 jimyjoshi 2008-08-01 02:42:04 UTC
Build: NetBeans IDE 6.1 (Build 200805300101)
VM: IcedTea Client VM, 1.7.0-b21, IcedTea Runtime Environment, 1.7.0-b21
OS: Linux, 2.6.25.10-47.fc8, i386

User Comments: 
this happens on a fedora 8 machine when i click on the hint icon

Stacktrace: 
java.lang.NullPointerException
        at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:495)
        at java.awt.Container.preferredSize(Container.java:1670)
        at java.awt.Container.getPreferredSize(Container.java:1655)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1646)
        at org.netbeans.modules.editor.hints.borrowed.ScrollCompletionPane.<init>(ScrollCompletionPane.java:104)
        at org.netbeans.modules.editor.hints.HintsUI.showPopup(HintsUI.java:284)
Comment 34 jimyjoshi 2008-08-01 02:42:08 UTC
Created attachment 66239 [details]
stacktrace
Comment 35 sreimers 2008-08-10 12:02:20 UTC
Build: NetBeans IDE Dev (Build 20080808175500)
VM: Java HotSpot(TM) Client VM, 12.0-b01, Java(TM) SE Runtime Environment, 1.7.0-ea-b24
OS: Windows XP, 5.1, x86

User Comments: 
Clicking on quick fix

Stacktrace: 
java.lang.NullPointerException
        at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:494)
        at java.awt.Container.preferredSize(Container.java:1669)
        at java.awt.Container.getPreferredSize(Container.java:1654)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1645)
        at org.netbeans.modules.editor.hints.borrowed.ScrollCompletionPane.<init>(ScrollCompletionPane.java:110)
        at org.netbeans.modules.editor.hints.HintsUI.showPopup(HintsUI.java:277)
Comment 36 sreimers 2008-08-10 12:02:37 UTC
Created attachment 66968 [details]
stacktrace
Comment 37 Marian Mirilovic 2008-08-28 22:56:55 UTC
140 duplicates so far ... reported also against NB 6.5 Beta
Comment 38 _ gtzabari 2008-08-28 23:02:38 UTC
Guys, this bug is fixed in JDK 7.0 b27. If you are running an older version (and I see many of you are) then you
absolutely must upgrade. There is no point fixing anything in Netbeans if your JDK is out of date. Please upgrade and
let us know if you can still reproduce this issue. The latest JDK version is b33: http://download.java.net/jdk7/binaries/
Comment 39 Marian Mirilovic 2008-08-28 23:08:20 UTC
Ok, Gili thanks for additional informations -> Candidate for NB 6.5 Release Notes