My application crashes with the following exception:
Exception in thread "main" javax.media.opengl.GLException: Invalid result 11 from GLCapabilitiesChooser (should be between 1 and 6)
The exception is thrown when I call capabilities.setSampleBuffers(true) and capabilities.setNumSamples(2). See http://www.javagaming.org/index.php?topic=21900.0 for a forum discussion.
The attached zip contains jar, dll, java, and batch files that I have used to reproduce the error on several machines with different graphics cards. See exception.txt for crash details. Build.bat and run.bat may be used to compile and run the application.
Created attachment 142 [details]
Created attachment 143 [details]
Logging with -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all
*** Bug 410 has been marked as a duplicate of this bug. ***
Will fix this see on Windows. See #410, where it's working on X11.
*** Bug 429 has been marked as a duplicate of this bug. ***
*** Bug 428 has been marked as a duplicate of this bug. ***
I am within reworking the Windows Capabilities -> WGL GraphicsConfiguration code.
Stay tuned ..
*** Bug 405 has been marked as a duplicate of this bug. ***
Tested on Window7-x86 (amd/nvidia), WinXP-x32-VirtualBox.
Cleaned up X11/GLX code to use it as a correct boilerplate
for the new WGL selection, which now duplicates the same behavior.
X11/GLX and WGL follow the common logic:
- 1st try:
- get GLCapabilities based on users GLCapabilities
- setting recommendedIndex as preferred choice
- 2nd try:
- get all GLCapabilities available
- no preferred recommendedIndex available
If no recommendedIndex has been selected and no chooser has been passed,
we use the DefaultGLCapabilitiesChooser.
Choose the GLCapabilities if a chooser is given (or see above).
*** Bug 427 has been marked as a duplicate of this bug. ***
Created attachment 173 [details]
Debug output for b229 showing the same error as before
I tested b229 which looks like it contains this fix, and I get the same error as before. I've attached the new trace, which looks very similar to my previous trace in bug 429 (http://jogamp.org/bugzilla/show_bug.cgi?id=429).
This is on the same machine as in bug 429:
Windows XP SP2 32-bit
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce FX 5200/AGP/SSE2
Reopened since this doesn't fix bug 429 (sorry if this is a breach of protocol, just let me know if you don't want me to reopen bugs).
I've attached a new output log showing the same error as before, but with the line numbers slightly different :)
Reduced prio/severity, due to it's impact to non ARB WGL driver,
where WGL ARB pixelformat extension is even supported within VirtualBox.
Wade, no it's completely ok to reopen it, and I thank you for that.
As you can see in my test matrix, my test machines all ran with the WGL ARB extension,
and your test ran with the GDI pixelformat code path.
The latter seems to still have a bug, I will check on this after the release work.
(In reply to comment #13)
> As you can see in my test matrix, my test machines all ran with the WGL ARB
> and your test ran with the GDI pixelformat code path.
Should I add my test to the unit tests perhaps? That way we can see if this problem can be duplicated on your test machines.
that would be awesome .. (you know the wiki/bugreport/junit test, I assume)
after the 1st release candidate .. I will try to set up an 'old fashion' machine with kinda no WGL modern OpenGL .. hmm .. maybe just with SW GL :)
I forgot to mention -- a workaround for this bug is to put "GDI.GetDC(glcanvas.handle);" right after the first "glcanvas.setCurrent();" call in the app.
If you do that, the pixelformat error goes away and the program works normally, but this obviously only works on Windows, so it's not a real fix. But it might give you some insisight into the root cause.
Created attachment 178 [details]
win7-64, SWT 3.7M3, jogl-a77abd78367fd8e172b6bae0fa742ac3c89bb243
The content of attachment 178 [details] has been deleted by
Sven Gothel <firstname.lastname@example.org>
without providing any reason.
The token used to delete this attachment was generated at 2010-11-26 05:22:25 MST.
Wade's original bug report is not a duplicate of this one, as it turns out.
Hence #429 is reopened, this one closed.