GL11.glDrawElements(int, IntBuffer) crash

Started by stephencarmody, November 22, 2005, 03:45:15

Previous topic - Next topic

stephencarmody

I don't seem to be able to pass an IntBuffer of more than 52392 bytes to
GL11.glDrawElements(int, IntBuffer) without crashing.

HotSpot dumps the following log when I try:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0d58e286, pid=9648, tid=9464
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode)
# Problematic frame:
# C  [atioglxx.dll+0x16e286]
#

---------------  T H R E A D  ---------------

Current thread (0x00736250):  JavaThread "main" [_thread_in_native, id=9464]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000004

Registers:
EAX=0x0dad8d40, EBX=0x00000000, ECX=0x0000876d, EDX=0x00000000
ESP=0x0006f890, EBP=0x00000000, ESI=0x00000000, EDI=0x0dad8d40
EIP=0x0d58e286, EFLAGS=0x00010293

Top of Stack: (sp=0x0006f890)
0x0006f890:   0d58a10e 0000876d 00000000 00000004
0x0006f8a0:   0dad8d40 00040000 0000332a 00000000
0x0006f8b0:   00000000 00003329 00000004 00000000
0x0006f8c0:   0000332a 00000000 00000001 00000000
0x0006f8d0:   00000000 00000000 00000000 00000000
0x0006f8e0:   00000001 0d58aa6c 0af31000 00000000
0x0006f8f0:   695130a4 0006f950 00736250 0af31000
0x0006f900:   00000004 00000000 00000000 00000000 

Instructions: (pc=0x0d58e286)
0x0d58e276:   00 00 81 c2 6d 87 00 00 3b ca 73 46 8b 54 24 08
0x0d58e286:   d9 42 04 56 d9 42 08 8b 12 81 e9 6d 87 00 00 d9 


Stack: [0x00030000,0x00070000),  sp=0x0006f890,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [atioglxx.dll+0x16e286]

[error occurred during error reporting, step 120, id 0xc0000005]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  org.lwjgl.opengl.GL11.nglDrawElements(IIILjava/nio/Buffer;IJ)V
J  org.lwjgl.opengl.GL11.glDrawElements(ILjava/nio/IntBuffer;)V
J  stephencarmody.k8.buffer.var.VARIndicesBuffer.glDrawElements()V
J  stephencarmody.k8.core.TexturedTriangles.updateAll()V
j  stephencarmody.k8.core.Application.run()V+31
j  stephencarmody.k8.test.TestApp.main([Ljava/lang/String;)V+73
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x0adb9550 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=9488]
  0x00812df0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=9476]
  0x008118f8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=8428]
  0x00810b60 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=9428]
  0x00807f40 JavaThread "Finalizer" daemon [_thread_blocked, id=9660]
  0x00806a50 JavaThread "Reference Handler" daemon [_thread_blocked, id=9460]
=>0x00736250 JavaThread "main" [_thread_in_native, id=9464]

Other Threads:
  0x00802928 VMThread [id=9432]
  0x008141f0 WatcherThread [id=9276]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 704K, used 126K [0x02980000, 0x02a40000, 0x02e60000)
  eden space 640K,  12% used [0x02980000, 0x02993ef0, 0x02a20000)
  from space 64K,  73% used [0x02a30000, 0x02a3bc58, 0x02a40000)
  to   space 64K,   0% used [0x02a20000, 0x02a20000, 0x02a30000)
 tenured generation   total 8848K, used 5172K [0x02e60000, 0x03704000, 0x06980000)
   the space 8848K,  58% used [0x02e60000, 0x0336d200, 0x0336d200, 0x03704000)
 compacting perm gen  total 8192K, used 5633K [0x06980000, 0x07180000, 0x0a980000)
   the space 8192K,  68% used [0x06980000, 0x06f006d8, 0x06f00800, 0x07180000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x0040c000 	C:\Program Files\Java\jre1.5.0_05\bin\javaw.exe
0x77f80000 - 0x77ffc000 	C:\WINNT\system32\ntdll.dll
0x7c2d0000 - 0x7c335000 	C:\WINNT\system32\ADVAPI32.dll
0x7c570000 - 0x7c623000 	C:\WINNT\system32\KERNEL32.dll
0x77d30000 - 0x77da8000 	C:\WINNT\system32\RPCRT4.dll
0x77e10000 - 0x77e79000 	C:\WINNT\system32\USER32.dll
0x77f40000 - 0x77f7f000 	C:\WINNT\system32\GDI32.dll
0x78000000 - 0x78045000 	C:\WINNT\system32\MSVCRT.dll
0x75030000 - 0x75044000 	C:\WINNT\system32\WS2_32.DLL
0x75020000 - 0x75028000 	C:\WINNT\system32\WS2HELP.DLL
0x6d640000 - 0x6d7cc000 	C:\Program Files\Java\jre1.5.0_05\bin\client\jvm.dll
0x77570000 - 0x775a0000 	C:\WINNT\system32\WINMM.dll
0x6d280000 - 0x6d288000 	C:\Program Files\Java\jre1.5.0_05\bin\hpi.dll
0x690a0000 - 0x690ab000 	C:\WINNT\system32\PSAPI.DLL
0x6d610000 - 0x6d61c000 	C:\Program Files\Java\jre1.5.0_05\bin\verify.dll
0x6d300000 - 0x6d31d000 	C:\Program Files\Java\jre1.5.0_05\bin\java.dll
0x6d630000 - 0x6d63f000 	C:\Program Files\Java\jre1.5.0_05\bin\zip.dll
0x6d190000 - 0x6d1bf000 	C:\Program Files\Java\jre1.5.0_05\bin\cmm.dll
0x6d3c0000 - 0x6d3df000 	C:\Program Files\Java\jre1.5.0_05\bin\jpeg.dll
0x6d000000 - 0x6d167000 	C:\Program Files\Java\jre1.5.0_05\bin\awt.dll
0x77800000 - 0x7781e000 	C:\WINNT\system32\WINSPOOL.DRV
0x76620000 - 0x76631000 	C:\WINNT\system32\MPR.DLL
0x75e60000 - 0x75e7a000 	C:\WINNT\system32\IMM32.dll
0x7ce20000 - 0x7cf0f000 	C:\WINNT\system32\ole32.dll
0x10000000 - 0x10041000 	C:\lwjgl.dll
0x5f580000 - 0x5f5a7000 	C:\WINNT\system32\DINPUT.dll
0x69510000 - 0x695d7000 	C:\WINNT\system32\OPENGL32.dll
0x6fac0000 - 0x6fadf000 	C:\WINNT\system32\GLU32.dll
0x51000000 - 0x51049000 	C:\WINNT\system32\DDRAW.dll
0x728a0000 - 0x728a6000 	C:\WINNT\system32\DCIMAN32.dll
0x77820000 - 0x77827000 	C:\WINNT\system32\VERSION.dll
0x759b0000 - 0x759b6000 	C:\WINNT\system32\LZ32.DLL
0x6d4c0000 - 0x6d4d3000 	C:\Program Files\Java\jre1.5.0_05\bin\net.dll
0x6d4e0000 - 0x6d4e9000 	C:\Program Files\Java\jre1.5.0_05\bin\nio.dll
0x6e420000 - 0x6e426000 	C:\WINNT\system32\INDICDLL.dll
0x61210000 - 0x6121c000 	C:\Program Files\Microsoft Hardware\Mouse\POINT32.dll
0x0d420000 - 0x0da71000 	C:\WINNT\system32\atioglxx.dll
0x6f9a0000 - 0x6f9a8000 	C:\WINNT\system32\HID.DLL
0x77880000 - 0x7790e000 	C:\WINNT\system32\SETUPAPI.DLL
0x7c0f0000 - 0x7c154000 	C:\WINNT\system32\USERENV.DLL
0x71710000 - 0x71794000 	C:\WINNT\system32\COMCTL32.dll
0x61220000 - 0x6122e000 	C:\Program Files\Microsoft Hardware\Mouse\MSH_ZWF.dll
0x5c000000 - 0x5c0c8000 	C:\WINNT\system32\D3DIM700.DLL
0x6d240000 - 0x6d27d000 	C:\Program Files\Java\jre1.5.0_05\bin\fontmanager.dll

VM Arguments:
java_command: C:\k8.jar

Environment Variables:
CLASSPATH=C:\Program Files\Java\jre1.5.0_04\lib\ext\QTJava.zip
PATH=C:\oracle\ora92\bin;C:\Program Files\Java\jdk1.5.0_05\bin;C:\PROGRA~1\Borland\Delphi7\Bin;C:\Program Files\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\Bonjour\
USERNAME=scarmody
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 4, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 2000 Build 2195 Service Pack 4

CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

Memory: 4k page, physical 523256k(41384k free), swap 1276484k(694536k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_05-b05) for windows-x86, built on Aug 26 2005 15:36:02 by "java_re" with MS VC++ 6.0


Passing well in excess of this (250000+ bytes) with ARBVertexBufferObject.glBufferDataARB(int, ByteBuffer, int) doesn't seem to be an issue.

Can anyone successfully pass more than 52392 bytes to GL11.glDrawElements(int, IntBuffer) without crashing?

--
Thanks,
Stephen

stephencarmody

Hehehe....my bad. I should have read the forum before posting, by coincidence it looks like stodge had the same problem as me three days ago (see Crash in Windows but not Linux).

By the way elias's comment in the thread about specifing glEnableClientState but not providing the data was right on the money. But for me it was normals, not colour.

Weird how it works up to a certain data size. :-)

Anyway, stodge there you go, hope that helps.

--
Thanks,
Stephen

stodge

So are my normals screwed up? Or my colour?

Thanks

stodge

I got it - my colours were out of whack. Thanks!