Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  GLException: Error Swapping Buffers  (Read 1386 times)
0 Members and 1 Guest are viewing this topic.
Offline kevglass
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« Posted 2003-07-25 07:51:00 »

GLException: Error Swapping Buffers

I keep getting something like this when my program exits. I do try to stop the animator, but Ctrl^C seems to break things too..

Is there some synchronization that I'm not doing for JOGL?

Any help appreciated,

Kev

Offline zaknixon

Senior Newbie




</bored>


« Reply #1 - Posted 2003-07-25 13:22:06 »

I am getting the same error as well.

Here is the stack trace:
1  
2  
3  
4  
5  
6  
7  
net.java.games.jogl.GLException: Error swapping buffers
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
      at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:193)
      at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:196)
      at net.java.games.jogl.GLCanvas.display(GLCanvas.java:91)
      at net.java.games.jogl.Animator$1.run(Animator.java:104)
      at java.lang.Thread.run(Unknown Source)


Hope this helps,

Zak

----------------------------------
Zak Nixon
Software Engineer
Davidson Technologies
-----------------------------------
Offline kevglass
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« Reply #2 - Posted 2003-07-25 13:43:15 »

It doesn't exactly help, but its sorta good to know I'm not he only one Wink

I've found upgrading my driver has preventing it just hanging the VM. I now get the exception then an end.

Running with ATI Radeon Mobility 9000, WinXP.

Kev

Games published by our own members! Check 'em out!
Try the Free Demo of Droid Assault
Archimedes
Guest
« Reply #3 - Posted 2003-07-25 15:31:58 »

I can confirm this.
When I terminate my Java application (which uses a GlCanvas in an AWT frame) in the console with ^C the above error is reported.
When I quit the application gently via its exit method (which stops the Animator), it quits cleanly without an error.

But ... I get strange errors when hitting the ALT key during the application which sets an keylistener to the GlCanvas; please see http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1058949563
(and I still haven't got the slightest idea why)
Offline tortoise

Junior Member




<3 Shmups


« Reply #4 - Posted 2003-07-25 16:45:59 »

I get this if I try to access the GL object from another thread. I've just designed my game around it and throw RuntimeExceptions if something does a GL thing at the wrong time, making it easier to spot the causes.

As for exiting, have you tried setting a shutdown hook to exit cleanly regardless of how the JVM goes down?
Offline josgood

Senior Newbie




Nudge reality.


« Reply #5 - Posted 2003-07-25 17:51:53 »

Quote
As for exiting, have you tried setting a shutdown hook to exit cleanly regardless of how the JVM goes down?


As I've said elsewhere, I've been updating the Magician bindings.  I've really struggled with the "proper shutdown" problem (WinXP, Sun JDK 1.4.x).  I had thought my implementation was working, but it was failing silently.

Running the registered shutdown Runnables is the last thing the JVM does, meaning the AWT stuff has already gone bye-bye.  So my GLComponent's destoy() method, which deletes the GL context then unlocks AWT, fails.  Sometimes with an error 170 (resource not ready), sometimes with an ABEND.

There's probably a simple solution, but I haven't been clever enough to find it.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
hobbles (5 views)
2013-05-22 00:54:55

cubemaster21 (74 views)
2013-05-17 21:29:12

alaslipknot (86 views)
2013-05-16 21:24:48

gouessej (115 views)
2013-05-16 00:53:38

gouessej (110 views)
2013-05-16 00:17:58

theagentd (121 views)
2013-05-15 15:01:13

theagentd (110 views)
2013-05-15 15:00:54

StreetDoggy (155 views)
2013-05-14 15:56:26

kutucuk (177 views)
2013-05-12 17:10:36

kutucuk (174 views)
2013-05-12 15:36:09
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.134 seconds with 23 queries.