I feel a little silly. It may not be a memory problem at all. I was assuming so because I would watch the memory usage in the task-manager climb near maximum, then it would crash. I finally look at the real error message and it is complaining about something else:
[quote]#
An unexpected error has been detected by Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c91a214, pid=252, tid=3340
Java VM: Java HotSpot™ Client VM (10.0-b23 mixed mode windows-x86)
Problematic frame:
C [ntdll.dll+0x1a214]
An error report file with more information is saved as:
C:\Documents and Settings\Michael\My Documents\SLUGVIEW\hs_err_pid252.log
If you would like to submit a bug report, please visit:
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
[/quote]
Here is my post before looking at the error message…
The code below is what creates the display list to build the cloud in GL. The downsampling variable controls the concentration of points. The colorForPoint function basically creates a rainbow of colors. Eventually the program will use real-world colors, but not right now. I’m not certain about your second question. To get to the points I project window coordinates using glu.project/unproject, and combine it with the viewport matrix (i.e. To get the exact point on the screen:
This gets the depth component Note: proj.getViewport returns the viewport matrix from GL;
gl.glReadPixels(winX ,proj.getViewport()[3]-winY , 1,1, GL.GL_DEPTH_COMPONENT, GL.GL_FLOAT, zDepth);
This gets the point;
glu.gluUnProject(winX, winY, zDepth, mdlMatrix, 0, prjMatrix, 0, viewportMatrix, 0, coords, 0);
protected void buildDisplayList(int downsampling, ProgressMonitor updt){
if (dispList > 0) gl.glDeleteLists(dispList, 1);
dispList = gl. glGenLists(1);
if (dispList <= 0) throw new Error("Could not appropriate display list");
gl.glNewList(dispList, GL.GL_COMPILE);
gl.glBegin(GL.GL_POINTS);
for (int i = 0; i < points; i += downsampling+1){
double[] clr = colorForPoint(i);
gl.glColor4d(clr[0], clr[1], clr[2], ALPHA_BRIGHTNESS);
gl.glVertex3d(data.get(i, 0), data.get(i, 1), data.get(i, 2));
}
gl.glEnd();
gl.glEndList();
}
Also, I’ve have to use -Xmx with this program. It uses too much memory for the 64mb cap. So, I have been. That’s my problem. With Windows systems, I’ve gone as high as I can with -Xmx.
Thank you for your help, and sorry if I wasted your time