Mac bug? Or just his machine?

Started by elias4444, January 08, 2005, 15:47:14

Previous topic - Next topic

elias4444

I've got a friend who's been trying to run my game on his Mac (osX). He get's it downloaded via webstart, but then it just quits on him (before even showing the menu for the game - which isn't even an openGL window yet, but I do call lwjgl to get the screen resolution and position the window). He also tried Cas' SuperDudester, but it bombs out on him too (although he's able to play the very fun space-invaders type applet in the browser no problem).

Are others seeing these issues as well? Or does my friend just have a buggy Mac?

I'm wondering if it has something to do with the Mac port of lwjgl, or perhaps if there's something special I have to include in my code just for the Mac. (My game runs on windows and linux no problem, and with both java 1.4.2 and java 5).
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

elias

You need to be more specific. The OS, LWJGL and Java version is helpful, but a proper stack trace of the exception (if any) is best.

- elias

elias4444

I'd love to give you more, but I'm not sure how to collect it without having him install lwjgl manually on his machine and giving him the command to run at the prompt for java (I'm not sure he'd be able to do it). Webstart doesn't return a thing either. He said it just downloads everything, "begins" to launch the program, and then quits.

I'm mostly just curious if anyone else has seen anything similar. It could very possibly be his machine that's the main problem.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

princec

You can get OSX to log stuff to a console file - it's in the Java control panel thingy.

Cas :)

elias4444

Well, I've never used a Mac myself, and apparently, he can't figure out how to load up the Java ControlPanel either.  :?

I'm starting to wonder though, since my games work fine on widows and linux, if the problem is with my method of storing the user preferences. I call the user.home system property, and then create a directory and file structure underneath that.

Does the Mac require anything different from widows and linux for that?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

princec

Yes, as it happens - on OS X, app support data goes thusly:
/**
	 * Get the local app settings dir
	 * @return String
	 */
	private static String getSettingsDir() {
		if (System.getProperty("os.name").startsWith("Mac OS")) {
			return System.getProperty("user.home", "")+"/Library/Application Support";
		} else {
			return System.getProperty("user.home", "");
		}
	}

<edit>Have to add a bit of code for Linux that creates a .<gamename> dir there, as that's how Linuxians do it.

Cas :)

elias4444

Well, I fixed up my code as from above, but he still bombed out. I then had him try one of the games at www.puppygames.net via jnlp, and it bombed out on him too.

So, it's sounding like it may just be his Mac. Do Mac users have to do something special to get webstart working right?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

elias

Seriously, get a stack trace out of it. It'll help you (to fix any game bugs) and/or us (to fix any LWJGL bugs) tremendously.

- elias

elias4444

Got one! I found someone else with a Mac, and they were having the exact same problems with my stuff and the puppygames stuff:

Java Web Start 1.4.2_05 Console, started Wed Jan 12 14:54:12 MST 2005 Java 2 Runtime Environment: Version 1.4.2_05 by Apple Computer, Inc.
Logging to file: /Users/craigmalquist/Desktop/java.txt
apple.awt.EventQueueExceptionHandler Caught Throwable :
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at org.lwjgl.Sys.initialize(Sys.java:129)
    at org.lwjgl.Sys.<clinit>(Sys.java:96)
    at org.lwjgl.opengl.Display.<clinit>(Display.java:93)
    at mainmenu.MainMenu.<init>(MainMenu.java:82)
    at mainmenu.MainMenu$2.run(MainMenu.java:335)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
    at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:234)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:184)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)


It looks to me like the Mac webstart stuff doesn't accept the java.library.path of "." for getting the libraries out of a jar file.

What would the proper syntax/solution be then?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

elias

If it's web start, it has probably something to do with the resources entry:

<resources os="Mac OS X" arch="ppc">
    <j2se version="1.4+"/>
    <nativelib href="native-macosx.jar"/>
</resources>


I'm guessing the os or arch property property is not matching his system. I don't know why though. You can test it by simply removing the properties so it will be used unconditionally. If it works, we just need to find the right combination.

- elias

elias

According to

http://www.vamphq.com/os.html

"Mac OS X" and "ppc" should work just fine. Could you try to print out System.getProperty("os.name") and System.getProperty("os.arch") from his system?

- elias

elias4444

Looks like that did it! Mostly...

He can now load up my JFrame-based start menu (which also uses some lwjgl just for positioning the screen), but he only gets a black window for the OpenGL window (both in fullscreen and windowed mode).
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

elias

What's his OS version? And what's the value of those properties I mentioned?

- elias

elias4444

I'll get you the info as soon as I can. The guy I usually bother doesn't know much about his Mac, and isn't local, so I can't get too much info from him except if it works or not. The other guy (who's a Mac expert) I only see a couple of times a week.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

gregorypierce

I can help you. I have several Apples of various vintiges at home. Send me a private message and I'll help you out. I don't bomb out on any of the puppygames.net files so I can probably identify the problem for you pretty quickly.