No autorelease pool with JOGL
Asked Answered
Y

2

6

I tried to add JOGL to my project, and after a long time searching the web I found the solution. I added the jars to my buildpath and Eclipse recognizes them.
I wanted to test it, so took the code from here: https://sites.google.com/site/justinscsstuff/jogl-tutorial-2 and compiled.
The AWT-way gives me this result:

2012-06-03 18:20:44.623 java[1481:903] [Java CocoaComponent compatibility mode]: Enabled
2012-06-03 18:20:44.626 java[1481:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2012-06-03 18:20:46.253 java[1481:903] *** __NSAutoreleaseNoPool(): Object 0x102034900 of class NSConcreteMapTableValueEnumerator autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.259 java[1481:903] *** __NSAutoreleaseNoPool(): Object 0x10209e3f0 of class __NSCFDate autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.259 java[1481:903] *** __NSAutoreleaseNoPool(): Object 0x10209cbd0 of class NSCFTimer autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.301 java[1481:d703] *** __NSAutoreleaseNoPool(): Object 0x10015e990 of class NSCFNumber autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.301 java[1481:d703] *** __NSAutoreleaseNoPool(): Object 0x100121720 of class NSConcreteValue autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.302 java[1481:d703] *** __NSAutoreleaseNoPool(): Object 0x10011c2f0 of class NSCFNumber autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.302 java[1481:d703] *** __NSAutoreleaseNoPool(): Object 0x1001ba750 of class NSConcreteValue autoreleased with no pool in place - just leaking
2012-06-03 18:20:46.302 java[1481:d703] *** __NSAutoreleaseNoPool(): Object 0x100157e70 of class NSCFDictionary autoreleased with no pool in place - just leaking

I can't find others with the same problem. I did find others with the same error, but not with the same cause.
The NEWT-way gives me a white square, which 'doesn't respond' and I have to force-stop it (Apple-key + alt + esc).
My cursor changes into a waiting-cursor. Although it's nice designed I'd rather get rid of it.
How should I solve this? I'm using Eclipse on a Mac. OS 10.6.8.

EDIT:

Thanks to Clint the first two lines are gone, but it's still leaking...

EDIT 2:

Solved it!

Yevette answered 3/6, 2012 at 15:17 Comment(2)
can you post more details? especially the code you are using and the command line your are using to run itCloudscape
I'd happily give more details, but I do not know what is causing it, so I didn't know what details to give. But, both things you ask are in the question already. I compile and run via Eclipse, and the code is on the site mentioned in the question. @CloudscapeYevette
Y
1

I got rid of the errors, it was pretty stupid, after all. I found the solution a few days ago already: setting -Djava.awt.headless=true with the java terminal command. But, I did not know how to do this in Eclipse, so I tried putting it into Program Arguments, which is, I now realize, quite stupid. Putting it into JVM Arguments helped and solved the problem, I am now encountering the next. I hope this helps other people having the same problem.

Yevette answered 12/6, 2012 at 19:33 Comment(0)
J
4

If you have swt.jar in your classpath and are not using it, you should remove it.

Juniorjuniority answered 6/6, 2012 at 20:12 Comment(3)
I will try this this afternoon. But why is this?Yevette
It DID work partially. It shows me a frame now, but it gives me the same kind of error messages.Yevette
It does work, as it shows me a frame and the first two lines are gone, but nothing changed further...Yevette
Y
1

I got rid of the errors, it was pretty stupid, after all. I found the solution a few days ago already: setting -Djava.awt.headless=true with the java terminal command. But, I did not know how to do this in Eclipse, so I tried putting it into Program Arguments, which is, I now realize, quite stupid. Putting it into JVM Arguments helped and solved the problem, I am now encountering the next. I hope this helps other people having the same problem.

Yevette answered 12/6, 2012 at 19:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.