Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CCombo null pointer exception on unselect
CCombo null pointer exception on unselect [message #453236] Fri, 01 April 2005 14:58 Go to next message
Roberto is currently offline RobertoFriend
Messages: 42
Registered: July 2009
Member
Hi all,
I am developping an editor with GEF and I found bad NullPointerException :
while
inside an combobox cell editor whith the values list opened, if I click in
the C++ explorer on a project, a folder or a file the following exception
raise (partial stak trace):

java.lang.NullPointerException
at org.eclipse.swt.custom.CCombo.dropDown(CCombo.java:349)
at org.eclipse.swt.custom.CCombo.popupEvent(CCombo.java:895)
at org.eclipse.swt.custom.CCombo$1.handleEvent(CCombo.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:801)
at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1434)
at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1336)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2969 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1391)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338 )
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Control.forceFocus(Control.java:607)
at org.eclipse.swt.widgets.Control.setFocus(Control.java:2054)
at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:44 7)
at org.eclipse.cdt.internal.ui.cview.CView.setFocus(CView.java: 191)
at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.ja va:471)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at
org.eclipse.ui.internal.WorkbenchPage.activatePart(Workbench Page.java:468)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:2722)

I create the ComboBoxCellEditor to perform a direct edit.
I didn't found a combo box in Logic to test it and I can't found a bug in
bugzilla.

After some debugging I foud folowing: (code snipped from CCombo, lines
around 349)

void dropDown (boolean drop) {
if (drop == isDropped ()) return;
if (!drop) {
348 popup.setVisible (false);
349 text.setFocus();
return;
}

If I set a breakpoint at line 349 the member text is null and this causes
the exception. But more important: the CCombo object (this) at this moment
is disposed. Instead, if I set the breakpoint at line 348, the CCombo is
OK, text is OK and continuing with F8 will not rise the exception.

Note that even with exception my field is updated to the last selected
value as
expected.

What am I doing wrong?

I am using Eclipse 3.0.1 with GEF 3.0.1 on Win 2k

Thanks in advance for any help

Roberto
Re: CCombo null pointer exception on unselect [message #453238 is a reply to message #453236] Fri, 01 April 2005 15:45 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
This looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=89779 . You
can add yourself as a CC to this report to be notified of its progress.

Grant

"Roberto Genini" <roberto.genini@icimsi.ch> wrote in message
news:opsoj6iydr71gv6x@news.eclipse.org...
> Hi all,
> I am developping an editor with GEF and I found bad NullPointerException :
> while
> inside an combobox cell editor whith the values list opened, if I click in
> the C++ explorer on a project, a folder or a file the following exception
> raise (partial stak trace):
>
> java.lang.NullPointerException
> at org.eclipse.swt.custom.CCombo.dropDown(CCombo.java:349)
> at org.eclipse.swt.custom.CCombo.popupEvent(CCombo.java:895)
> at org.eclipse.swt.custom.CCombo$1.handleEvent(CCombo.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:801)
> at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1434)
> at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1336)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:2969 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1391)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338 )
> at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
> at org.eclipse.swt.widgets.Control.forceFocus(Control.java:607)
> at org.eclipse.swt.widgets.Control.setFocus(Control.java:2054)
> at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:44 7)
> at org.eclipse.cdt.internal.ui.cview.CView.setFocus(CView.java: 191)
> at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.ja va:471)
> at
>
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:616)
> at org.eclipse.core.runtime.Platform.run(Platform.java:747)
> at
> org.eclipse.ui.internal.WorkbenchPage.activatePart(Workbench Page.java:468)

> at
>
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:2722)
>
> I create the ComboBoxCellEditor to perform a direct edit.
> I didn't found a combo box in Logic to test it and I can't found a bug in
> bugzilla.
>
> After some debugging I foud folowing: (code snipped from CCombo, lines
> around 349)
>
> void dropDown (boolean drop) {
> if (drop == isDropped ()) return;
> if (!drop) {
> 348 popup.setVisible (false);
> 349 text.setFocus();
> return;
> }
>
> If I set a breakpoint at line 349 the member text is null and this causes
> the exception. But more important: the CCombo object (this) at this moment
> is disposed. Instead, if I set the breakpoint at line 348, the CCombo is
> OK, text is OK and continuing with F8 will not rise the exception.
>
> Note that even with exception my field is updated to the last selected
> value as
> expected.
>
> What am I doing wrong?
>
> I am using Eclipse 3.0.1 with GEF 3.0.1 on Win 2k
>
> Thanks in advance for any help
>
> Roberto
Re: CCombo null pointer exception on unselect [message #453239 is a reply to message #453238] Fri, 01 April 2005 15:58 Go to previous message
Roberto is currently offline RobertoFriend
Messages: 42
Registered: July 2009
Member
Thanks!
What a timing! :-)

Roberto

On Fri, 1 Apr 2005 10:45:29 -0500, Grant Gayed <grant_gayed@ca.ibm.com>
wrote:

> This looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=89779 .
> You
> can add yourself as a CC to this report to be notified of its progress.
>
> Grant
>
Previous Topic:List Viewer and Label Provider
Next Topic:Where can I found more snippets/example/tutor of JFace?
Goto Forum:
  


Current Time: Mon Jul 15 22:33:33 GMT 2019

Powered by FUDForum. Page generated in 0.01845 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top