codingteam / Hyperspace

Simple 2D game written in Clojure and Kotlin.
MIT License
9 stars 4 forks source link

cannot start on osx #15

Closed razum2um closed 9 years ago

razum2um commented 9 years ago

osx10.9, java7/8

$ lein run                                                                                                                                                                                                            
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
Exception in thread "main" 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:94)
    at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:92)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:92)
    at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:66)
    at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:57)
    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.ContextGL.<init>(ContextGL.java:132)
    at org.lwjgl.opengl.Display.create(Display.java:847)
    at org.lwjgl.opengl.Display.create(Display.java:754)
    at org.lwjgl.opengl.Display.create(Display.java:736)
    at hyperspace.ui$setup_ui.invoke(ui.clj:124)
    at hyperspace.ui$start_ui.invoke(ui.clj:154)
    at hyperspace.main$_main.doInvoke(main.clj:7)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at clojure.lang.Var.invoke(Var.java:411)
    at user$eval672.invoke(form-init6915732820426289453.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6511)
    at clojure.lang.Compiler.eval(Compiler.java:6501)
    at clojure.lang.Compiler.load(Compiler.java:6952)
    at clojure.lang.Compiler.loadFile(Compiler.java:6912)
    at clojure.main$load_script.invoke(main.clj:283)
    at clojure.main$init_opt.invoke(main.clj:288)
    at clojure.main$initialize.invoke(main.clj:316)
    at clojure.main$null_opt.invoke(main.clj:349)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
ForNeVeR commented 9 years ago

@rexim, as a famous Mac user you should fix that :3

rexim commented 9 years ago

Hi @razum2um! Thanks for your bug report. I'll try to take a look into it on this weekend. :)

rexim commented 9 years ago

Hi all!

First of all, the issue looks like an lwjgl bug which is fixed on the latest version of lwjgl. To fix our issue we need to repack the latest lwjgl native libs, upload them on clojars and just use them. I used to upload my repacked natives through scp, but they have disabled this feature. So, we have to use lein deploy or maven deploy. Unfortunately, I'm busy on this weekend. Someone may take this issue or I'll simply continue to work on it on Monday.

I've almost reconstructed my script for repacking lwjgl natives. I'll upload it somewhere (or maybe commit it to this repo) by tomorrow.

Also, @razum2um, could you please check if this issue is reproducible with java 6? (don't trust @ForNeVeR, I'm not a mac user!)

Thanks! :)

razum2um commented 9 years ago

runs on 1.6.0_65, thanks @rexim btw, it's not available on oracle.com see http://stackoverflow.com/questions/19533528/installing-java-on-os-x-10-9-mavericks

ForNeVeR commented 9 years ago

You have closed it to early. We still have the issue with JVM7+. And we are not the cocks who support only outdated software. I'm reopening it.

rexim commented 9 years ago

https://github.com/codingteam/lwjgl-clojars-repacker

ForNeVeR commented 9 years ago

Now all we need is to send our package to the clojars repository. I'll try to take a look at it tomorrow.

rexim commented 9 years ago

@ForNeVeR could you please repack jinput 2.0.6 with ru.org.codingteam group id and update the project.clj?

ForNeVeR commented 9 years ago

By the way, you're also a member of ru.org.codingteam on clojars.

rexim commented 9 years ago

you're also a member of ru.org.codingteam on clojars

Didn't even know that they have this feature. Thanks!

ForNeVeR commented 9 years ago

I've updated the master branch with fix. @razum2um, could you please check whether it now runs on OS X?

razum2um commented 9 years ago

works on both 1.7 & 1.8 :+1: