PDA

View Full Version : Driver components mis-match. Exit is the only option.



EJavaM
08-01-2003, 05:46 AM
Hi All,

I have a Window 2000 Pro installation that was running OpenGL successfully under a Java3D \ VisAd application just days ago. Because of some problems in the operating system (Windows Explorer generated errors on launch), I have reinstalled the OS onto the harddrive, overwriting the original system, but leaving all user directories as they were. At that time, I had already installed:

java3d-1_3_1-beta-windows-i586-opengl-sdk.exe

and, as mentioned, it had been running great!

On the very next launch of the VisAd tutorial file, P_01_2.java attached, the following error launched a modal dialog box with the title:

nVidia OpenGL Driver

and the message:

Driver components mis-match. Exit is the only option.

and an Ok button. The app did not show anything on screen aside from this, but I've been able to debug it to line 67, which is:

display = new DisplayImplJ3D("display1");

I have a Riva TNT card and 512Mb of RAM. I've tried reinstalling the above mentioned OpenGL executable, and have tried uninstalling that one, and then reinstalling:

java3d-1_3_1-beta-windows-i586-directx-sdk.exe

which is the alternative for Java3D, rebooting, etc.; however, nothing seems to work to clear this error. The price for this experience continues to grow, as I find no mention of this error anywhere on Sun's site, or on the Internet in general (searched using the quoted error string on dogpile.com). Any suggestions would be appreciated.

Thank you,
Evan

P.S. I've attached the file P1_01_1.java, a similar 2D representation of a similar problem that does execute correctly for your comparison.

BTW, VisAd is one fantastic package, for those of you that do numerical programming!

/****************************/

// P1_01_2.java

package test.VisAd.tutorial;

import java.rmi.RemoteException;
import java.awt.*;

import javax.swing.*;

import visad.*;
import visad.java3d.DisplayImplJ3D;

public class P1_01_2 {

private DataReferenceImpl h_t_ref;

private DisplayImpl display;

private DisplayRenderer dRenderer;

private FlatField h_t_ff;

private FunctionType tempFunc;

private RealTupleType h_t_tuple;

private RealType time, height, temp;

private ScalarMap timeMap, heightMap, tempMap;

private Set time_set;

private float[] colorToFloats(Color c) {
float[] rgb = new float[]{0.5f,0.5f,0.5f}; //init with gray
if(c != null){
rgb[0] = (float) c.getRed()/255.0f;
rgb[1] = (float) c.getGreen()/255.0f;
rgb[2] = (float) c.getBlue()/255.0f;
}
return rgb;
}

public static void main(String[] args)
throws RemoteException, VisADException {
new P1_01_2(args);
}

public P1_01_2(String[] args) throws RemoteException, VisADException {

time = RealType.getRealType("time", SI.second, null);
height = RealType.getRealType("height", SI.meter, null);
temp = RealType.getRealType("temp");

h_t_tuple = new RealTupleType(height, temp);

tempFunc = new FunctionType(time, h_t_tuple);

time_set = new Integer1DSet(time, 5);

float[][] h_t_vals = new float[][]{{0.0f, 33.75f, 45.0f, 33.75f, 0.0f},
{0.0f, 33.75f, 45.0f, 33.75f, 0.0f}};

h_t_ff = new FlatField(tempFunc, time_set);

h_t_ff.setSamples(h_t_vals);

display = new DisplayImplJ3D("display1");

GraphicsModeControl dispGMC = (GraphicsModeControl)display.getGraphicsModeContro l();
dispGMC.setScaleEnable(true);
dispGMC.setProjectionPolicy(DisplayImplJ3D.PARALLE L_PROJECTION);

timeMap = new ScalarMap(time, Display.XAxis);
heightMap = new ScalarMap(height, Display.YAxis);
tempMap = new ScalarMap(temp, Display.RGB);

display.addMap(timeMap);
display.addMap(heightMap);
display.addMap(tempMap);

h_t_ref = new DataReferenceImpl("h_t_ref");

h_t_ref.setData(h_t_ff);

display.addReference(h_t_ref);

timeMap.setScalarName("Time, in seconds");
heightMap.setScalarName("Height, in meters");
tempMap.setScalarName("Temp, in RGB");

float[] r = colorToFloats(Color.red);
timeMap.setScaleColor(r);

r = colorToFloats(Color.blue);
heightMap.setScaleColor(r);

dRenderer = display.getDisplayRenderer();

float[] backColor = colorToFloats(Color.white);
dRenderer.setBackgroundColor(backColor[0], backColor[1], backColor[2]);

dRenderer.setBoxOn(false);

JFrame jframe = new JFrame("Modified VisAD Application: P1_01_2");
jframe.getContentPane().add(display.getComponent() );
jframe.setDefaultCloseOperation(jframe.EXIT_ON_CLO SE);

jframe.setSize(300, 300);
jframe.setVisible(true);
}
}

/****************************/

// P1_01_1.java

package test.VisAd.tutorial;

import java.rmi.RemoteException;
import java.awt.*;

import javax.swing.*;

import visad.*;
import visad.java2d.DisplayImplJ2D;

public class P1_01_1{

private DataReferenceImpl h_t_ref;

private DisplayImpl display;

private FlatField h_t_ff;

private FunctionType tempFunc;

private RealTupleType h_t_tuple;

private RealType time, height, temp;

private ScalarMap timeMap, heightMap, tempMap;

private Set time_set;

public P1_01_1(String[] args) throws RemoteException, VisADException {

time = RealType.getRealType("time", SI.second, null);
height = RealType.getRealType("height", SI.meter, null);
temp = RealType.getRealType("temp");

h_t_tuple = new RealTupleType(height, temp);

tempFunc = new FunctionType(time, h_t_tuple);

time_set = new Integer1DSet(time, 5);

float[][] h_t_vals = new float[][]{{0.0f, 33.75f, 45.0f, 33.75f, 0.0f},
{0.0f, 33.75f, 45.0f, 33.75f, 0.0f}};

h_t_ff = new FlatField( tempFunc, time_set);

h_t_ff.setSamples( h_t_vals );

display = new DisplayImplJ2D("display1");

GraphicsModeControl dispGMC = (GraphicsModeControl) display.getGraphicsModeControl();

dispGMC.setScaleEnable(true);

timeMap = new ScalarMap( time, Display.XAxis );
heightMap = new ScalarMap( height, Display.YAxis );
tempMap = new ScalarMap(temp, Display.RGB);

display.addMap( timeMap );
display.addMap( heightMap );
display.addMap(tempMap);

heightMap.setRange( 0.0, 50.0);

h_t_ref = new DataReferenceImpl("h_t_ref");

h_t_ref.setData( h_t_ff );

display.addReference( h_t_ref );

JFrame jframe = new JFrame("First VisAD Application (With Color)");
jframe.getContentPane().add(display.getComponent() );
jframe.setDefaultCloseOperation(jframe.EXIT_ON_CLO SE);

jframe.setSize(300, 300);
jframe.setVisible(true);
}

public static void main(String[] args)
throws RemoteException, VisADException {
new P1_01_1(args);
}
}
_____________________________________________

knackered
08-01-2003, 06:23 AM
I've tried reinstalling the above mentioned OpenGL executable
Does that mean you've tried downloading and installing the latest nvidia drivers?

al_bob
08-01-2003, 10:26 AM
Your nvoglnt.dll file is of a different version than the rest of the driver. Try deleting it and reinstalling the video drivers.

EJavaM
08-07-2003, 06:07 AM
Hi Again,

Yes, reinstalling NVidia's latest drivers completely fixed the problem: I had written over the set that was there when I reinstalled Windows 2K. Once the new drivers were in place and the machine rebooted, all worked first time.

Thank You,
Evan