SOLVED: JME2 + MAC + Helios + SWT(?) = Problems

Hello everybody,



I have been trying to set up JME2 on my Mac system (iMac C2D, 2,66GHz, 4GB RAM, OS X 10.6.3, ATI HD 2600 Pro ), but I fail to get everything running.

What happens is that JME crashes upon executions, "statically", everything is working fine, so no errors in Eclipse etc.

I already searched both this forum and the interwebs for a solution, but I did not find one, which is why I resort to opening this thread.



First, let me tell you what I did so far:

  • I am working with a fresh Eclipse Helios installation (Eclipse SDK, V. 3.6.0, JRE 1.6)
  • Checked out JME2 from SVN repo (http://jmonkeyengine.googlecode.com/svn/trunk)
  • Also checked our JME Physics from SVN (http://jmephysics.googlecode.com/svn)
  • added swt.jar from lib/macosx-carbon to JME build path
  • added native libraries for lwjgl, jogl etc



    As I said, Eclipse does not show any errors, just some warnings.

    When I try to run the 3D software I am supposed to work with, it crashes at startup, with the following console output:


2010-08-25 11:09:27.695 java[597:903] [Java CocoaComponent compatibility mode]: Enabled
2010-08-25 11:09:27.698 java[597:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2010-08-25 11:09:28.897 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1033ad580> '(null)') unlocked when not locked
2010-08-25 11:09:28.898 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:28.899 java[597:c303] *** __NSAutoreleaseNoPool(): Object 0x101e26e70 of class NSCFNumber autoreleased with no pool in place - just leaking
2010-08-25 11:09:29.000 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x101ea2c30> '(null)') unlocked when not locked
2010-08-25 11:09:29.004 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.105 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x101ea3820> '(null)') unlocked when not locked
2010-08-25 11:09:29.106 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.216 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1033ae000> '(null)') unlocked when not locked
2010-08-25 11:09:29.216 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.317 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x101ea3180> '(null)') unlocked when not locked
2010-08-25 11:09:29.318 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.423 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x10330f200> '(null)') unlocked when not locked
2010-08-25 11:09:29.424 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.526 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1033ae430> '(null)') unlocked when not locked
2010-08-25 11:09:29.527 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.628 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1033ae5e0> '(null)') unlocked when not locked
2010-08-25 11:09:29.629 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.730 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1033ae870> '(null)') unlocked when not locked
2010-08-25 11:09:29.731 java[597:c303] *** Break on _NSLockError() to debug.
2010-08-25 11:09:29.833 java[597:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1033ae9d0> '(null)') unlocked when not locked
2010-08-25 11:09:29.834 java[597:c303] *** Break on _NSLockError() to debug.



Upon searching for a solution, I found out that there apparently are some problems with OS X and SWT. However, the standard solution (removing the SWT jar(s) from the build path) is not applicable in my case, since the project I am now working on is based on SWT.
Hence, I tried several different versions of SWT. The first one being the SWT.jar from lib/macosx-carbon. I then tied the fake-swt.jar from macosx-cocoa, but that even gave me static errors.
I then proceeded to download the very latest swt.jar from the eclipse project (3.7M1), both for Cocoa and Carbon. I tried each one of them, but the program still crashes at startup.

I am now officially at my wit's end. Is there still anything that I could do?
Ideas are greatly appreciated!

EDIT: I also tried to run the JME TestChooser, it also gives me an Error log similar to the one I posted above. HOWEVER, the test chooser window gets drawn, at least. I cannot chose any thests, though, as the test chooser is unresponsive.


FINAL EDIT, for further reference for all those that have the same problem
I was able to solve the whole thing in the following way:

- First, remove SWT.jar from build path. Yes, it will cause Eclipse to display a heap of errors. No, it will (most likely) not affect  your project at runtime.
- Second, install the Java package from OS X Leopard as described  here: http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard
- Make sure the "new" JRE is used by your projects. If necessary, adjust your project properties.
- Done. JME should work now.