Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » NullPointer of some paintControl
NullPointer of some paintControl [message #630101] Thu, 30 September 2010 12:06 Go to next message
JIA Pei is currently offline JIA Pei
Messages: 49
Registered: September 2009
Member


Hi, all:

My application runs into the following exception:
It looks like a NullPointer of some paintControl.


Quote:
Exception in thread "main" java.lang.NullPointerException
at com.visionopen.jiapei.sm2d.VO_2DSMExplorer$2.paintControl(VO _2DSMExplorer.java:284)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:217)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1200)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1185)
at org.eclipse.swt.widgets.Control.gtk_expose_event(Control.jav a:2779)
at org.eclipse.swt.widgets.Composite.gtk_expose_event(Composite .java:670)
at org.eclipse.swt.widgets.Canvas.gtk_expose_event(Canvas.java: 170)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1566)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4587 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4191 )
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:75 88)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1185)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Na tive Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS. java:1860)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3110)
at com.visionopen.jiapei.sm2d.VO_2DSMExplorer.start(VO_2DSMExpl orer.java:475)
at com.visionopen.jiapei.sm2d.VO_2DSMExplorer.main(VO_2DSMExplo rer.java:748)



Well, I'm using SWT to draw my GUI, and urgently and sincerely expect some help from you guys. Please do give me a hand.


Best Regards
JIA


Welcome to Vision Open
http://www.visionopen.com
Re: NullPointer of some paintControl [message #630663 is a reply to message #630101] Mon, 04 October 2010 09:52 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
The NPE is happening in
com.visionopen.jiapei.sm2d.VO_2DSMExplorer$2.paintControl(VO
_2DSMExplorer.java:284), which is not part of swt. Can you tell us what in
this line has a null value that shouldn't?

Grant


"JIA Pei" <jp4work@gmail.com> wrote in message
news:i82cdb$aij$1@news.eclipse.org...
>
> Hi, all:
>
> My application runs into the following exception:
> It looks like a NullPointer of some paintControl.
>
>
> Quote:
>> Exception in thread "main" java.lang.NullPointerException
>> at com.visionopen.jiapei.sm2d.VO_2DSMExplorer$2.paintControl(VO
>> _2DSMExplorer.java:284)
>> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe
>> ner.java:217)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1200)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1185)
>> at org.eclipse.swt.widgets.Control.gtk_expose_event(Control.jav a:2779)
>> at org.eclipse.swt.widgets.Composite.gtk_expose_event(Composite
>> .java:670)
>> at org.eclipse.swt.widgets.Canvas.gtk_expose_event(Canvas.java: 170)
>> at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1566)
>> at org.eclipse.swt.widgets.Control.windowProc(Control.java:4587 )
>> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4191 )
>> at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
>> at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:75 88)
>> at org.eclipse.swt.widgets.Display.eventProc(Display.java:1185)
>> at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Na tive
>> Method)
>> at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.
>> java:1860)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3110)
>> at com.visionopen.jiapei.sm2d.VO_2DSMExplorer.start(VO_2DSMExpl
>> orer.java:475)
>> at com.visionopen.jiapei.sm2d.VO_2DSMExplorer.main(VO_2DSMExplo
>> rer.java:748)
>
>
>
> Well, I'm using SWT to draw my GUI, and urgently and sincerely expect some
> help from you guys. Please do give me a hand.
>
>
> Best Regards
> JIA
> --
> Welcome to Vision Open
> http://www.visionopen.com
Previous Topic:Windows CE java.lang.UnsatisfiedLinkError org/eclipse/swt/internal/win32/OS.SetProcessDPIAware()Z
Next Topic:Is there any way to Rotate a widget.
Goto Forum:
  


Current Time: Wed Jul 30 17:16:13 EDT 2014

Powered by FUDForum. Page generated in 0.02101 seconds