Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  
  1.1 beta 5 EXCEPTION_ACCESS_VIOLATION  on ATI  (Read 2592 times)
0 Members and 1 Guest are viewing this topic.
Offline commondata

Senior Newbie




Java games rock!


« Posted 2004-08-09 16:31:33 »


Hi, I'm running some code on 1.1 beta 5 which works fine on one machine with an NVidia card but fails on another with an ATI 7500 card with the error below.  Any idea what the error is, and whether this is a driver issue (I'm running the latest) or a timing or thread issue?

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x693B3A54
Function=DrvSetContext+0x12634
Library=C:\Windows\System32\atioglxx.dll

Current Java thread:
     at net.java.games.jogl.impl.windows.WGL.wglCreateContext(Native Method)
     at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:495)
     at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
     at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:135)
     - locked <0x12ed7fb0> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
     at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
     - locked <0x12ed7fb0> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
     - locked <0x12ed7fb0> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
     at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
     at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
     at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:82)
     at sun.awt.RepaintArea.paint(RepaintArea.java:177)
     at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
     at java.awt.Component.dispatchEventImpl(Component.java:3678)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2004-08-09 18:07:48 »

Do all JOGL programs fail, or just the one you're developing?

You may want to try using the DebugGL pipeline, which depending on when you're seeing the crash may isolate it earlier. See the section of the JOGL User's Guide on using the composable pipelines.
Offline nocivus

Junior Newbie




Java games rock!


« Reply #2 - Posted 2004-08-09 20:10:15 »

Same error here. It happens when i try to start two animators (one for each canvas). I'm not even sure this is possible ; anyone knows if we can add multiple GLCanvases to the same, say, JFrame?

Thanks
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GKW

Senior Member




Revenge is mine!


« Reply #3 - Posted 2004-08-09 20:37:29 »

What driver versions are you guys using?  Make sure it is the latest.  For my laptop I had to download drivers from omegadrivers.net since gateway hasn't bothered issuing new drivers for over a year for my machine.

Starting two Animators could cause some problems.  If one thread got interrupted after it made the cached DC/RC's current by the other thread which is also trying to make the same DC/RC current wlgMakeCurrent would fail.  That is something to think about.  We might need a synchronized block in choosePixelFormatAndCreateContext.
Offline nocivus

Junior Newbie




Java games rock!


« Reply #4 - Posted 2004-08-09 21:07:10 »

I'm using the latest OmegaDrivers ( 2.5.58 ) and my video card is an ati 9600 xt, btw. Is there any simple way to use multiple canvas? When i say simple, i mean for 6 yo kids Wink

Thanks
Offline commondata

Senior Newbie




Java games rock!


« Reply #5 - Posted 2004-08-09 21:16:37 »

Quote
Do all JOGL programs fail, or just the one you're developing?

You may want to try using the DebugGL pipeline, which depending on when you're seeing the crash may isolate it earlier. See the section of the JOGL User's Guide on using the composable pipelines.


The only JOGL app I've tried is the one I'm developing and the fault is intermittant, failing about 20% of the time.  The ATI driver I'm using is marked 6.14.10.6404 which is in the latest Catalyst package.  Using DebugGL provides no additional info.

Offline commondata

Senior Newbie




Java games rock!


« Reply #6 - Posted 2004-08-09 21:19:52 »

PS. I've got two GLCanvas's displayed when this problem occurs.
Offline nocivus

Junior Newbie




Java games rock!


« Reply #7 - Posted 2004-08-09 23:44:35 »

I guess it's a multiple canvas problem. The synchronize "choosePixelFormatAndCreateContext" thing that was mentioned is internal to JOGL, right?
Offline commondata

Senior Newbie




Java games rock!


« Reply #8 - Posted 2004-08-10 00:51:48 »

And if it is multiple canvas related, I've got another problem with maybe a similar explanation.  Once again, it's only intermittent and only on the ATI card.  I have a call to glDrawElements() that sometimes falls over with an access violation; I've written code to validate the integrity of my arrays on every render, and it always comes up OK.  So, hypothetically - if this were the problem and calls to glDrawElements() have to be thread synchronized, what else has to be too?
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #9 - Posted 2004-08-11 01:46:13 »

If you can boil down the multiple Animator / Canvas problem into a small test case, could you please file a bug with the JOGL Issue Tracker and provide relevant information like OS, JDK version and driver version? Thanks.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline commondata

Senior Newbie




Java games rock!


« Reply #10 - Posted 2004-08-11 12:37:27 »

I don't think I'm going to be able to boil this down to a simple test case, certainly not quickly.  I'm running the code within an Eclipse RCP app and the problem is timing sensitive so if I could reproduce it here, you might not be able to there.  BTW, I'm using Catalyst driver 6.14.10.6404, JDK 1.4.2_05 on Windows XP.

I would like to understand the threading model used in JOGL, so I'd be grateful if you could provide me with any more info on that, or point me in the direction of some documentation.  Are multi-threaded, multi-canvas apps supported by JOGL, at least in theory?  This startup message worries me: "Using ATI workaround of dispatching display() on event thread".  What was the original problem you were "working around"?

Is anybody else successfully writing multi-canvas jogl apps?  Is moving to LWJGL easy, and does it offer any more stability?
Offline commondata

Senior Newbie




Java games rock!


« Reply #11 - Posted 2004-08-11 20:50:40 »

I may have fixed the problem, or at least significantly reduced the number of crashes.  I don't think that this error was multi-canvas related; it seemed more to do with the state of the window to which the new canvas was being attached.  When the component is attached a little later, it succeeds.

I'm still not sure why I have an intermittent glDrawElements() problem on ATI but I guess it could just as easily be within my own code or ATI's drivers.  I'll post more information when I have it.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #12 - Posted 2004-08-16 18:37:43 »

To answer your earlier post: yes, multi-threaded, multi-canvas applications are supported in JOGL. This configuration has been tested less (at least by the core JOGL team) than the single-canvas case, but all of the synchronization required to make this work has been designed in to the JOGL source base.

The so-called "ATI workaround" was intended to work around issues seen primarily on ATI cards where resizing a window while OpenGL rendering was occurring via JOGL caused driver corruption and crashes of various kinds. Some of these issues are documented in the JOGL Issue Tracker. This workaround changes the threading model under the hood but applications should see no difference in behavior; they can still call display() on multiple canvases in multiple threads.

Regarding conversion to LWJGL, my current feeling is that it is possible that you may find better stability with that library because it keeps all of the window system interactions under its control (i.e., no integration with AWT/Swing) and because LWJGL is designed to be used from a single thread. However, we have been actively working on improving JOGL's stability in recent releases via bug fixes and workarounds for driver-related issues we have encountered. Also, I don't believe LWJGL supports multiple windows, at least out of the box, so this may be a showstopper for your application.
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.

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

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

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

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

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

Riven (46 views)
2014-07-14 18:02:53

OpenGLShaders (35 views)
2014-07-14 16:23:47

Riven (35 views)
2014-07-14 11:51:35

quew8 (31 views)
2014-07-13 13:57:52

SHC (67 views)
2014-07-12 17:50:04
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!