Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Combobox null pointer exception on unselect
Combobox null pointer exception on unselect [message #174114] Tue, 29 March 2005 08:39 Go to next message
Roberto is currently offline RobertoFriend
Messages: 42
Registered: July 2009
Member
Hi all,
I found bad NullPointerException in my editor: 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.
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: Combobox null pointer exception on unselect [message #174254 is a reply to message #174114] Tue, 29 March 2005 16:43 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Have you tried looking at the code and checking to see what is null?

"Roberto Genini" <roberto.genini@icimsi.ch> wrote in message
news:opsod40wl171gv6x@news.eclipse.org...
> Hi all,
> I found bad NullPointerException in my editor: 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.
> 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: Combobox null pointer exception on unselect [message #174437 is a reply to message #174254] Wed, 30 March 2005 08:23 Go to previous messageGo to next message
Roberto is currently offline RobertoFriend
Messages: 42
Registered: July 2009
Member
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.

Can you reproduce the problem?

On Tue, 29 Mar 2005 11:43:34 -0500, Pratik Shah <ppshah@us.ibm.com> wrote:

> Have you tried looking at the code and checking to see what is null?
>
Re: Combobox null pointer exception on unselect [message #174509 is a reply to message #174114] Wed, 30 March 2005 15:12 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

CCombo in an SWT control. Please post on the SWT newsgroup.

"Roberto Genini" <roberto.genini@icimsi.ch> wrote in message
news:opsod40wl171gv6x@news.eclipse.org...
> Hi all,
> I found bad NullPointerException in my editor: 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.
> 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
Previous Topic:ComboBoxCellEditor position
Next Topic:GEF Table first release
Goto Forum:
  


Current Time: Sat Apr 27 00:39:19 GMT 2024

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

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

Back to the top