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 151122 - NullPointerException at org.netbeans.modules.editor.completion.CompletionLayoutPopup.isEnoughSpace
Summary: NullPointerException at org.netbeans.modules.editor.completion.CompletionLayo...
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-23 11:11 UTC by Jiri Prox
Modified: 2009-02-19 20:45 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 113623


Attachments
stacktrace (1.42 KB, text/plain)
2008-10-23 11:11 UTC, Jiri Prox
Details
stacktrace (31 bytes, text/plain)
2008-11-06 09:17 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-10-23 11:11:32 UTC
Build: NetBeans IDE 6.5 RC1 (Build 200810220101)
VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Linux, 2.6.22-15-generic, i386

User Comments:
jiriprox: NPE when invoking javadoc completion (ctrl-shift-space) on String

gekkothelizard: pressed ENTER in code completion popup window

gekkothelizard: pressed ENTER in code completion popup window

rdelaplante: In orm.xml I pressed enter just before <entity class="...  and then started to type <named-query.  Code completion helped fill in:    <named-query name=""   (no closing bracket yet) then this exception was thrown

GUEST: editing php code

rdelaplante: My line looks like this:

assertTrue(themes.length|)  where | is the cusor.  I think I pressed ctrl-space to get it to complete with ()?

rdelaplante: On a blank line between two methods I typed   this.setUp   and got this exception

gekkothelizard: I pressed ctrl+space.

gekkothelizard: I was just typing some code

gekkothelizard: I was typing

rdelaplante: I was typing as code completion window popped up.  I wanted  .length  so I started to type  lg  which is not correct.  This exception window popped up

gekkothelizard: I was using ctrl+space to complete the name of a method. Aside from the exception everything worked ok.

GUEST: Clicked Show Source option when editing a PHP file. I was on a blank line if that matters.

GUEST: Clicked Show Documentation option from Source menu in a PHP file. This exception gets thrown anywhere on the page it seems.

GUEST: pressed Ctrl+Shift+Space in line
if(strpos($_SERVER['HOSTNAME']|))

with cursor in '|' position

jiriprox: NPE when invoking javadoc completion (ctrl-shift-space) on String



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.editor.completion.CompletionLayoutPopup.isEnoughSpace(CompletionLayoutPopup.java:451)
        at org.netbeans.modules.editor.completion.CompletionLayoutPopup.showAlongOrNextOccupiedBounds(CompletionLayoutPopup.java:380)
        at org.netbeans.modules.editor.completion.CompletionLayout.updateLayout(CompletionLayout.java:279)
        at org.netbeans.modules.editor.completion.CompletionLayout$DocPopup.show(CompletionLayout.java:438)
        at org.netbeans.modules.editor.completion.CompletionLayout.showDocumentation(CompletionLayout.java:175)
        at org.netbeans.modules.editor.completion.CompletionImpl$8.run(CompletionImpl.java:1007)
Comment 1 Jiri Prox 2008-10-23 11:11:52 UTC
Created attachment 72526 [details]
stacktrace
Comment 2 Jiri Prox 2008-10-23 11:13:16 UTC
Steps to reproduce:
1) set javadoc completion to be displayed new to CC window 
2) put caret over String
3) invoke javadoc completion (ctrl-shift-space)
Comment 3 Vitezslav Stejskal 2008-10-23 12:48:43 UTC
Reproducible in a dev build. Should this be fixed for 6.5?
Comment 4 Jiri Prox 2008-10-23 12:52:57 UTC
No, it is enough to fix this to 7.0,
I suppose the fix won't be dangerous, so this is imho good candidate for the patch
Comment 5 Jiri Prox 2008-11-06 09:17:20 UTC
Build: NetBeans IDE Dev (Build 081105)
VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Linux, 2.6.22-15-generic, i386

User Comments: 


Stacktrace: 
java.lang.NullPointerException
Comment 6 Jiri Prox 2008-11-06 09:17:31 UTC
Created attachment 73352 [details]
stacktrace
Comment 7 pgebauer 2008-11-24 09:31:20 UTC
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
Comment 8 Dusan Balek 2008-11-24 13:14:11 UTC
Fixed.

changeset 911aba6eb8fc in main
details: http://hg.netbeans.org/main?cmd=changeset;node=911aba6eb8fc
Comment 9 Jiri Prox 2009-01-13 10:23:27 UTC
verified in
Product Version: NetBeans IDE Dev (Build 20090112033331)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)
Comment 10 pgebauer 2009-01-13 15:09:42 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/0fbca1b720d5