SWT GTK 64 bit and UBUNTU 11.04 NPE [message #731044] |
Thu, 29 September 2011 18:50 |
Rodrigo Garcia 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03473 seconds