An exception on Windows only.

Started by multiHYP, April 21, 2010, 02:29:01

Previous topic - Next topic

multiHYP

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:



  • Version:
    $Revision: 3279 $ $Id: GLContext.java 3279 2010-03-11 21:06:49Z spasi $

  • Author:
    elias_naur

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

Regards,

multiHYP

Matzon

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?

Matzon

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 :/


spasi

Could you please run the OpenGL Extensions Viewer under Parallels and let us know the results?

mringwal

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?