[FIXED] OSX / Java 7

Started by normen, August 14, 2012, 17:07:59

Previous topic - Next topic

jamsoft

Here are my crash reports attempting to launch Minecraft under Java 7

------------------ System Specs ------------------
Operating System: Mac OS X 10.8.2 (Darwin 12.2.0 x86_64)
Java Version: 1.7.0_13
Minecraft Version: 1.4.7
--------------------------------------------------

LWJGL Version: 2.4.2 (Minecraft's default)
----------------- Console Log ------------------
Instance started with command:
"/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/bin/java"  -Xdock:icon=icon.png -Xdock:name="MultiMC: Minecraft 1.4.7 (Java 7)" -Xms1024m -Xmx1536m -jar MultiMCLauncher.jar  "<username>" "<session ID>" "MultiMC: Minecraft 1.4.7 (Java 7)" "854x480" "Mojang"

Loading jars...
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/minecraft.jar
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/lwjgl.jar
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/lwjgl_util.jar
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/jinput.jar
Loading natives...
Fixed Minecraft Path: Field was private static java.io.File net.minecraft.client.Minecraft.an
Launching with applet wrapper...
27 achievements
210 recipes
Setting user: <username>, <session ID>
LWJGL Version: 2.4.2
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
org.lwjgl.LWJGLException: Could not get the JAWT interface
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:49)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:89)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:86)
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:64)
	at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:53)
	at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
	at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
	at org.lwjgl.opengl.MacOSXContextImplementation.create(MacOSXContextImplementation.java:47)
	at org.lwjgl.opengl.Context.<init>(Context.java:120)
	at org.lwjgl.opengl.Display.create(Display.java:858)
	at org.lwjgl.opengl.Display.create(Display.java:784)
	at net.minecraft.client.Minecraft.a(SourceFile:223)
	at asq.a(SourceFile:56)
	at net.minecraft.client.Minecraft.run(SourceFile:515)
	at java.lang.Thread.run(Thread.java:722)
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
org.lwjgl.LWJGLException: Could not get the JAWT interface
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:49)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:89)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:86)
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:64)
	at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:53)
	at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
	at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
	at org.lwjgl.opengl.MacOSXContextImplementation.create(MacOSXContextImplementation.java:47)
	at org.lwjgl.opengl.Context.<init>(Context.java:120)
	at org.lwjgl.opengl.Display.create(Display.java:858)
	at org.lwjgl.opengl.Display.create(Display.java:784)
	at org.lwjgl.opengl.Display.create(Display.java:765)
	at net.minecraft.client.Minecraft.a(SourceFile:232)
	at asq.a(SourceFile:56)
	at net.minecraft.client.Minecraft.run(SourceFile:515)
	at java.lang.Thread.run(Thread.java:722)


LWJGL Version: 2.8.5 (kappa's latest experimental build as of 2/17/13)
----------------- Console Log ------------------
Instance started with command:
"/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/bin/java"  -Xdock:icon=icon.png -Xdock:name="MultiMC: Minecraft 1.4.7 (Java 7)" -Xms1024m -Xmx1536m -jar MultiMCLauncher.jar  "<username>" "<session ID>" "MultiMC: Minecraft 1.4.7 (Java 7)" "854x480" "Mojang"

Loading jars...
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/minecraft.jar
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/lwjgl.jar
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/lwjgl_util.jar
Loading URL: file:/Applications/Games/MultiMC.app/Contents/Resources/instances/Minecraft%201.4.7%20(Java%207)/minecraft/bin/jinput.jar
Loading natives...
Fixed Minecraft Path: Field was private static java.io.File net.minecraft.client.Minecraft.an
Launching with applet wrapper...
27 achievements
210 recipes
Setting user: <username>, <session ID>
LWJGL Version: 2.8.5
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
org.lwjgl.LWJGLException: Could not get the JAWT interface
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:51)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:91)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:89)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:89)
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:66)
	at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:64)
	at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
	at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
	at org.lwjgl.opengl.MacOSXDisplay.createWindow(MacOSXDisplay.java:136)
	at org.lwjgl.opengl.Display.createWindow(Display.java:303)
	at org.lwjgl.opengl.Display.create(Display.java:845)
	at org.lwjgl.opengl.Display.create(Display.java:754)
	at net.minecraft.client.Minecraft.a(SourceFile:223)
	at asq.a(SourceFile:56)
	at net.minecraft.client.Minecraft.run(SourceFile:515)
	at java.lang.Thread.run(Thread.java:722)
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
org.lwjgl.LWJGLException: Could not get the JAWT interface
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:51)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:91)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:89)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:89)
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:66)
	at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:64)
	at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
	at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
	at org.lwjgl.opengl.MacOSXDisplay.createWindow(MacOSXDisplay.java:136)
	at org.lwjgl.opengl.Display.createWindow(Display.java:303)
	at org.lwjgl.opengl.Display.create(Display.java:845)
	at org.lwjgl.opengl.Display.create(Display.java:754)
	at org.lwjgl.opengl.Display.create(Display.java:736)
	at net.minecraft.client.Minecraft.a(SourceFile:232)
	at asq.a(SourceFile:56)
	at net.minecraft.client.Minecraft.run(SourceFile:515)
	at java.lang.Thread.run(Thread.java:722)

Bo98

Great work, also good to see that the resize issue (which I had experienced since LWJGL 2.8.0) is fixed.

Everything is working great here. If you want to be picky then there is a couple of small issues/annoyances.


  • Window resize is noticeably slower than previous LWJGL versions (in my case since it was broken throughout 2.8 until now, 2.7 and below on Java 6). I feel that it is struggling to keep up with the pace of the animation of maximising the window.
  • Next time you launch the application (in my case, Minecraft), you will a snapshot of the state of the application when it was closed for a second before loading.

These are pretty low priority issues but are the only ones I've noticed so far.

NateS

Quote from: kappa on February 17, 2013, 15:21:21
@NateS - sounds like a driver crash, also came across it during development however did attempt a fix which worked at the time (at least for my driver) however apparently not for that mac user, anyway I've changed the way resizing works now with Display.setParent(), so shouldn't crash anymore.
With this on OSX using setParent, w/ Java 6 there seems to be a resizing issue. If I resize the window manually it works. On Java 7 it crashes. Without setParent it works on both.

Do you not have a Mac? Is this something we can remedy? Is there anything else I can do to help? I really need this to work and dorking around trying to fix Mac stuff, testing, etc causes my productivity to tank. :(

Edit: using latest experimental it crashes when I close the window on OSX, Java 7, no setParent:
http://pastebin.com/MCPSyxAV
http://pastebin.com/d9LzqcC6

kappa

@NateS thx for the close window crash reports, will have a look at getting that fixed for next update.

I had a go at running the Spine demo with the OS X experimental build but couldn't reproduce the resizing issues on Java 6, it all seemed to run nicely. Do have any more info on how to reproduce the resizing issue with setParent on Java 6, you mentioned that it works if resizing manually, what other methods of resizing are you using?

Quote from: NateS on February 19, 2013, 19:05:52
Do you not have a Mac? Is this something we can remedy? Is there anything else I can do to help?
Unfortunately the main problem is lack of time atm and only being able to hack at LWJGL for very short periods of time. Also only have OS X 10.6 atm once I get hold of a newer version of OS X will have a look into the Java 7/setParent issue.

NateS

Spine has two modes, the default on OSX currently being to run without setParent. To run it with setParent so you can see the crash and resizing issues, start it like this:
open -n ./Spine.app --args frameless


Can I buy you the latest OSX? Or link you to a torrent? ;) I'd offer to buy you a beer but don't want to cloud your coding skills until after you're done. ;) :D

Freezerburn

Quote from: NateS on February 20, 2013, 00:21:28
Spine has two modes, the default on OSX currently being to run without setParent. To run it with setParent so you can see the crash and resizing issues, start it like this:
open -n ./Spine.app --args frameless


Can I buy you the latest OSX? Or link you to a torrent? ;) I'd offer to buy you a beer but don't want to cloud your coding skills until after you're done. ;) :D
Obviously you don't read XKCD: http://xkcd.com/323/

Also I'd like to throw in my own report that with the latest experimental of LWJGL I'm still getting the "Could not get the JAWT interface" error when I replace lwjgl.jar and the jnilib with the experimental version on OS X 10.8.2. (I'm not sure if it matters, but I don't remove any of the other .jars including AppleJavaExtensions.jar and whatnot, I just rename the old .jar/.jnilib and put the new one in its place) This is when using purely Display.create(), and without setParent. Also when using the experimental LWJGL on Java 6, the VM still crashes, like I reported before.

normen

I was testing the latest version with jME application and it seems to work fine, for the SDK / canvas I get a similar exception as above, it ca be replicated with jME3's jme3test.canvas.TestCanvas test class. Looks like you're close though :)

JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
SEVERE Application 20:53:27 Failed to initialize OpenGL context
org.lwjgl.LWJGLException: Could not get the JAWT interface
   at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
   at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:51)
   at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:91)
   at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:89)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:89)
   at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:66)
   at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:64)
   at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
   at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
   at org.lwjgl.opengl.MacOSXDisplay.createWindow(MacOSXDisplay.java:136)
   at org.lwjgl.opengl.Display.createWindow(Display.java:303)
   at org.lwjgl.opengl.Display.create(Display.java:845)
   at org.lwjgl.opengl.Display.create(Display.java:754)
   at com.jme3.system.lwjgl.LwjglCanvas.createContext(LwjglCanvas.java:468)
   at com.jme3.system.lwjgl.LwjglCanvas.restoreCanvas(LwjglCanvas.java:267)
   at com.jme3.system.lwjgl.LwjglCanvas.runLoop(LwjglCanvas.java:196)
   at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
   at java.lang.Thread.run(Thread.java:722)

ariejan

Just here to say thanks for your hard work. Carry on. ;)

refD

Quote from: kappa on February 16, 2013, 01:00:19
@refD - Mouse grabbing should be slightly improved now, do let know if you still have issues with it. There is a fix for a resizing problem, do test latest binary to see if you still get the issues you reported.

Resizing is fixed, it no longer gets stuck.

Mouse grabbing & full screen issues persist.

Thanks for the update!


NateS

When connected to an external display, users report resizing via the green window button sometimes causes the display to mess up.
http://imgur.com/a/n2Gge
This is on a 15" Retina MacBook Pro with both Java 1.6.0_41 and also Java 7u15. An external Thunderbolt display is being used. When not plugged into the external monitor the problem does not occur.

pizza2004

I was searching around to see if there was a way to fix the error NateS and I seem to be getting about JAWT.  I found this thread: http://lwjgl.org/forum/index.php?topic=4326.0  And what Dan said made me attempt to compile the natives on my own 10.7.5 computer to see if it would indeed fix the problem.  I don't know if it's because I don't have his 'hacks' or just because I didn't set it up right, but even when I did manage to get it to compile against the JDK for 7 it still gave me the exact same error.  Perhaps there's something to that though, I definitely think Kappa needs to get at least Lion, or Mountain Lion if he can ASAP so that he can test it with Java 7 himself.  NateS, if you'll get that for him like you offered that would be great.

NateS

Yeah, I'd really like this to work. I'd get him a newer version of OSX, a (clean) hooker, whatever it takes, seriously! :)

A user has reported ctrl+? hotkeys sometimes don't work. Not sure if this is related to the fix in the latest LWJGL? When will the new Mac stuff be merged with the latest?

Grum

This could easily be because you're using a parented window and the parent eating those keypresses?
Also there could be global shortcuts setup so the keypresses simply do not reach your application.

Do they happen to be normal shortcuts the OS uses? like CTRL-C/V/A/X etc? :D

NateS

The user says ctrl+z and ctrl+s, but that they don't work most of the time. If he presses them many times eventually it works once.

pizza2004

I've done it!  It took me an entire day of messing with the files, and it doesn't actually work well at all, but I was indeed able to compile it in a way that I could run it using Java 7!  The downside to the way I did it being that it broke support for Java 6.  Anyway, This brings up the next point.  Fullscreen mode seemed to work fine other than being extremely slow, but Windowed mode was just black until I resized the window, and then it had weird problems with not aligning properly, and not detecting the size of the window properly.  Plus the entire time I had it running it was just spewing out memory leaks or something to the console, which is definitely not a good sign.  Anyway, what I had to do was modify it so it was looking at the libjawt.dylib and libawt.dylib instead of the JavaVM.framework, and that finally made it work, although Java 7 only comes in 64bit on Mac, so I'm not entirely sure how that should be handled.  So yeah, I'd say we need to get Kappa a newer version of Mac so that we can have someone competent hacking at it instead of me. :P