Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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 1612 times)
0 Members and 1 Guest are viewing this topic.
Online kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« 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
-----------------------------------
Online kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« 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!
Legends of Yore - The Casual Retro Roguelike
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.

 

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

The first screenshot will be displayed as a thumbnail.

pw (24 views)
2014-07-24 01:59:36

Riven (22 views)
2014-07-23 21:16:32

Riven (18 views)
2014-07-23 21:07:15

Riven (21 views)
2014-07-23 20:56:16

ctomni231 (50 views)
2014-07-18 06:55:21

Zero Volt (45 views)
2014-07-17 23:47:54

danieldean (36 views)
2014-07-17 23:41:23

MustardPeter (39 views)
2014-07-16 23:30:00

Cero (54 views)
2014-07-16 00:42:17

Riven (54 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!