StandardGame +JMEDesktopState +Mac not working

We use StandardGame and JMEDesktopState with a Swing GUI in our Project.

Its working fine on Windows and Linux, but we didn't manage to get it working under MAC OS 10.4.9.

The problem can be reproduced with TestJMEDesktopState.

Could anyone else with a Mac try start TestJMEDesktopState and report back if it works or not?

All we get is a white screen, after alt-tabbing to another Application and switching back, the correct Image is displayed but its not responding to Inputs.

We're using the latest jme cvs version.

Another question i have is, do we have to send all calls to Swing Methods to the GameTaskQueueManager ?

GameTaskQueueManager.getManager().update(new Callable<Object>() {
    public Object call() throws Exception {

edit: actually none of the Tests which use JMEDesktopState  is working on Mac  :-o

Hmmm…you might explicitly try setting the L&F to Metal and see if that resolves it?  On the Mac it may default to their internal look & feel which might cause issues, but that's just a guess.

it dosen't matter what look and feel is set, the result is always the same.

As soon as the MenuState is active, it stops responding.

it seems as if the thread which calls update() and render() isn't running anymore or something like that.

Good old Macs. :-p

Sorry, don't know what to tell you.  The only person that might be able to help you is Irrisor.

Do the jME tests for desktop state work ok?

which ones?

as i wrote in the first post, none of the Tests who use JMEDesktopState work on mac.  :frowning:

Sorry, mis-spoke  desktop.  Try TestJMEDesktop.

TestJMEDesktop gives an 'Invalid memory access of location  000001f4 eip=12389750'

Mac OS crash Info:

Thread 1 Crashed:

0  GLEngine                0x1239a750 gleVtxLightRGBABack + 227

1  GLEngine                0x122dd22d gleRenderSmoothTrianglesFunc + 1391

2  GLEngine                0x122d21af gleDrawArraysOrElements_Core + 179

3  GLEngine                0x123569e1 gleDrawArraysOrElements_IMM_Exec + 762

4  libGL.dylib              0x92b26468 glDrawElements + 104

5  <<00000000>> 0x045851d1 0 + 72896977

JME console output:

22.08.2007 17:59:22 start

INFO: Application started.

22.08.2007 17:59:22 com.jme.system.PropertiesIO <init>

INFO: PropertiesIO created

22.08.2007 17:59:22 com.jme.system.PropertiesIO load

INFO: Read properties

22.08.2007 17:59:24 com.jme.input.joystick.DummyJoystickInput <init>

INFO: Joystick support is disabled

22.08.2007 17:59:24 com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

22.08.2007 17:59:24 com.jme.system.lwjgl.LWJGLDisplaySystem getValidDisplayMode

INFO: Selected DisplayMode: 640 x 480 x 32 @0Hz

22.08.2007 17:59:24 com.jme.system.PropertiesIO save

INFO: Saved properties

22.08.2007 17:59:24 initSystem

INFO: jME version 1.0 alpha

22.08.2007 17:59:24 com.jme.renderer.lwjgl.LWJGLRenderer <init>

INFO: LWJGLRenderer created. W:  640H: 480

22.08.2007 17:59:24 initSystem

INFO: Running on: null

Driver version: null

ATI Technologies Inc. - ATI Radeon X1600 OpenGL Engine - 2.0 ATI-1.4.56

22.08.2007 17:59:24 com.jme.renderer.AbstractCamera <init>

INFO: Camera created.

22.08.2007 17:59:24 com.jme.util.lwjgl.LWJGLTimer <init>

INFO: Timer resolution: 1000 ticks per second

22.08.2007 17:59:24 com.jme.scene.Node <init>

22.08.2007 17:59:25 com.jme.scene.Node attachChild

INFO: Child (bottom border) attached to this node (desktop node)

22.08.2007 17:59:25 com.jme.scene.Node attachChild

INFO: Child (left border) attached to this node (desktop node)

22.08.2007 17:59:25 com.jme.scene.Node attachChild

INFO: Child (right border) attached to this node (desktop node)

22.08.2007 17:59:25 com.jme.scene.Node attachChild

INFO: Child (Box) attached to this node (rootNode)

22.08.2007 17:59:25 com.jme.scene.Node attachChild

INFO: Child (cursor) attached to this node (FPS node)

Invalid memory access of location 000001f4 eip=12389750

I just saw that the topic already came up before:

The Hello version crashes as well?


the Hello version does not crash, but it's not responding to any inputs…

So on the Hello version do you see the Swing content?

Yes, i can see the click-me button. But if i press the mouse-button, nothing occurs

Yeah, same on my mac.  Space bar works however.  We've had issues getting this class to work properly on Mac for a long time now though…  :frowning:

perhaps the installation of java 6 beta brings a workaround…

Same problems with Java 1.6 developer preview. sniff.

Current thread (0x02801000):  JavaThread "main" [_thread_in_native, id=25184768]

Stack: [0xb0001000,0xb0801000)

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)

j  org.lwjgl.opengl.GL11.nglDrawElements(IIILjava/nio/Buffer;IJ)V+0

j  org.lwjgl.opengl.GL11.glDrawElements(ILjava/nio/IntBuffer;)V+38

j  com.jme.renderer.lwjgl.LWJGLRenderer.draw(Lcom/jme/scene/batch/TriangleBatch;)V+284

j  com.jme.scene.batch.TriangleBatch.draw(Lcom/jme/renderer/Renderer;)V+31

j  com.jme.renderer.RenderQueue.renderTransparentBucket()V+97

j  com.jme.renderer.RenderQueue.renderBuckets()V+5

j  com.jme.renderer.Renderer.renderQueue()V+9

j  com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer()V+1


j  jmetest.awt.swingui.TestJMEDesktop.main([Ljava/lang/String;)V+25

v  ~StubRoutines::call_stub

Is there a chance that this gets fixed anytime soon, or are we better off using fengGUI ?

IMHO, I would use fengui over jme desktop for most scenarios.

In my opinion I would use neither one in-game.

JMEDesktop is too much of a performance hog and I've got a lot of structural issues with FengGUI.  I haven't gotten around to trying BUI, but that's currently what I'm leaning towards.

i just like JMEDesktop for its simplicity since it uses swing and it looks pretty nice in combination with substance.

we used it only in our Menu GameState, so performance was irrelevant.

but i guess a few ortho quad buttons will also do for a start :slight_smile:

i'll eventualy look into fengGUI or BUI if i have a bit more time.

I think I may have found a bug.  Not sure, though.  Its in JMEDesktop, setFocusOwner:

if ( comp == null || comp.isFocusable() ) {

should probably be more like:

if ( comp == null && comp.isFocusable() ) {

I certainly get more mileage with the JMEDesktop test apps when I make the above change.  I'm running Intel Mac with Java 1.6.0.

Can I claim my first open-source project contribution? ;)

hmm no it has to be an 'or'.

Because if comp is null you cannot access comp.isfocusable() savely.

So comp == null and comp.isFocusable() cannot be right.

In your version you should get a NPE when comp is null.