Can't get my app to run on OSX 10.8 even with latest Java version installed

Hi, I’ve been developping on JME3 for 4-5 months now part time and I’m quite happy with what I did so far, works great on PC, but I could NEVER EVER get my applications to run on MAC OS X 10.8 on an iMac 27" Titanium. Anybody would care to give me things to look for that might prevent my app from running on OSX 10.8? I do not own a Mac but my friend does, so I’ll be on/off trying step by step what people will tell me.

For starters, the app does not open the OpenGL window at all, like nothing. I already tried to install the newest Java version available at http://www.java.com but it doesn’t change anything.

Thx for step by step instructions I can try.

Console output plz, kthx bai.

***** PLEASE NOTE, I MADE A MISTAKE, IT’S OSX 10.6.8 (NOT 10.8) *****

OK, so I have tested on the Mac earlier and this is what happens…

The program immediately crashes with the generic OSX “The application unexpectedly quit.” message and the report contains this:

What to do next in order to make this application work? Any ideas? Things to look at? Common things in JME3 that fail on OSX 10.6? Thanks :stuck_out_tongue:

I think @normen wrote something a few days ago about OSX using OpenGL 2 instead of 3. Maybe that’s the case here?

Nah, I guess its the application wrapper, if you just run the jar file it should work. As so many things changed around Java on OSX we resorted to only support the “new” way. I wasn’t exactly aware that 10.6 fails so hard with the app stub but I guess there isn’t much we can do about it. 10.6 still has the XCode tool to wrap a jar as an application though, so you could use that. But it won’t work for 10.8+

So… are you saying that JME3 is meant to never work on 10.6.8 at all? Also, do you think that if my friend updates to 10.7 or 10.8 it should work?

Not exactly but you can take that as the gist of it.

OK I’ll have her update her OSX tonight and we’ll see. What other recommendation would you guide me through if it doesn’t work besides running the JAR file directly? (which did not work either BTW)

@.Ben. said: OK I'll have her update her OSX tonight and we'll see. What other recommendation would you guide me through if it doesn't work besides running the JAR file directly? (which did not work either BTW)

“did not work” as in exact same errors or “did not work” as in one of many other possible “did not work” conditions?

Uhmmm YEAH… lol not too precise here am I… OK I’ll give more details tonight as I do not own a Mac, but I’ll have her do screenshots and let you guys know for sure.

@normen OK so I updated my friend’s iMac to 10.9.2 today (latest version) and it still crashes with what looks the same information. Why?

Maybe for the same reason that the jar doesn’t work?

OK but why… I mean… it works perfectly on Windows. You first told me it would not run on 10.6 and now that the OSX is updated to 10.9.2 it still doesn’t run. What could be the fix for this? This is the error:

Any common pitfalls on compiling for Mac OSX? What could cause it to crash EVEN BEFORE it opens any window at all? I mean there is nothing, it automatically crashes when double clicking the app. It’s something related to the initialization I guess?

This is my initizalition function in full, maybe somebody could spot something that makes OSX crash?

[java]
public static void main(String[] args) throws IOException {
// Detect screen resolution
GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();

    // Configure app
    AppSettings settings = new AppSettings(true);
    settings.setVSync(false);
    if(device.getDisplayMode().getWidth() > 1280 && device.getDisplayMode().getHeight() > 768){
        settings.setResolution(1280,768);
    }
    else{
        // Find 1280x768 in the available resolutions, else just use the default one
        //settings.setResolution(device.getDisplayMode().getWidth(),device.getDisplayMode().getHeight());
        DisplayMode[] modes = device.getDisplayModes();
        for(DisplayMode m : modes){
            if(m.getWidth() == 1280 && m.getHeight() == 768){
                settings.setResolution(1280, 768);
                settings.setFrequency(m.getRefreshRate());
                settings.setDepthBits(16);
            }
        }
        settings.setFullscreen(true);
    }
    settings.setTitle("Test 8b"); // Uses 1.5GB - 2.6GB?
    //settings.setFrameRate(60);
    
    BufferedImage[] icons = new BufferedImage[] {
        ImageIO.read( Main.class.getResource("/128.png") ),
        ImageIO.read( Main.class.getResource("/32.png") ),
        ImageIO.read( Main.class.getResource("/16.png") )
    };
    settings.setIcons(icons);
    
    // Mute INFO log messages
    Logger.getLogger("").setLevel(Level.SEVERE);
    
    Main app = new Main();
    app.setShowSettings(false);
    app.setDisplayStatView(false);
    app.setSettings(settings);
    app.start();
    
    Display.setLocation(0, 0);
}

[/java]

If I remember right, you disable the settings dialog on your app. That’s a shame because it would give you an extra debugging point. As it is I’m not sure you can tell if it’s crashing in the launcher itself or when setting up the display.

Someone running my tree editor was not able to run it as an executable but was able to run the jar directly. I don’t know if that’s important to this conversation or not.

1280x768 isn’t a resolution I ever saw on OSX. Generally you can’t just set any resolution, you have to choose one that is supported by the graphics system. As was said, try using the settings window, it will only show compatible resolutions.

OK I’ll try to run the jar itself from the command line and I’ll try to run with the launcher to see if we can discover more details about the error. I’ll post back results. I think this is important for the community to understand why a perfectly functionning app on Windows does not launch on Mac OS X.

@normen Uhm… 1280x768 is the window size. It can be anything, why couldn’t it be 1280x768?

@.Ben. said: @normen Uhm... 1280x768 is the window size. It can be anything, why couldn't it be 1280x768?

Because its an OpenGL surface. Did you try it?

Oh I will once I get my hands on it, maybe tonight, but as said before, I do not own a Mac, but my friend does, so I’ll be sure to try every single trick you guys mentioned and I’ll post results back. It is very much appreciated, we’ll find what’s wrong for sure. At least we know it’s an initialization problem.