Resolved Terasology fails to launch

0x0

New Member
Hi :) !

I've got some troubles running Terasology :?

OS :
Mac OSX 10.5.8
Java :


I downloaded the lastest build (141), unzipped it, gave execute authorisation to run_macosx.command with Batchmod, and tried to run the game. Here's the log :

Code:
9 avr. 2012 12:20:31 org.terasology.game.Terasology main
GRAVE: Uncaught Exception
java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
	at org.terasology.game.Terasology.initDisplay(Terasology.java:152)
	at org.terasology.game.Terasology.init(Terasology.java:91)
	at org.terasology.game.Terasology.main(Terasology.java:438)
the web-embedded version won't work either : the game files are in the java cache folder, there's a empty log at the root of my disc, but page stays blank.

Hope you can help =)

PS: I doubt so, but could this do any harm to my java/computer ? i get a little anxious with things i don't understand
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Hello Air / Empty block byte ID! :)

Failed lunches are nothing to worry about, as far as your computer goes. That error sounds like your system picks up a Java default that won't work with Terasology, like that 1.4.2 one.

Try editing run_macosx.command and placing the full path to a Java bin directory in front of the line with "java" on it - the 1.6 one ideally, but try the others too if that doesn't work

And let us know how that goes!
 

begla

Project Founder and Lead Developer
Contributor
Architecture
Logistics
Another thing worth mentioning: OS X defaults to the Java version on top of the list. So moving Java SE 6 (64-bit) to the top of list might be the solution to your problem. I've never tested the game using a JRE less than version 6. :)

Code:
PS: I doubt so, but could this do any harm to my java/computer ? i get a little anxious with things i don't understand
Should be safe!
 

0x0

New Member
First, thanks for the support =D
I think this is what you asked me to do

This edit (as well as putting Java SE6 on top in Java preferences)
Code:
#!/bin/bash
cd "$(dirname "$0")"
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xms128m -Xmx1024m -jar Terasology.jar
gives me this error message :
Code:
9 avr. 2012 16:07:57 org.terasology.logic.manager.Config loadConfig
INFO: Using config file: /Users/************/Desktop/Terasology/SAVED_WORLDS/last.cfg
9 avr. 2012 16:07:57 org.terasology.logic.manager.Config loadConfig
ATTENTION: Could not load config file, that's OK if this is the first execution. /Users/************/Desktop/Terasology/SAVED_WORLDS/last.cfg
9 avr. 2012 16:07:58 org.terasology.game.Terasology main
GRAVE: Uncaught Exception
java.lang.UnsatisfiedLinkError: /Users/************/Desktop/Terasology/natives/macosx/liblwjgl.jnilib:  Symbol not found: _OBJC_CLASS_$_NSOpenGLLayer   Referenced from: /Users/************/Desktop/Terasology/natives/macosx/liblwjgl.jnilib   Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1742)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1045)
	at org.lwjgl.Sys$1.run(Sys.java:73)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
	at org.lwjgl.Sys.loadLibrary(Sys.java:95)
	at org.lwjgl.Sys.<clinit>(Sys.java:112)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
	at org.terasology.game.Terasology.initDisplay(Terasology.java:156)
	at org.terasology.game.Terasology.init(Terasology.java:91)
	at org.terasology.game.Terasology.main(Terasology.java:438)
and this edit gives me the same error as in the previous post
Code:
#!/bin/bash
cd "$(dirname "$0")"
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java -Xms128m -Xmx1024m -jar Terasology.jar
:D
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Oohhh, "GRAVE", I like that as a log level! Much better than boring old "SEVERE" :geek:

Progress has been made, your Java situation is fixed and a-okay now. That issue sounds like it relates to OpenGL not finding some dependency on your OS, which is a first for me but Begla might have a clue since he's got a Mac as well :)

If you'd like to try something in the meantime, Google for ways to test OpenGL or LWJGL on your system, independent of Terasology. I suspect you can fix it by installing some dependency, but I have no clue which - some sort of generic test might be able to sniff that out!
 

0x0

New Member
Found two things

- Opengl Extension Viewer
Here's the report (some parts in french, there's no real english pack in this version, sorry :? i can translate) :






(didn't find software to test lwjgl)

- a thread from January on lwjgl forums, someone experiencing the same problems/messages

If I understand right, my problem might be solved by replacing the lwjgl files in Terasology folders?


(i think i'm gonna learn a programming language, this is fun)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Very nice catch, that thread does seem to describe your problem pretty nicely!

Yes, trying to replace the native lwjgl files as detailed in that thread might do the trick. If a newer version works we might be able to upgrade the bundled natives to let OSX 10.5 work

Might also give the applet a try :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Not at all, I cheated and purely read the linked forum thread :D

By the way, there are more tree houses now! viewtopic.php?f=4&t=250
 

metouto

Active Member
Contributor
Art
I know ... and I am drooling :) or maybe foaming :? at the mouth) ... youtube is blocked here at work :cry: and I have to wait till I get home :(
 

0x0

New Member
Some progress !

I replaced the included "natives" folder with the one found in the latest update of lwjgl (2.8.4 build #1620)
the opengl problem seems solved !
but with the new files there's a version mismatch :

Code:
10 avr. 2012 19:35:31 org.terasology.logic.manager.Config loadConfig
INFO: Using config file: /Users/****************/Desktop/Terasology/SAVED_WORLDS/last.cfg
10 avr. 2012 19:35:31 org.terasology.logic.manager.Config loadConfig
ATTENTION: Could not load config file, that's OK if this is the first execution. /Users/****************/Desktop/Terasology/SAVED_WORLDS/last.cfg
10 avr. 2012 19:35:31 org.terasology.game.Terasology main
GRAVE: Uncaught Exception
java.lang.LinkageError: Version mismatch: jar version is '21', native library version is '23'
	at org.lwjgl.Sys.<clinit>(Sys.java:118)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
	at org.terasology.game.Terasology.initDisplay(Terasology.java:156)
	at org.terasology.game.Terasology.init(Terasology.java:91)
	at org.terasology.game.Terasology.main(Terasology.java:438)
I thought there was somewhere a jlwgl.jar needing to be replaced but couldn't determine wich exactly
I even tried to run the web-embedded Terasology.jar (pic related) with updated libraries, jars and the modded run_macosx.command, but encountered the same error.

At least the icon bounced one time ^^
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Progress indeed! Your newer natives have now fixed that issue, and you are correct that the jar is what needs to be placed somewhere now - namely inside Terasology.jar in the lib directory :)

You can try that but we should probably look to upgrade LWJGL "properly" in the codebase itself. Just need to find the time to plop the new one in there and verify that all still runs well.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Aw, I applied the update locally but it looks like we need to make our own tweaks to be able to use the latest stable LWJGL build (2.8.3) :(

Menu opened fine, but I crashed on the fast-forwarding world step - might need Begla or another 3D wizard to look at this one and find out what we need to tweak to fix it. Probably minor. I tossed the update up on GitHub in its own branch in case somebody wants to try a fix: https://github.com/MovingBlocks/Terasol ... 6e9fbe7ddf

Code:
Apr 11, 2012 11:06:45 PM org.terasology.game.Terasology main
SEVERE: Uncaught Exception
java.lang.IllegalArgumentException: Number of remaining buffer elements is 0, must be at least 1. Because at most 1 elements can be returned, a buffer with at least 1 elements is required, regardless of actual returned element count
	at org.lwjgl.BufferChecks.throwBufferSizeException(BufferChecks.java:162)
	at org.lwjgl.BufferChecks.checkBufferSize(BufferChecks.java:189)
	at org.lwjgl.BufferChecks.checkBuffer(BufferChecks.java:244)
	at org.lwjgl.opengl.GL15.glBufferData(GL15.java:162)
	at org.terasology.logic.manager.VertexBufferObjectManager.bufferVboElementData(VertexBufferObjectManager.java:72)
	at org.terasology.rendering.primitives.ChunkMesh.generateVBO(ChunkMesh.java:160)
	at org.terasology.rendering.primitives.ChunkMesh.generateVBOs(ChunkMesh.java:136)
	at org.terasology.logic.world.Chunk.generateVBOs(Chunk.java:590)
	at org.terasology.rendering.world.WorldRenderer.generateChunk(WorldRenderer.java:695)
	at org.terasology.game.modes.StateSinglePlayer.fastForwardWorld(StateSinglePlayer.java:355)
	at org.terasology.game.modes.StateSinglePlayer.initWorld(StateSinglePlayer.java:315)
	at org.terasology.game.modes.StateSinglePlayer.activate(StateSinglePlayer.java:207)
	at org.terasology.game.Terasology.run(Terasology.java:253)
	at org.terasology.game.Terasology.main(Terasology.java:439)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
AL lib: ReleaseALC: 1 device not closed
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps

0x0

New Member
That was fast :)
It works ! (with the same adjustements to run_macosx.command)

had to crop the window a bit to gain FPS :) better texture and engine than minecraft, same sh*tty hardware :laugh:

The night is definitely scarier :shock:


and I REALLY like the missile tool :twisted:

3 things I couldn't help notice :

- No AZERTY keyboard support (belgium reporting in!)
- my world disappears between each launch, but blocks i've collected seems to remain in my inventory Nevermind, i created a new one with the same name & i got everything back.
- the window doesn't keep its aspect ratio when resized

Again thanks for your support and time :) I'll keep an eye on updates, play a bit and report bugs if needed !

PS: I don't know what you mean by "pull from devellop"
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Top