[e-lang] Problems with E + SWT on Mac OS X

Thomas Leonard tal at it-innovation.soton.ac.uk
Tue Oct 20 11:44:38 EDT 2009


I'm trying to get E used a bit more widely here, but our Mac user
(10.6.1, Snow Leopard, Java 1.6, 32-bit x86) gets this error (many
hundreds of lines):

2009-10-20 16:30:24.779 java[3000:8a03] *** __NSAutoreleaseNoPool():  
Object 0x12047a0 of class NSCFString autoreleased with no pool in  
place - just leaking
2009-10-20 16:30:24.783 java[3000:8a03] *** __NSAutoreleaseNoPool():  
Object 0x120af20 of class NSCFNumber autoreleased with no pool in  
place - just leaking
2009-10-20 16:30:24.783 java[3000:8a03] *** __NSAutoreleaseNoPool():  
Object 0x10cdb0 of class NSCFString autoreleased with no pool in place  
- just leaking
2009-10-20 16:30:24.794 java[3000:8a03] *** __NSAutoreleaseNoPool():  
Object 0xa0163238 of class NSCFString autoreleased with no pool in  
place - just leaking

This happens when running any SWT program, even one that just does:

println("hello")

For programs that are supposed to open a window, "SWT" appears in the
bar at the top of the screen but no window appears.

We also tried using SWT manually, like this:

def SWT := <unsafe:org.eclipse.swt.makeSWT>
def makeDisplay := <unsafe:org.eclipse.swt.widgets.makeDisplay>
def makeShell := <unsafe:org.eclipse.swt.widgets.makeShell>
def makeText := <unsafe:org.eclipse.swt.widgets.makeText>

def display := makeDisplay()
def shell := makeShell(display)

def helloWorldTest := makeText(shell, SWT.getNONE())
helloWorldTest.setText("Hello World SWT")
helloWorldTest.pack()

shell.pack()
shell.open()
while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
                display.sleep()
        }
}
display.dispose()

This opens the window, but you get a spinning busy cursor if you move
the mouse over it and the errors still appear.

Running the equivalent Java program from Eclipse works fine.

Does this work for other people?

Thanks,


-- 
Dr Thomas Leonard
IT Innovation Centre
2 Venture Road
Southampton
Hampshire SO16 7NP

Tel: +44 0 23 8076 0834
Fax: +44 0 23 8076 0833
mailto:tal at it-innovation.soton.ac.uk
http://www.it-innovation.soton.ac.uk 



More information about the e-lang mailing list