Hello Guest

[FIXED] applet error after dragging and then switching tabs

  • 7 Replies
  • 14515 Views
Code: [Select]
Exception in thread "Thread-13" org.lwjgl.LWJGLException: X Error - disp: 0x7fa0501eaf70 serial: 7324 error: BadMatch (invalid parameter attributes) request_code: 42 minor_code: 0
at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:303)
at org.lwjgl.opengl.GL11.nglClear(Native Method)
at org.lwjgl.opengl.GL11.glClear(GL11.java:588)
at testapplet.TestApplet.run(TestApplet.java:83)

TestApplet.java
Code: [Select]
82:  public void run() {
83:    glClear(GL_COLOR_BUFFER_BIT);
84:    glLoadIdentity();
85:    Display.update();
86:    Display.sync(60);
87:  }

GL11.java
Code: [Select]
584: public static void glClear(int mask) {
585: ContextCapabilities caps = GLContext.getCapabilities();
586: long function_pointer = caps.glClear;
587: BufferChecks.checkFunctionAddress(function_pointer);
588: nglClear(mask, function_pointer);
589: }
590: static native void nglClear(int mask, long function_pointer);

Linux Mint 10 (Ubuntu 10.10 Maverick Meerkat) 64-bit.
Latest nightly LWJGL 2.7.1

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Xorg:
Code: [Select]
X.Org X Server 1.9.0
Release Date: 2010-08-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-28-server x86_64 Ubuntu
Current Operating System: Linux 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64
Build Date: 09 January 2011  12:14:27PM
xorg-server 2:1.9.0-0ubuntu7.3
Current version of pixman: 0.18.4

It runs fine with no errors at all.  If I change tabs multiple times, then there are no problems at all.

Then if I click on the screen and drag my mouse around, there are no errors at all.
But, if I then switch tabs and then come back, it gives this error once.  Then it white screens forever (crashes) until I click refresh.

It has something to do with dragging the mouse in a canvas apparently.  I also get Mouse input fine (I tested with Mouse.getX() and Mouse.getY()) while dragging before I switch tabs.  I have to first drag in the window and then switch tabs.  Then it crashes.

To try and recreate it, just do a straight copy of the applet code from the tutorials, but have Mouse.create(), OpenGL initialization code, a game loop with my run method, etc. just very basic stuff.  Just very simple, basic skeleton OpenGL/LWJGL Applet code.

I'm betting this is probably just a problem with the x window system, but anyone have any suggestions?

If I do this same code but not in an applet and without using a canvas, it works perfectly without any errors.

I haven't tested within a canvas yet without being an applet, but I plan on doing that some time this week.

Thanks.
« Last Edit: July 24, 2011, 00:29:25 by jediTofu »
cool story, bro

Re: [BUG] applet error after dragging and then switching tabs
« Reply #1 on: July 25, 2011, 06:32:17 »
Update:  this only happens in Opera, not firefox.  I'm betting Opera uses OpenGL in order to be cross-platform or for speed or something, and OpenGL gets reset or something, or it could be a bad install.  I'll try reinstalling it tomorrow.  It does beg the question of whether I can recreate this in firefox by having multiple tabs open of applets using OpenGL/LWJGL and then switching between them.
cool story, bro

Re: [BUG] applet error after dragging and then switching tabs
« Reply #2 on: August 01, 2011, 04:48:43 »
 :o  Can someone tell me what version of LWJGL this uses?  http://www.lwjgl.org/applet/

That works fine on LWJGL's site.

So, I copied that exact same code from the latest lwjgl source (even the HTML Applet code!) and just modified slightly so that it would work locally.  It has the same problem as my applet!

I even tried with Apache running and accessing it like I would through a true website (and not just locally).  It still crashes if I drag inside the window and then switch tabs and then back!

The only thing I can think of is that the jars there must not be the latest ones?
cool story, bro

*

Offline kappa

  • *****
  • 1319
Re: [BUG] applet error after dragging and then switching tabs
« Reply #3 on: August 01, 2011, 09:57:53 »
:o  Can someone tell me what version of LWJGL this uses?  http://www.lwjgl.org/applet/
That uses LWJGL 2.7.1 official release, might be a problem with the nightly builds, can you confirm it also happens with the LWJGL 2.71 release?

Re: [BUG] applet error after dragging and then switching tabs
« Reply #4 on: August 02, 2011, 03:09:26 »
Ah ha!  You are correct.  My naivety just thought that something so simple would surely be fine using the nightly builds.   :-X   I guess I won't be using the nightly builds ever again.  Hopefully whatever code is causing this issue isn't in the next release.
cool story, bro

*

Offline kappa

  • *****
  • 1319
Re: [BUG] applet error after dragging and then switching tabs
« Reply #5 on: September 25, 2011, 22:03:15 »
This should be fixed now in the next nightly build.

Do please test and confirm.

Re: [FIXED] applet error after dragging and then switching tabs
« Reply #6 on: September 29, 2011, 05:24:08 »
Can't test currently.  The nightly builds link never loads for me  :-\.  It must have a lot of traffic or being restarted now.  I'll have to try this weekend.
cool story, bro

Re: [FIXED] applet error after dragging and then switching tabs
« Reply #7 on: October 03, 2011, 03:41:38 »
Tested.  Fixed now.  Thanks.   :D

EDIT:  However, I noticed when I switched tabs, I was then unable to type initially in edits (specifically Google+ website) and then switched back&forth was able to.  But this may be related to Google+.  And as long as there are no errors, then no big deal to me.
« Last Edit: October 03, 2011, 03:48:07 by jediTofu »
cool story, bro