Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 06:54:43 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Crash without Optimization.USE_DISPLAY_LISTS
Pages: [1]
Print
Author Topic: Crash without Optimization.USE_DISPLAY_LISTS  (Read 178 times)
jeffhoye
developers
Enjoying the stay
***
Offline Offline

Posts: 32


View Profile Email
« on: 12. December 2011, 08:42:09 pm »

Hi guys, I've spent the last ~6 months trying to get Xith3D running on my dev box, and have finally narrowed down the problem.  When I run most Xith3D programs, my graphics drivers crash (black screen for a few seconds), and this error appears in the Windows Event Viewer

Display driver amdkmdap stopped responding and has successfully recovered.

Here's a very simple program that exposes the problem:

public class XithTest extends RenderLoop {

  public XithTest() {
    Xith3DEnvironment env = new Xith3DEnvironment(this);

    Canvas3D canvas = Canvas3DFactory.createWindowed(800, 600,
        "Multipass Rendering");

    env.addCanvas(canvas);

    BaseRenderPassConfig paraPassConfig = new BaseRenderPassConfig(
        ProjectionPolicy.PERSPECTIVE_PROJECTION);
    env.addBranchGraph(createParallelScene(), paraPassConfig);
  }

  private BranchGroup createParallelScene() {
    Point3f[] vertices = new Point3f[] { new Point3f(1, -1, 0),
        new Point3f(1, 1, 0), new Point3f(-1, 1, 0) };
    final TriangleArray geom = new TriangleArray(vertices.length);
    geom.makeInterleaved(Geometry.COORDINATES, false, null, null);
    // geom.setOptimization( Optimization.USE_DISPLAY_LISTS );
    geom.setCoordinates(0, vertices);
    Shape3D rect = new Shape3D(geom);

    return (new BranchGroup(rect));

  }

  public static void main(String[] args) {
    System.out.println(System.getProperties());
    XithTest rl = new XithTest();
    rl.begin();
  }
}

Ok, so the interesting thing is that it works fine if I un-comment this:
// geom.setOptimization( Optimization.USE_DISPLAY_LISTS );

My setup:
AMD 4780x2
Vista 64-bit
Java(TM) SE Runtime Environment java.vm.version=20.4-b02
  Also tried the 64-bit runtime
Xith3D from svn r1851
Tried lwjgl in Xith3D repository, and also newest version (2.8.2)
Drivers are up to date; any 3D intensive games that I run work well.  Any lwjgl programs I've tried work fine. 

I've spent several days attempting to debug/fix the problem from the driver side, but I've exhausted all the advice I could find online on Graphics Card/Driver forums.  The strange thing is that I've gotten it to work a few times, only to find it stop working after a few days.  A few months back, I posted a less specific problem on this forum (that causes the same issue).  At the time, updating the drivers seemed to fix it -- but a few days later the problem returned. 

I'm very excited to get Xith3D working with my game, so I would really appreciate any help.

Can you think of any reason that geometry without Optimization.USE_DISPLAY_LISTS causes the driver crash?  The problem is very pervasive -- any Geometry that uses Quad doesn't use that optimization and therefore causes the crash.  I'm not very skilled with lwjgl, but if you can post a simple program that may reproduce the problem there, I'd be happy to take it up with them, if we can show the problem is in lwjgl.

Thanks in advance!
-Jeff
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 13. December 2011, 10:21:35 am »

Does the problem also exist for using Vertex Buffers? Or for using JOGL?
Logged
jeffhoye
developers
Enjoying the stay
***
Offline Offline

Posts: 32


View Profile Email
« Reply #2 on: 14. December 2011, 05:29:07 pm »

Adding OpenGLLayer.JOGL_AWT as the first arg to createWindow():
  Identical success/failure.  Works when adding USE_DISPLAY_LISTS, crashes graphics drivers otherwise.  I tried both 32 bit and 64 bit (changed both the JVM and JOGL native bindings). 

Optimization.USE_VBO_FOR_VERTEX_DATA:
  This prevents my graphics card from crashing, however, I don't think I'm using it right, because the white triangle goes away.  What else should I try?  (Identical behavior in JOGL/LWJGL; 32/64 bit setup)

I replaced this line:
//    geom.setOptimization( Optimization.USE_DISPLAY_LISTS ); // works

with:
    geom.setOptimization( Optimization.USE_VBO_FOR_VERTEX_DATA ); // works, no triangle?
   
By the way... the program seems to execute the render loop once before the driver crashes.  It draws the scene, then freezes the computer for a few seconds until black screen for a few seconds.  Then recovers, but render area is just black, render loop seems to have crashed because no System.out calls that I added, and keyboard inputs (such as ESC) fail.  No exceptions thrown.  Is there a way to turn on xith3d debug (trace) information?

I'm running xith3d from source, so I'm fully prepared to try changes.  I spent some time attempting to determine which call causes the crash, but so far wasn't able to narrow it down well.

Thanks for your help! 
-Jeff
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic