people how exactly do impliment the glutsolidsphere() i keep getting a null pointer error.
now i get only one sphere then the window closes with these errors:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77F83AED
Function=[Unknown.]
Library=C:\WINDOWS\System32\ntdll.dll
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at sun.misc.Unsafe.freeMemory(Native Method)
at java.nio.DirectByteBuffer$Deallocator.run(DirectByteBuffer.java:69)
at sun.misc.Cleaner.clean(Cleaner.java:123)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:123)
Dynamic libraries:
0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe
0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.DLL
0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll
0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll
0x00830000 - 0x0083E000 C:\j2sdk1.4.2\jre\bin\verify.dll
0x00840000 - 0x00858000 C:\j2sdk1.4.2\jre\bin\java.dll
0x00860000 - 0x0086D000 C:\j2sdk1.4.2\jre\bin\zip.dll
0x02C50000 - 0x02D5A000 C:\j2sdk1.4.2\jre\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
0x771B0000 - 0x772D1000 C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000 C:\WINDOWS\System32\uxtheme.dll
0x02FD0000 - 0x03020000 C:\j2sdk1.4.2\jre\bin\fontmanager.dll
0x51000000 - 0x5104D000 C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
0x5C000000 - 0x5C0C8000 C:\WINDOWS\System32\D3DIM700.DLL
0x07220000 - 0x072F4000 C:\WINDOWS\System32\nView.dll
0x70A70000 - 0x70AD5000 C:\WINDOWS\system32\SHLWAPI.dll
0x773D0000 - 0x77BC2000 C:\WINDOWS\system32\SHELL32.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x5EDD0000 - 0x5EDEA000 C:\WINDOWS\System32\OLEPRO32.DLL
0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll
0x71950000 - 0x71A34000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
0x77340000 - 0x773CB000 C:\WINDOWS\system32\comctl32.dll
0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll
0x074C0000 - 0x074EB000 C:\WINDOWS\System32\msctfime.ime
0x074F0000 - 0x074F5000 C:\j2sdk1.4.2\jre\bin\jawt.dll
0x07500000 - 0x07576000 C:\j2sdk1.4.2\jre\lib\ext\jogl.dll
0x5ED00000 - 0x5EDC6000 C:\WINDOWS\System32\OPENGL32.dll
0x68B20000 - 0x68B3E000 C:\WINDOWS\System32\GLU32.dll
0x69500000 - 0x698C1000 C:\WINDOWS\System32\nvoglnt.dll
0x605D0000 - 0x605D8000 C:\WINDOWS\System32\mslbui.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll
Heap at VM Abort:
Heap
def new generation total 576K, used 16K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 1% used [0x10010000, 0x100119e8, 0x10090000)
from space 64K, 16% used [0x100a0000, 0x100a2940, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 374K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 26% used [0x104f0000, 0x1054db00, 0x1054dc00, 0x10650000)
compacting perm gen total 4608K, used 4394K [0x14010000, 0x14490000, 0x18010000)
the space 4608K, 95% used [0x14010000, 0x1445abf8, 0x1445ac00, 0x14490000)
heres the code im trying to run:
gl.glColor3f(1.0f,1.0f,1.0f);
quadric = new GLUquadric();
glu.gluQuadricDrawStyle(quadric,glu.GLU_FILL);
//gl.glBegin(GL.GL_POINTS);
for(int j = 0,m = 0; j < ( balls.length/2 ); j+=2, m++){
if(!gbs[m].getPick()){//if golfball has not been picked render it
//gl.glVertex3f(gbs[m].Golf_Ball_XCor, gbs[m].Golf_Ball_YCor, 0.0f);
gl.glTranslatef(gbs[m].Golf_Ball_XCor, gbs[m].Golf_Ball_YCor, 0.0f);
glu.gluSphere(quadric, (double) gbs[m].radius, 20, 40);
System.out.println(gbs[m].Golf_Ball_XCor+" "+ gbs[m].Golf_Ball_YCor);
}
}
//gl.glEnd();
[quote]quadric = new GLUquadric();
[/quote]
You need to use GLU.gluNewQuadric() just like in C. Please see the source code for the VertexProgWarp demo (in the jogl-demos project) for an example.
Yeah, that caught me for a LONG time until I went to the sample code. Since its invalid for one to call new on GLUQuadric, shouldn’t its constructor be private/protected or something?
i love you guys… thats was it.
Now i have to figure out why its drawing only one ball
thnx!
[quote]Since its invalid for one to call new on GLUQuadric, shouldn’t its constructor be private/protected or something?
[/quote]
In theory yes, but the GLUquadric object’s constructor is called by the GLUImpl class which is in a different package. While it’s possible to make the GLUquadric constructor package-private it requires some more infrastructure. Feel free to file an RFE on this.