Bug 91464 - [content assist] NPE in CompletionProposalPopup
Summary: [content assist] NPE in CompletionProposalPopup
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: Macintosh All
: P1 major (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 91576 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-14 17:07 EDT by Kevin Barnes CLA
Modified: 2005-04-19 09:03 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Barnes CLA 2005-04-14 17:07:36 EDT
Getting a lot of these when using content assist today.

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:2931)
at org.eclipse.swt.SWT.error(SWT.java:2854)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:121)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2834)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2615)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:316)
at org.eclipse.core.launcher.Main.basicRun(Main.java:269)
at org.eclipse.core.launcher.Main.run(Main.java:948)
at org.eclipse.core.launcher.Main.main(Main.java:932)
Caused by: java.lang.NullPointerException
at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.setProposals(CompletionProposalPopup.j
ava:623)
at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$13(CompletionProposalPopup.jav
a:580)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:
235)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopu
p.java:211)
at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:319)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:118)
... 18 more
Comment 1 Dani Megert CLA 2005-04-15 03:14:59 EDT
And what build are you using today ;-)
Any steps? Where did you invoke code assist?
Comment 2 Kevin Barnes CLA 2005-04-15 10:15:37 EDT
builds I20050414-1107 and I20050413-0910
code assist in any source viewer a few times and an error dialog will popup with the message "The 
command for the key you pressed failed." The NPE will be logged and code assist won't work in that 
viewer again until you reopen it.
Comment 3 Dani Megert CLA 2005-04-15 10:20:59 EDT
With "source viewer" you mean Java editor, right?
Comment 4 Kevin Barnes CLA 2005-04-15 10:26:11 EDT
yes.
Comment 5 Kevin Barnes CLA 2005-04-15 10:50:15 EDT
I should also note that I don't get the NPE on windows.
Comment 6 Dani Megert CLA 2005-04-15 11:59:52 EDT
.
Comment 7 Dani Megert CLA 2005-04-15 16:39:39 EDT
*** Bug 91576 has been marked as a duplicate of this bug. ***
Comment 8 Channing Walton CLA 2005-04-16 13:17:05 EDT
I'm also getting this same error but it not limited to Java editors. I am seeing the same error on other 
editors supporting completion.

OSX 10.3.9
Version: 3.1.0
Build id: I20050414-1107
Comment 9 Tom Hofmann CLA 2005-04-18 06:04:20 EDT
The NPE happens when accessing an array element of the current
ICompletionProposals. All array elements are guaranteed to be non-null. Since
this only happens on the Mac, I suspect a platform-specific vm (JIT?) bug.

Can you report the VMs you are using? Are there any alternative VMs you could
try, or a way to selectively disable jitting for that class
(org.eclipse.jface.text.contentassist.CompletionProposalPopup)?

Not sure what to here if this is really a VM bug (rearrange code?). Will check
with Andre.
Comment 10 Andre Weinand CLA 2005-04-19 06:35:06 EDT
The implementation of Table.setItemCount() is wrong on Mac: it fails to initilialize the Table's internal 
array of TableItems ("items"), with new TableItems if the table is expanded.
As a consequence Table.getItems() returns an array full of NULLs, which the CompletionProposalPopup 
does not expect.

Moving to SWT.
Comment 11 Billy Biggs CLA 2005-04-19 09:03:45 EDT
Fixed in HEAD.