LWJGL Forum

Programming => OpenGL => Topic started by: multiHYP on April 21, 2010, 02:29:01

Title: An exception on Windows only.
Post by: multiHYP on April 21, 2010, 02:29:01
Hi peeps!

Exception in thread "main" java.util.NoSuchElementException
   at java.util.StringTokenizer.nextToken(Unknown Source)
   at org.lwjgl.opengl.GLContext.getSupportedExtensions(GLContext.java:190)
   at org.lwjgl.opengl.ContextCapabilities.initAllStubs(ContextCapabilities.java:3442)
   at org.lwjgl.opengl.ContextCapabilities.<init>(ContextCapabilities.java:3690)
   at org.lwjgl.opengl.GLContext.useContext(GLContext.java:328)
   at org.lwjgl.opengl.GLContext.useContext(GLContext.java:287)

The exception above refers me to the line of code in which I have:


public class someclass extends GLCanvas implements Runnable {

  public someclass () {
   
    setCurrent();

    try {
      GLContext.useContext(this);
    } catch (LWJGLException e) {
      e.printStackTrace();
    }

  }

  public void run() {
  ...
  }

}


Now, this exception happens when I test my application on Windows XP SP3 Virtual Machine inside Parallels Desktop. However, the same code works perfectly fine under Mac OS X (10.5 & 10.6). Suggestions in the IRC channel directed me to perhaps the lack of support for OpenGL in my Virtual Machine. Therefore I tested the LWJGL online demos and they all did indeed run perfectly fine under the Windows XP SP3 Virtual Machine. Next step was to look through the documentation APIs. Under the GLContext class documentation I gathered the following:


I would appreciate if the author, revisor or any other member of the LWJGL team could help me with this issue.

Regards,

multiHYP
Title: Re: An exception on Windows only.
Post by: Matzon on April 21, 2010, 05:42:55
fire up your debugger, check the contents of the string. if its empty - have you created a context at all? if its not empty does it have weird characters?
Title: Re: An exception on Windows only.
Post by: Matzon on April 21, 2010, 09:20:52
from irc:
value of version is: ""
a normal lwjgl app has "2.0 ATI-1.6.10" - and works under the parallels environment

could be SWT or context initialization that somehow fails with the swt/paralells implementation. Not sure how :/

Title: Re: An exception on Windows only.
Post by: spasi on April 21, 2010, 10:59:50
Could you please run the OpenGL Extensions Viewer (http://www.realtech-vr.com/glview/download.html) under Parallels and let us know the results?
Title: Re: An exception on Windows only.
Post by: mringwal on November 10, 2011, 15:12:42
Hi. I'm running into the same error (in Parallels Deskop 6, Windows XP SP3 on a Mac Mini).
glGetString(GL_VERSION) returns an empty string inside the VM.

OpenGL Extension Viewer 4.04 reports

Renderer: Parallels using NVIDIA GeForce 9400 OpenGL Engine
Vendor: Parallels and NVIDIA Corporation
Memory: 256 MB
Version: 2.1 NVIDIA-1.6.36
Shading language version: 1.20

any hints/ideas?