Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT GTK 64 bit and UBUNTU 11.04 NPE(NPE running standalone SWT application)
SWT GTK 64 bit and UBUNTU 11.04 NPE [message #731044] Thu, 29 September 2011 18:50 Go to next message
Rodrigo Garcia is currently offline Rodrigo GarciaFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I'm currently working in an SWT standalone application. We usually work with windows but I'd like to work in Ubuntu.I set up the following environment.

Ubuntu 11.04 64bit
Java 6 update 27 64 bit
Eclipse JEE 3.5 Galileo 64 bit
I'm using SWT GTK 64 bit

I've got a few classes extending different SWT widgets.

For example

public class MyCombo extends Combo implements CellEditor<Long> {
    private Set<ListenerRef> listeners = new HashSet<ListenerRef>();

@Override
    public void addListener(int eventType, Listener listener) {
        listeners.add(new MyCombo.ListenerRef(eventType, listener));
        super.addListener(eventType, listener);
    }

 @Override
    protected void checkSubclass() {
        // Do nothing
    }
.
.
.



This code works perfectly well in Windows 7 64 bit, running SWT32 bit and java32 bit, from eclipse 32 bit.

In Ubuntu 11.04 I get a NPE (NullPointerException) when trying to add a listener, it seems that the listeners set is null, but it shouldn't cause that set should be initialized as for the code above, and as I say it works in Windows 7

First I had problems running the SWT 32 bit app in Ubuntu64 bit cause there's seem to be a bug when running 32 apps in 64 ubuntu, so I tried to run it with the 64 version, and now I'm getting this error. If I avoid this NPE checking the set, I end up getting a

java.lang.NullPointerException
	at org.eclipse.swt.accessibility.Accessible.isValidThread(Unknown Source)
	at org.eclipse.swt.accessibility.Accessible.checkWidget(Unknown Source)
	at org.eclipse.swt.accessibility.Accessible.addRelation(Unknown Source)


Any ideas of what could be the reason? Are you aware of this problem in previous Ubuntu distrubutions? I don't get this problems in Windows 7, at least running SWT 32 bit

Please let me know if you need more details

Thanks and regards
Re: SWT GTK 64 bit and UBUNTU 11.04 NPE [message #731212 is a reply to message #731044] Fri, 30 September 2011 09:34 Go to previous messageGo to next message
Rodrigo Garcia is currently offline Rodrigo GarciaFriend
Messages: 14
Registered: July 2009
Junior Member
BTW I forgot to say I'm using SWT 3.7 in Linux. and 3.6.2 in Windows
Re: SWT GTK 64 bit and UBUNTU 11.04 NPE [message #735048 is a reply to message #731212] Mon, 10 October 2011 18:42 Go to previous message
Rodrigo  is currently offline Rodrigo Friend
Messages: 2
Registered: February 2010
Junior Member
Any ideas on this please?
Previous Topic:Celleditor alignment in Table
Next Topic:help to get the size of widgets layouted in GridLayout?
Goto Forum:
  


Current Time: Wed Nov 26 21:58:26 GMT 2014

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

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