visAD with windows

i am having trouble getting my visAD program to work with windows.

it runs and displays fine with linux, but when i copy it over to a
windows machine and run it i get this error:

<snip>

************************************************************************
*** ERROR: Canvas3D constructed with a null GraphicsConfiguration
*** This will cause a NullPointerException in a subsequent release
************************************************************************
java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1093)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1058)
        at visad.java3d.VisADCanvasJ3D.<init>(VisADCanvasJ3D.java:86)
        at graph3d.graph3d$MyVisADCanvasJ3D.<init>(graph3d.java:637)
        at graph3d.graph3d.display(graph3d.java:220)
        at LS1a_020725.GUIModel.showLandscape(Unknown Source)
        at LS1a_020725.GUIModel.step(Unknown Source)
        at BAB_SYNTH_1.execute(Unknown Source)
        at
uchicago.src.sim.engine.ActionGroup.execute(ActionGroup.java:154)
        at
uchicago.src.sim.engine.ActionGroup.execute(ActionGroup.java:154)
        at uchicago.src.sim.engine.Schedule.execute(Schedule.java:372)

</snip>

this error comes when I create a MyVisADCanvasJ3D (which extends
VisADCanvasJ3D).  When I create I simply do:

<snip>

        DisplayRendererJ3D dr = new DefaultDisplayRendererJ3D();
        VisADCanvasJ3D mycanvas = new MyVisADCanvasJ3D(dr);

</snip>

and in the MyVisADCanvasJ3D constructor I do:

<snip>

    public MyVisADCanvasJ3D(DisplayRendererJ3D dr)
    {
      super(dr);
    }

</snip>

I looked through the VisAD code and it looks like my default
GraphicsConfiguration is not being created.  The default graphics
configuration is generated in VisADCanvasJ3D if you do not specify one
in the constructor.  The code to do this is:

<snip>

  private static GraphicsConfiguration makeConfig() {
    GraphicsEnvironment e
GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice d = e.getDefaultScreenDevice();
    // GraphicsConfiguration c = d.getDefaultConfiguration();
    GraphicsConfigTemplate3D gct3d = new GraphicsConfigTemplate3D();
    GraphicsConfiguration c
gct3d.getBestConfiguration(d.getConfigurations());
    return c;
  }

</snip>

so I assume I probably don't have something set up correctly ... so this
code is returning a null GraphicsConfiguration because it cannot detect
the GraphicsConfiguration?

I ran this "direct x diagnostic" program and i know direct3d 8.0 works
if that means anything.

Anyone have any ideas what is wrong here?

Thanks,
-Mike


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: