Hello Guest

[RFE] LWJGL 3.0

  • 344 Replies
  • 346743 Views
*

Offline kappa

  • *****
  • 1319
Re: [RFE] LWJGL 3.0
« Reply #105 on: November 10, 2014, 12:11:01 »
tried testing the Gears demo on Windows 32bit, however getting the following native crash

Quote
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100010ac, pid=1604, tid=2388
#
# JRE version: Java(TM) SE Runtime Environment (7.0_71-b14) (build 1.7.0_71-b14)
# Java VM: Java HotSpot(TM) Client VM (24.71-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [lwjgl.dll+0x10ac]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Documents and Settings\workspace\testl\hs_err_pid1604.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

error report for the above here

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [RFE] LWJGL 3.0
« Reply #106 on: November 10, 2014, 12:12:40 »
How do you bundle the compiled classes to a final jar? The build.xml in the lwjgl3 repo does not seem to have such a target. Especially, the "api" package seems to be missing when building from sources.

I haven't added a release target to the Ant scripts yet. Just do a:

Code: [Select]
jar cf lwjgl.jar -C bin/Core .
The api package was removed yesterday, see the commit log.
« Last Edit: November 10, 2014, 12:16:26 by spasi »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [RFE] LWJGL 3.0
« Reply #107 on: November 10, 2014, 12:24:57 »
tried testing the Gears demo on Windows 32bit, however getting the following native crash

That's odd and quite possibly a GLFW bug. I cannot reproduce it on Windows 8.1 but will investigate further.

*

Kai

Re: [RFE] LWJGL 3.0
« Reply #108 on: November 10, 2014, 13:42:00 »
Having made lwjgl3 compatible with Java 1.6 and running it on a Mac OS X 10.9.5 x64 with Java 1.6 installed, we got the following error:
Segmentation fault 11.
The trace can be downloaded here: https://www.dropbox.com/s/81lcdqm0ynfqexe/trace.txt?dl=1

Additionally, I did not recompile any native library or changed any classes apart from making diamond operators to explicit generics and try-with-resources to try-finally.
Also, I think, the issue is rather only related to the native library, which I downloaded from http://build.lwjgl.org/stable/lwjgl.zip.

EDIT: I too had to change switch-with-strings to if-string-equals statements.
« Last Edit: November 10, 2014, 15:41:40 by Kai »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [RFE] LWJGL 3.0
« Reply #109 on: November 10, 2014, 14:22:47 »
A few questions:

- Does it work with Java 7 or 8?
- Is there anything AWT related in the app?
- Does it work if you don't touch AWT?

*

Kai

Re: [RFE] LWJGL 3.0
« Reply #110 on: November 10, 2014, 14:26:45 »
Quote
- Does it work with Java 7 or 8?
Very unfortunately, I cannot test it under either 7 nor 8, since upgrading from 6 will introduce other issues with other Java applications on that host (or at least that is what I have been told)

Quote
- Is there anything AWT related in the app?
No. It is a very simplistic application, without SWT, AWT or Swing or any other Java or native library, aparat from lwjgl3. It does at its first action a "Sys.touch()", then a "glfwSetErrorCallback(ErrorCallback.Util.getDefault());" and then a "glfwInit()". An that glfwInit() produces the glfw error message and afterwards crashes.

Quote
- Does it work if you don't touch AWT?
n/a

EDIT: Also, the patched 1.6 lwjgl.jar runs fine on a Windows 7 x64 with jdk1.6_45 under which the application is run.
« Last Edit: November 10, 2014, 15:39:42 by Kai »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [RFE] LWJGL 3.0
« Reply #111 on: November 10, 2014, 18:18:08 »
I cannot reproduce this either. Running Java 6u65 on Mavericks. I'm forcing an error and the callback runs fine.

It seems to be running fine for you too (at least the Java part). What happens if you don't set the error callback? Does it still crash?

Btw, above the "Failed to retrieve display name" error in GLFW, I see this comment: "This may happen if a desktop Mac is running headless".


*

Kai

Re: [RFE] LWJGL 3.0
« Reply #112 on: November 10, 2014, 18:29:08 »
The Mac in question is a Mac Book Pro 2012 with a Nvidia GeForce GT 650M,  which is even an equivalent to my Quadro K2000M.

And it is being run in headfull mode with its laptop display.

Apart from that: Using lwjgl2.9 with Display class worked.

I try to get some more info on the Mac.

*

Offline kappa

  • *****
  • 1319
Re: [RFE] LWJGL 3.0
« Reply #113 on: November 10, 2014, 23:07:08 »
tried testing the Gears demo on Linux 64bit (OpenSuse 13.1), however getting the following error

Quote
Exception in thread "main" java.lang.ExceptionInInitializerError
   at org.lwjgl.system.linux.opengl.LinuxGLContext.createFromCurrent(LinuxGLContext.java:59)
   at org.lwjgl.opengl.GLContext.createFromCurrent(GLContext.java:31)
   at org.lwjgl.demo.glfw.Gears.init(Gears.java:71)
   at org.lwjgl.demo.glfw.AbstractGears.execute(AbstractGears.java:39)
   at org.lwjgl.demo.glfw.Gears.main(Gears.java:30)
Caused by: java.lang.RuntimeException: Failed to dynamically load library: libGL.so
   at org.lwjgl.system.linux.LinuxLibrary.<init>(LinuxLibrary.java:25)
   at org.lwjgl.system.APIUtil.apiCreateLibrary(APIUtil.java:68)
   at org.lwjgl.opengl.GL.create(GL.java:69)
   at org.lwjgl.opengl.GL.create(GL.java:62)
   at org.lwjgl.opengl.GL.<clinit>(GL.java:39)
   ... 5 more

*

Offline kappa

  • *****
  • 1319
Re: [RFE] LWJGL 3.0
« Reply #114 on: November 11, 2014, 00:00:54 »
tested the MultipleWindows & Gears demos on OS X 10.10 64bit, both work pretty nicely.
« Last Edit: November 11, 2014, 00:15:09 by kappa »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [RFE] LWJGL 3.0
« Reply #115 on: November 11, 2014, 00:19:16 »
kappa, both issues you were having should be fixed now, please download the latest nightly and confirm when you have time.

Kai, I'm out of ideas for that OSX crash. Will try again tomorrow, but I don't think it's Java 6 related. One random thing you can try is passing -Dorg.lwjgl.macosx.nsloop=NA to the JVM, let me know if that changes anything. Also, is that MacBook running Mavericks or Yosemite?

*

Kai

Re: [RFE] LWJGL 3.0
« Reply #116 on: November 11, 2014, 07:47:52 »
Latest news: with the latest nightly yesterday evening I had prepared a super simple example with setting the GLFW exception callback and without setting it.
The segfault happened again while the exception callback was set but it did not happen without setting it...

The Java callstack of the segfault:
[LWJGL] GLFW error    Code: 0x10008
     Description: Failed to retrieve display name
     Stacktrace:
org.lwjgl.system.glfw.ErrorCallback$Util.invoke(ErrorCallback.java:91)
         org.lwjgl.system.glfw.GLFW.nglfwInit(Native Method)
         org.lwjgl.system.glfw.GLFW.glfwInit(GLFW.java:414)
         simple.Main.main(Main.java:21)
Invalid memory access of location 0x20 rip=0x10bb90dd7
Segmentation fault: 11

And also on Mac the application seemed to be using those disruptor classes (which was the next issue, because I wasn't shipping this) whereas on Windows everything worked fine without it.

The Mac runs on Mavericks (10.9.5).
« Last Edit: November 11, 2014, 08:10:21 by Kai »

*

Kai

Re: [RFE] LWJGL 3.0
« Reply #117 on: November 11, 2014, 10:53:11 »
The next thing I will be trying is to create an App bundle for Mac OS X via https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html and ship a JRE 7 with it.

Well, actually, I have tried it right now, and of course the simple packaging step did not work with the ant task.
I have downloaded from the Oracle site the current JRE7 for Mac OS X as tar.gz, I unzipped it (under Windows) and referenced the runtime dir element (as ../jre1.7.0_71.jre/Contents/Home) within the ant task invocation. And it did not copy the JRE into the app directory. It only copied the Info.plist file.

Does anyone know what needs to be done to bundle a JRE into the app distribution folder for Mac OS X on a Windows build host?

*

Offline kappa

  • *****
  • 1319
Re: [RFE] LWJGL 3.0
« Reply #118 on: November 11, 2014, 11:38:05 »
kappa, both issues you were having should be fixed now, please download the latest nightly and confirm when you have time.

tried the gears demo with the latest nightly build download on Windows 32bit, still getting the following crash:

Quote
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100010ac, pid=3108, tid=2364
#
# JRE version: Java(TM) SE Runtime Environment (7.0_71-b14) (build 1.7.0_71-b14)
# Java VM: Java HotSpot(TM) Client VM (24.71-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [lwjgl.dll+0x10ac]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Documents and Settings\workspace\testl\hs_err_pid3108.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

error report file hs_err_pid3108.log here.
« Last Edit: November 11, 2014, 11:40:38 by kappa »

*

Offline kappa

  • *****
  • 1319
Re: [RFE] LWJGL 3.0
« Reply #119 on: November 11, 2014, 13:36:40 »
actually tested again, I noticed that the nightly build jars were last modified on 9th Nov while the stable release jars were modified on 11th Nov, so stable builds are currently newer :).

Running these seems to get a little further on windows 32bit, no more native crash, however now I get the following exception:

Quote
Exception in thread "main" java.lang.IllegalStateException: OpenGL 1.1 is required.
   at org.lwjgl.opengl.GL.createCapabilities(GL.java:221)
   at org.lwjgl.system.windows.opengl.WindowsGLContext.createFromCurrent(WindowsGLContext.java:62)
   at org.lwjgl.opengl.GLContext.createFromCurrent(GLContext.java:29)
   at org.lwjgl.demo.glfw.Gears.init(Gears.java:71)
   at org.lwjgl.demo.glfw.AbstractGears.execute(AbstractGears.java:39)
   at org.lwjgl.demo.glfw.Gears.main(Gears.java:30)
 

And yes the computer does support OpenGL 1.1+  :).
« Last Edit: November 11, 2014, 13:42:57 by kappa »