JOGL OpenGL ES error in NetBeans

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

JOGL OpenGL ES error in NetBeans

Netix
Hi,
i am making JAVA application using JOGL(OpenGL ES 3.1). When i am moving on map after while application crash with this error:

http://s1.postimg.org/jvf94lhdb/error.png
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

Netix
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
In reply to this post by Netix
Hi

Please rather show us the content of the file E:\Bitbucket\Firebit Engine Editor\hs_err_pid4332.log and give us a test case to reproduce your bug, something really usable, a SSCCE:
http://sscce.org
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

elect
In reply to this post by Netix
This, usually, is a symptom of something (very) wrong but difficult to catch

Unfortunately, there is no other way to find it out that comment out everything except a small working scenario. Then you build back all the functionalities.

Generally I use a boolean variable to do that, so that I can easily know for sure what was disabled.

Anyway, if you could paste the log content, like gouessej suggested, it might help find the bug.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
Good idea, increase the complexity step by step to find the culprit.

If it happens when calling glDrawArrays or glDrawElements, it will mean that you probably wrongly set the position of a direct NIO buffer when using vertex arrays, VBOs, VAOs, ... and the native code tries to read beyond the limit or the capacity of the buffer.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

Netix
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffe250a1ed4, pid=92, tid=4356
#
# JRE version: Java(TM) SE Runtime Environment (8.0_66-b17) (build 1.8.0_66-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.66-b17 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [OpenGL32.dll+0xe1ed4]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

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

Current thread (0x0000000002588000):  JavaThread "Finalizer" daemon [_thread_in_native, id=4356, stack(0x0000000018c40000,0x0000000018d40000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000a38

Registers:
RAX=0x0000000000000000, RBX=0x00000000025881f8, RCX=0x0000000000000001, RDX=0x00000000e81ebeb0
RSP=0x0000000018d3f108, RBP=0x0000000000000001, RSI=0x0000000018d3f250, RDI=0x0000000000000000
R8 =0x00000000e81ebea0, R9 =0x0000000000000001, R10=0x000000000000000c, R11=0x00000000537d9570
R12=0x00007ffe250a1ec0, R13=0x0000000000000000, R14=0x00000000e81ebeb0, R15=0x0000000002588000
RIP=0x00007ffe250a1ed4, EFLAGS=0x0000000000010283

Top of Stack: (sp=0x0000000018d3f108)
0x0000000018d3f108:   0000000064517418 00000000025881f8
0x0000000018d3f118:   0000000000000001 0000000018d3f250
0x0000000018d3f128:   0000000002588000 000000001e8096f8
0x0000000018d3f138:   0000000022d37f68 0000000000000128
0x0000000018d3f148:   0000000018d3f210 0000000000000000
0x0000000018d3f158:   000000001e8096f8 0000000018d3f260
0x0000000018d3f168:   00000000025a57f4 0000000018d3f678
0x0000000018d3f178:   0000000018d3f210 0000000022d37f68
0x0000000018d3f188:   0000000000000128 0000000000000000
0x0000000018d3f198:   0000000000000000 00007ffe250a1ec0
0x0000000018d3f1a8:   000000001e8096f8 0000000022d37f68
0x0000000018d3f1b8:   0000000002588000 0000000018d3f2e0
0x0000000018d3f1c8:   00000000025a5522 0000000018d3f1d0
0x0000000018d3f1d8:   000000001e8096f8 0000000018d3f260
0x0000000018d3f1e8:   000000001e910028 0000000000000000
0x0000000018d3f1f8:   000000001e8096f8 0000000000000000

Instructions: (pc=0x00007ffe250a1ed4)
0x00007ffe250a1eb4:   cc cc cc cc cc cc 66 0f 1f 44 00 00 8b 05 42 71
0x00007ffe250a1ec4:   01 00 83 f8 40 73 0f 65 48 8b 04 c5 80 14 00 00
0x00007ffe250a1ed4:   ff a0 38 0a 00 00 b8 47 01 00 00 e9 ec d4 ff ff
0x00007ffe250a1ee4:   cc cc cc cc cc cc 66 0f 1f 44 00 00 8b 05 12 71


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x00000000025881f8 is an unknown value
RCX=0x0000000000000001 is an unknown value
RDX=0x00000000e81ebeb0 is an oop

[error occurred during error reporting (printing register info), id 0xc0000005]

Stack: [0x0000000018c40000,0x0000000018d40000],  sp=0x0000000018d3f108,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [OpenGL32.dll+0xe1ed4]
C  [jogl_desktop.dll+0x17418]
C  0x00000000025a57f4

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jogamp.opengl.gl4.GL4bcImpl.dispatch_glDeleteTextures1(ILjava/lang/Object;IZJ)V+0
j  jogamp.opengl.gl4.GL4bcImpl.glDeleteTextures(I[II)V+107
j  opengl.IGLTexture.finalize()V+9
J 686 C1 java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62 bytes) @ 0x000000000285578c [0x0000000002855200+0x58c]
J 681 C1 java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V (6 bytes) @ 0x000000000268f61c [0x000000000268f5c0+0x5c]
j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
  0x000000001a12a800 JavaThread "D3D Screen Updater" daemon [_thread_blocked, id=3532, stack(0x00000000236e0000,0x00000000237e0000)]
  0x0000000002490800 JavaThread "DestroyJavaVM" [_thread_blocked, id=4120, stack(0x0000000002390000,0x0000000002490000)]
  0x0000000019b72800 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=6508, stack(0x0000000022b20000,0x0000000022c20000)]
  0x0000000019b6c800 JavaThread "AWT-Shutdown" [_thread_blocked, id=2788, stack(0x0000000021a30000,0x0000000021b30000)]
  0x0000000019b39000 JavaThread "main-FPSAWTAnimator#00-Timer0" [_thread_blocked, id=2356, stack(0x000000001e430000,0x000000001e530000)]
  0x0000000019b6a000 JavaThread "main-SharedResourceRunner" daemon [_thread_blocked, id=2856, stack(0x000000001ec30000,0x000000001ed30000)]
  0x0000000019a7b000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=460, stack(0x000000001a450000,0x000000001a550000)]
  0x00000000196fd000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=176, stack(0x000000001a200000,0x000000001a300000)]
  0x00000000173b8000 JavaThread "Service Thread" daemon [_thread_blocked, id=6500, stack(0x0000000019720000,0x0000000019820000)]
  0x00000000173b2800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=4744, stack(0x0000000019220000,0x0000000019320000)]
  0x00000000173ad800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=2612, stack(0x0000000019120000,0x0000000019220000)]
  0x00000000173bd800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=3120, stack(0x0000000019020000,0x0000000019120000)]
  0x00000000173ba800 JavaThread "Attach Listener" daemon [_thread_blocked, id=6568, stack(0x0000000018f20000,0x0000000019020000)]
  0x00000000173b9000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6872, stack(0x0000000018e20000,0x0000000018f20000)]
=>0x0000000002588000 JavaThread "Finalizer" daemon [_thread_in_native, id=4356, stack(0x0000000018c40000,0x0000000018d40000)]
  0x000000001737b000 JavaThread "Reference Handler" daemon [_thread_blocked, id=5576, stack(0x0000000018b40000,0x0000000018c40000)]

Other Threads:
  0x0000000017378000 VMThread [stack: 0x0000000018a40000,0x0000000018b40000] [id=7036]
  0x00000000193b7000 WatcherThread [stack: 0x0000000019820000,0x0000000019920000] [id=2360]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 288768K, used 25147K [0x00000000d5780000, 0x00000000e8980000, 0x0000000100000000)
  eden space 265728K, 3% used [0x00000000d5780000,0x00000000d601d0d8,0x00000000e5b00000)
  from space 23040K, 70% used [0x00000000e7200000,0x00000000e81f1bc0,0x00000000e8880000)
  to   space 23552K, 0% used [0x00000000e5b00000,0x00000000e5b00000,0x00000000e7200000)
 ParOldGen       total 87552K, used 38398K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 43% used [0x0000000080600000,0x0000000082b7f918,0x0000000085b80000)
 Metaspace       used 17708K, capacity 17918K, committed 18176K, reserved 1064960K
  class space    used 1856K, capacity 1928K, committed 2048K, reserved 1048576K

Card table byte_map: [0x0000000011950000,0x0000000011d50000] byte_map_base: 0x000000001154d000

Marking Bits: (ParMarkBitMap*) 0x0000000053dba5b0
 Begin Bits: [0x0000000012600000, 0x00000000145e8000)
 End Bits:   [0x00000000145e8000, 0x00000000165d0000)

Polling page: 0x0000000000a60000

CodeCache: size=245760Kb used=6989Kb max_used=7003Kb free=238770Kb
 bounds [0x0000000002590000, 0x0000000002c70000, 0x0000000011590000]
 total_blobs=2663 nmethods=1818 adapters=759
 compilation: enabled

Compilation events (10 events):
Event: 24.247 Thread 0x00000000173bd800 1885       4       graphics.ITileMaterial::bindIndexes (108 bytes)
Event: 24.261 Thread 0x00000000173ad800 1886   !   4       jogamp.common.util.locks.RecursiveLockImpl01Unfairish::validateLocked (147 bytes)
Event: 24.263 Thread 0x00000000173ad800 nmethod 1886 0x0000000002c5f810 code [0x0000000002c5f960, 0x0000000002c5fc58]
Event: 24.266 Thread 0x00000000173bd800 nmethod 1885 0x0000000002c6a010 code [0x0000000002c6a3a0, 0x0000000002c6b9e0]
Event: 24.340 Thread 0x00000000173b2800 1888   !   3       sun.misc.Cleaner::clean (35 bytes)
Event: 24.341 Thread 0x00000000173b2800 nmethod 1888 0x0000000002c61550 code [0x0000000002c61700, 0x0000000002c61a78]
Event: 24.341 Thread 0x00000000173b2800 1889  s    3       sun.misc.Cleaner::remove (89 bytes)
Event: 24.342 Thread 0x00000000173b2800 nmethod 1889 0x0000000002c60dd0 code [0x0000000002c60f40, 0x0000000002c61430]
Event: 24.342 Thread 0x00000000173b2800 1890       3       java.nio.DirectByteBuffer$Deallocator::run (37 bytes)
Event: 24.342 Thread 0x00000000173b2800 nmethod 1890 0x0000000002c5eed0 code [0x0000000002c5f040, 0x0000000002c5f318]

GC Heap History (10 events):
Event: 8.631 GC heap before
{Heap before GC invocations=4 (full 0):
 PSYoungGen      total 38400K, used 38368K [0x00000000d5780000, 0x00000000da280000, 0x0000000100000000)
  eden space 33280K, 100% used [0x00000000d5780000,0x00000000d7800000,0x00000000d7800000)
  from space 5120K, 99% used [0x00000000d7800000,0x00000000d7cf8010,0x00000000d7d00000)
  to   space 5120K, 0% used [0x00000000d9d80000,0x00000000d9d80000,0x00000000da280000)
 ParOldGen       total 87552K, used 22030K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 25% used [0x0000000080600000,0x0000000081b83948,0x0000000085b80000)
 Metaspace       used 17004K, capacity 17268K, committed 17664K, reserved 1064960K
  class space    used 1838K, capacity 1927K, committed 2048K, reserved 1048576K
Event: 8.641 GC heap after
Heap after GC invocations=4 (full 0):
 PSYoungGen      total 71680K, used 5088K [0x00000000d5780000, 0x00000000da280000, 0x0000000100000000)
  eden space 66560K, 0% used [0x00000000d5780000,0x00000000d5780000,0x00000000d9880000)
  from space 5120K, 99% used [0x00000000d9d80000,0x00000000da278010,0x00000000da280000)
  to   space 5120K, 0% used [0x00000000d9880000,0x00000000d9880000,0x00000000d9d80000)
 ParOldGen       total 87552K, used 31254K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 35% used [0x0000000080600000,0x0000000082485978,0x0000000085b80000)
 Metaspace       used 17004K, capacity 17268K, committed 17664K, reserved 1064960K
  class space    used 1838K, capacity 1927K, committed 2048K, reserved 1048576K
}
Event: 8.791 GC heap before
{Heap before GC invocations=5 (full 0):
 PSYoungGen      total 71680K, used 71648K [0x00000000d5780000, 0x00000000da280000, 0x0000000100000000)
  eden space 66560K, 100% used [0x00000000d5780000,0x00000000d9880000,0x00000000d9880000)
  from space 5120K, 99% used [0x00000000d9d80000,0x00000000da278010,0x00000000da280000)
  to   space 5120K, 0% used [0x00000000d9880000,0x00000000d9880000,0x00000000d9d80000)
 ParOldGen       total 87552K, used 31254K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 35% used [0x0000000080600000,0x0000000082485978,0x0000000085b80000)
 Metaspace       used 17004K, capacity 17268K, committed 17664K, reserved 1064960K
  class space    used 1838K, capacity 1927K, committed 2048K, reserved 1048576K
Event: 8.799 GC heap after
Heap after GC invocations=5 (full 0):
 PSYoungGen      total 71680K, used 4192K [0x00000000d5780000, 0x00000000e0380000, 0x0000000100000000)
  eden space 66560K, 0% used [0x00000000d5780000,0x00000000d5780000,0x00000000d9880000)
  from space 5120K, 81% used [0x00000000d9880000,0x00000000d9c98010,0x00000000d9d80000)
  to   space 21504K, 0% used [0x00000000dee80000,0x00000000dee80000,0x00000000e0380000)
 ParOldGen       total 87552K, used 37398K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 42% used [0x0000000080600000,0x0000000082a85998,0x0000000085b80000)
 Metaspace       used 17004K, capacity 17268K, committed 17664K, reserved 1064960K
  class space    used 1838K, capacity 1927K, committed 2048K, reserved 1048576K
}
Event: 8.936 GC heap before
{Heap before GC invocations=6 (full 0):
 PSYoungGen      total 71680K, used 70752K [0x00000000d5780000, 0x00000000e0380000, 0x0000000100000000)
  eden space 66560K, 100% used [0x00000000d5780000,0x00000000d9880000,0x00000000d9880000)
  from space 5120K, 81% used [0x00000000d9880000,0x00000000d9c98010,0x00000000d9d80000)
  to   space 21504K, 0% used [0x00000000dee80000,0x00000000dee80000,0x00000000e0380000)
 ParOldGen       total 87552K, used 37398K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 42% used [0x0000000080600000,0x0000000082a85998,0x0000000085b80000)
 Metaspace       used 17004K, capacity 17268K, committed 17664K, reserved 1064960K
  class space    used 1838K, capacity 1927K, committed 2048K, reserved 1048576K
Event: 8.946 GC heap after
Heap after GC invocations=6 (full 0):
 PSYoungGen      total 154624K, used 14400K [0x00000000d5780000, 0x00000000e0380000, 0x0000000100000000)
  eden space 133120K, 0% used [0x00000000d5780000,0x00000000d5780000,0x00000000dd980000)
  from space 21504K, 66% used [0x00000000dee80000,0x00000000dfc90040,0x00000000e0380000)
  to   space 21504K, 0% used [0x00000000dd980000,0x00000000dd980000,0x00000000dee80000)
 ParOldGen       total 87552K, used 37398K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 42% used [0x0000000080600000,0x0000000082a85998,0x0000000085b80000)
 Metaspace       used 17004K, capacity 17268K, committed 17664K, reserved 1064960K
  class space    used 1838K, capacity 1927K, committed 2048K, reserved 1048576K
}
Event: 14.695 GC heap before
{Heap before GC invocations=7 (full 0):
 PSYoungGen      total 154624K, used 147520K [0x00000000d5780000, 0x00000000e0380000, 0x0000000100000000)
  eden space 133120K, 100% used [0x00000000d5780000,0x00000000dd980000,0x00000000dd980000)
  from space 21504K, 66% used [0x00000000dee80000,0x00000000dfc90040,0x00000000e0380000)
  to   space 21504K, 0% used [0x00000000dd980000,0x00000000dd980000,0x00000000dee80000)
 ParOldGen       total 87552K, used 37398K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 42% used [0x0000000080600000,0x0000000082a85998,0x0000000085b80000)
 Metaspace       used 17543K, capacity 17726K, committed 18176K, reserved 1064960K
  class space    used 1856K, capacity 1928K, committed 2048K, reserved 1048576K
Event: 14.710 GC heap after
Heap after GC invocations=7 (full 0):
 PSYoungGen      total 154624K, used 17399K [0x00000000d5780000, 0x00000000e8880000, 0x0000000100000000)
  eden space 133120K, 0% used [0x00000000d5780000,0x00000000d5780000,0x00000000dd980000)
  from space 21504K, 80% used [0x00000000dd980000,0x00000000dea7dd70,0x00000000dee80000)
  to   space 23040K, 0% used [0x00000000e7200000,0x00000000e7200000,0x00000000e8880000)
 ParOldGen       total 87552K, used 38350K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 43% used [0x0000000080600000,0x0000000082b73918,0x0000000085b80000)
 Metaspace       used 17543K, capacity 17726K, committed 18176K, reserved 1064960K
  class space    used 1856K, capacity 1928K, committed 2048K, reserved 1048576K
}
Event: 24.328 GC heap before
{Heap before GC invocations=8 (full 0):
 PSYoungGen      total 154624K, used 150519K [0x00000000d5780000, 0x00000000e8880000, 0x0000000100000000)
  eden space 133120K, 100% used [0x00000000d5780000,0x00000000dd980000,0x00000000dd980000)
  from space 21504K, 80% used [0x00000000dd980000,0x00000000dea7dd70,0x00000000dee80000)
  to   space 23040K, 0% used [0x00000000e7200000,0x00000000e7200000,0x00000000e8880000)
 ParOldGen       total 87552K, used 38350K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 43% used [0x0000000080600000,0x0000000082b73918,0x0000000085b80000)
 Metaspace       used 17706K, capacity 17918K, committed 18176K, reserved 1064960K
  class space    used 1856K, capacity 1928K, committed 2048K, reserved 1048576K
Event: 24.339 GC heap after
Heap after GC invocations=8 (full 0):
 PSYoungGen      total 288768K, used 16326K [0x00000000d5780000, 0x00000000e8980000, 0x0000000100000000)
  eden space 265728K, 0% used [0x00000000d5780000,0x00000000d5780000,0x00000000e5b00000)
  from space 23040K, 70% used [0x00000000e7200000,0x00000000e81f1bc0,0x00000000e8880000)
  to   space 23552K, 0% used [0x00000000e5b00000,0x00000000e5b00000,0x00000000e7200000)
 ParOldGen       total 87552K, used 38398K [0x0000000080600000, 0x0000000085b80000, 0x00000000d5780000)
  object space 87552K, 43% used [0x0000000080600000,0x0000000082b7f918,0x0000000085b80000)
 Metaspace       used 17706K, capacity 17918K, committed 18176K, reserved 1064960K
  class space    used 1856K, capacity 1928K, committed 2048K, reserved 1048576K
}

Deoptimization events (10 events):
Event: 11.763 Thread 0x0000000019b72800 Uncommon trap: reason=array_check action=maybe_recompile pc=0x0000000002a9f394 method=java.util.AbstractCollection.toArray([Ljava/lang/Object;)[Ljava/lang/Object; @ 119
Event: 11.846 Thread 0x0000000019b72800 Uncommon trap: reason=array_check action=maybe_recompile pc=0x0000000002a9f394 method=java.util.AbstractCollection.toArray([Ljava/lang/Object;)[Ljava/lang/Object; @ 119
Event: 11.863 Thread 0x0000000019b72800 Uncommon trap: reason=array_check action=maybe_recompile pc=0x0000000002a9f394 method=java.util.AbstractCollection.toArray([Ljava/lang/Object;)[Ljava/lang/Object; @ 119
Event: 12.361 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002a2c7c8 method=map.IMapTile.isInView(Ldynamics/ICamera;Lmap/IMapTile$Type;)Z @ 248
Event: 13.028 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002af5e40 method=map.IWorld.update(F)V @ 298
Event: 13.044 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000276e1b0 method=map.IWorld.update(F)V @ 298
Event: 16.011 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002b967c4 method=map.IWorld.update(F)V @ 361
Event: 16.044 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002b88214 method=map.IWorld.update(F)V @ 361
Event: 19.278 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002be052c method=map.IWorld.update(F)V @ 212
Event: 19.294 Thread 0x0000000019b72800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002b8bb20 method=map.IWorld.update(F)V @ 361

Internal exceptions (10 events):
Event: 0.139 Thread 0x0000000002490800 Exception  (0x00000000d59a6370) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
Event: 0.139 Thread 0x0000000002490800 Exception
 (0x00000000d59a6580) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
Event: 0.139 Thread 0x0000000002490800 Exception
 (0x00000000d59aa3c8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
Event: 0.140 Thread 0x0000000002490800 Exception
 (0x00000000d59aa5d8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
Event: 0.144 Thread 0x0000000002490800 Exception
 (0x00000000d59ac9a0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 0.186 Thread 0x0000000002490800 Exception
 (0x00000000d5a7a4d0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\methodHandles.cpp, line 1146]
Event: 0.188 Thread 0x0000000002490800 Exception
 (0x00000000d5a878a0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\methodHandles.cpp, line 1146]
Event: 0.243 Thread 0x0000000002490800 Exception
 (0x00000000d5b31408) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 0.332 Thread 0x0000000002490800 Implicit null exception at 0x0000000002706122 to 0x00000000027062e9
Event: 7.797 Thread 0x0000000002490800 Exception
 (0x00000000d59f0b80) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u66\4988\hotspot\src\share\vm\runtime\reflection.cpp, line 1092]

Events (10 events):
Event: 24.343 Executing VM operation: RevokeBias
Event: 24.343 Executing VM operation: RevokeBias done
Event: 24.343 Executing VM operation: RevokeBias
Event: 24.343 Executing VM operation: RevokeBias done
Event: 24.343 Executing VM operation: RevokeBias
Event: 24.343 Executing VM operation: RevokeBias done
Event: 24.343 Executing VM operation: RevokeBias
Event: 24.343 Executing VM operation: RevokeBias done
Event: 24.343 Executing VM operation: BulkRevokeBias
Event: 24.343 Executing VM operation: BulkRevokeBias done


Dynamic libraries:
0x00007ff7bb860000 - 0x00007ff7bb897000 C:\Program Files\Java\jdk1.8.0_66\bin\java.exe
0x00007ffe420d0000 - 0x00007ffe42291000 C:\Windows\SYSTEM32\ntdll.dll
0x00007ffe3f7a0000 - 0x00007ffe3f84d000 C:\Windows\system32\KERNEL32.DLL
0x00007ffe3eba0000 - 0x00007ffe3ed7d000 C:\Windows\system32\KERNELBASE.dll
0x00007ffe41fc0000 - 0x00007ffe42066000 C:\Windows\system32\ADVAPI32.dll
0x00007ffe3fe10000 - 0x00007ffe3fead000 C:\Windows\system32\msvcrt.dll
0x00007ffe3f8b0000 - 0x00007ffe3f90b000 C:\Windows\system32\sechost.dll
0x00007ffe415a0000 - 0x00007ffe416c6000 C:\Windows\system32\RPCRT4.dll
0x00007ffe3f910000 - 0x00007ffe3fa5e000 C:\Windows\system32\USER32.dll
0x00007ffe41940000 - 0x00007ffe41ac6000 C:\Windows\system32\GDI32.dll
0x00007ffe332d0000 - 0x00007ffe33544000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10240.16384_none_f41f7b285750ef43\COMCTL32.dll
0x00007ffe41d00000 - 0x00007ffe41d36000 C:\Windows\system32\IMM32.DLL
0x00007ffe417c0000 - 0x00007ffe4191c000 C:\Windows\system32\MSCTF.dll
0x00000000534d0000 - 0x00000000535a2000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\msvcr100.dll
0x00000000535b0000 - 0x0000000053e39000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\server\jvm.dll
0x00007ffe3ff10000 - 0x00007ffe3ff18000 C:\Windows\system32\PSAPI.DLL
0x00007ffe3a510000 - 0x00007ffe3a519000 C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffe3ca10000 - 0x00007ffe3ca33000 C:\Windows\SYSTEM32\WINMM.dll
0x00007ffe394f0000 - 0x00007ffe394fa000 C:\Windows\SYSTEM32\VERSION.dll
0x00007ffe41c90000 - 0x00007ffe41cf9000 C:\Windows\system32\WS2_32.dll
0x00007ffe417b0000 - 0x00007ffe417b8000 C:\Windows\system32\NSI.dll
0x00000000009f0000 - 0x0000000000a1c000 C:\Windows\SYSTEM32\WINMMBASE.dll
0x00007ffe3ede0000 - 0x00007ffe3ee24000 C:\Windows\system32\cfgmgr32.dll
0x00007ffe3d3d0000 - 0x00007ffe3d3f7000 C:\Windows\SYSTEM32\DEVOBJ.dll
0x00000000534c0000 - 0x00000000534cf000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\verify.dll
0x0000000053490000 - 0x00000000534b9000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\java.dll
0x0000000053470000 - 0x0000000053486000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\zip.dll
0x00007ffe40070000 - 0x00007ffe41592000 C:\Windows\system32\SHELL32.dll
0x00007ffe3f170000 - 0x00007ffe3f798000 C:\Windows\system32\windows.storage.dll
0x00007ffe41d40000 - 0x00007ffe41fbc000 C:\Windows\system32\combase.dll
0x00007ffe3feb0000 - 0x00007ffe3ff01000 C:\Windows\system32\shlwapi.dll
0x00007ffe3eb70000 - 0x00007ffe3eb7f000 C:\Windows\system32\kernel.appcore.dll
0x00007ffe3f0b0000 - 0x00007ffe3f163000 C:\Windows\system32\shcore.dll
0x00007ffe3eb20000 - 0x00007ffe3eb6a000 C:\Windows\system32\powrprof.dll
0x00007ffe3eb80000 - 0x00007ffe3eb93000 C:\Windows\system32\profapi.dll
0x0000000053290000 - 0x0000000053428000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\awt.dll
0x00007ffe3fad0000 - 0x00007ffe3fb8e000 C:\Windows\system32\OLEAUT32.dll
0x00007ffe3d250000 - 0x00007ffe3d2c8000 C:\Windows\system32\apphelp.dll
0x00007ffe3c770000 - 0x00007ffe3c792000 C:\Windows\system32\DWMAPI.DLL
0x00007ffe3d400000 - 0x00007ffe3d496000 C:\Windows\system32\uxtheme.dll
0x00007ffe3ff20000 - 0x00007ffe40061000 C:\Windows\system32\ole32.dll
0x00007ffe3e920000 - 0x00007ffe3e98b000 C:\Windows\SYSTEM32\bcryptPrimitives.dll
0x00007ffe1bf20000 - 0x00007ffe1c130000 C:\Windows\system32\d3d9.dll
0x00007ffe292d0000 - 0x00007ffe29437000 C:\Windows\SYSTEM32\aticfx64.dll
0x00007ffe2ff50000 - 0x00007ffe2ff71000 C:\Windows\SYSTEM32\atiu9p64.dll
0x00007ffe1b6c0000 - 0x00007ffe1bf19000 C:\Windows\SYSTEM32\atiumd64.dll
0x0000000053e40000 - 0x00000000546c8000 C:\Windows\SYSTEM32\atiumd6a.dll
0x00007ffe3e3f0000 - 0x00007ffe3e407000 C:\Windows\SYSTEM32\CRYPTSP.dll
0x00007ffe3e990000 - 0x00007ffe3e9b8000 C:\Windows\SYSTEM32\bcrypt.dll
0x00007ffe3dfe0000 - 0x00007ffe3e013000 C:\Windows\system32\rsaenh.dll
0x00007ffe3e3c0000 - 0x00007ffe3e3df000 C:\Windows\SYSTEM32\USERENV.dll
0x00007ffe3e590000 - 0x00007ffe3e59b000 C:\Windows\SYSTEM32\CRYPTBASE.dll
0x0000000053450000 - 0x000000005346a000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\net.dll
0x00007ffe3e2d0000 - 0x00007ffe3e32d000 C:\Windows\system32\mswsock.dll
0x00007ffe3c580000 - 0x00007ffe3c5b8000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ffe3c280000 - 0x00007ffe3c28b000 C:\Windows\SYSTEM32\WINNSI.DLL
0x00007ffe3b640000 - 0x00007ffe3b656000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007ffe3b620000 - 0x00007ffe3b63a000 C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x0000000053430000 - 0x0000000053441000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\nio.dll
0x00000000637c0000 - 0x00000000637cd000 C:\Users\Netix\AppData\Local\Temp\jogamp_0000\file_cache\jln2601777909829645321\jln2000356234491804818\natives\windows-amd64\gluegen-rt.dll
0x0000000053190000 - 0x0000000053197000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\jawt.dll
0x000000006a440000 - 0x000000006a44d000 C:\Users\Netix\AppData\Local\Temp\jogamp_0000\file_cache\jln2601777909829645321\jln2000356234491804818\natives\windows-amd64\nativewindow_awt.dll
0x000000006c100000 - 0x000000006c10f000 C:\Users\Netix\AppData\Local\Temp\jogamp_0000\file_cache\jln2601777909829645321\jln2000356234491804818\natives\windows-amd64\nativewindow_win32.dll
0x00007ffe24fc0000 - 0x00007ffe250e8000 C:\Windows\SYSTEM32\OpenGL32.dll
0x00007ffe33c90000 - 0x00007ffe33cbe000 C:\Windows\SYSTEM32\GLU32.dll
0x00007ffe22800000 - 0x00007ffe228f6000 C:\Windows\SYSTEM32\DDRAW.dll
0x00007ffe3aae0000 - 0x00007ffe3aae8000 C:\Windows\SYSTEM32\DCIMAN32.dll
0x0000000064500000 - 0x00000000645b1000 C:\Users\Netix\AppData\Local\Temp\jogamp_0000\file_cache\jln2601777909829645321\jln2000356234491804818\natives\windows-amd64\jogl_desktop.dll
0x0000000064340000 - 0x00000000643a2000 C:\Users\Netix\AppData\Local\Temp\jogamp_0000\file_cache\jln2601777909829645321\jln2000356234491804818\natives\windows-amd64\jogl_mobile.dll
0x00007ffe370a0000 - 0x00007ffe370b8000 C:\Windows\SYSTEM32\atig6pxx.dll
0x0000000050510000 - 0x0000000052310000 C:\Windows\SYSTEM32\atio6axx.dll
0x00007ffe3fb90000 - 0x00007ffe3fd55000 C:\Windows\system32\SETUPAPI.dll
0x00007ffe26230000 - 0x00007ffe26371000 C:\Windows\SYSTEM32\atiadlxx.dll
0x00007ffe3be70000 - 0x00007ffe3bff3000 C:\Windows\SYSTEM32\PROPSYS.dll
0x00007ffe3c8d0000 - 0x00007ffe3c8e3000 C:\Windows\SYSTEM32\WTSAPI32.dll
0x00007ffe3ed80000 - 0x00007ffe3edd4000 C:\Windows\system32\WINTRUST.dll
0x00007ffe3eb00000 - 0x00007ffe3eb11000 C:\Windows\system32\MSASN1.dll
0x00007ffe3ee30000 - 0x00007ffe3eff1000 C:\Windows\system32\CRYPT32.dll
0x00007ffe33c60000 - 0x00007ffe33c8c000 C:\Windows\SYSTEM32\atig6txx.dll
0x0000000053240000 - 0x0000000053287000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\fontmanager.dll
0x00000000531a0000 - 0x00000000531e2000 C:\Program Files\Java\jdk1.8.0_66\jre\bin\t2k.dll
0x00007ffe29c30000 - 0x00007ffe29dba000 C:\Windows\SYSTEM32\dbghelp.dll

VM Arguments:
jvm_args: -Dfile.encoding=UTF-8
java_command: main.Main
java_class_path (initial): E:\programovani\Java\libs\jogl\gluegen-rt-natives-windows-amd64.jar;E:\programovani\Java\libs\jogl\gluegen-rt.jar;E:\programovani\Java\libs\jogl\jogl-all-natives-windows-amd64.jar;E:\programovani\Java\libs\jogl\jogl-all.jar;E:\programovani\Java\libs\jogl\gluegen-rt-natives-windows-i586.jar;E:\programovani\Java\libs\jogl\jogl-all-natives-windows-i586.jar;E:\Bitbucket\Firebit Engine Editor\build\classes
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Skype\Phone\
USERNAME=Netix
OS=Windows_NT
PROCESSOR_IDENTIFIER=AMD64 Family 21 Model 2 Stepping 0, AuthenticAMD



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

OS: Windows 10.0 , 64 bit Build 10240 (10.0.10240.16384)

CPU:total 6 (6 cores per cpu, 1 threads per core) family 21 model 2 stepping 0, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, mmxext, 3dnowpref, lzcnt, sse4a, tsc, tscinvbit, tscinv, bmi1

Memory: 4k page, physical 8358036k(3778224k free), swap 10324116k(4587560k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.66-b17) for windows-amd64 JRE (1.8.0_66-b17), built on Oct  6 2015 18:55:33 by "java_re" with MS VC++ 10.0 (VS2010)

time: Sun Oct 25 16:58:07 2015
elapsed time: 24 seconds (0d 0h 0m 24s)

Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

Netix
Now, when i am looking at log, maybe there something wrong with my finalize method in IGLTexture class. I am coding in JAVA after i have coded in c++ for years, so i am used to work with destruktors. In JAVA i read something about finalize() method, that its working as destruktors in c++. So my finalize method looks like:

protected void finalize()
    {
        gl.glDeleteTextures(1, _textureId, 0);
        release();
    }
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
In reply to this post by Netix
I'm not sure that deleting a texture identifier in a finalizer is a good idea. You're not sure that the OpenGL context is current when you do it, I'm almost sure that it isn't on the thread that performs the garbage collection.

You should do this cleanup elsewhere and call those methods in GLEventListener.dispose() for example.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
In reply to this post by Netix
The Java heap is managed but the native heap is unmanaged. Overriding the finalizer is rarely useful. You can't call an OpenGL method wherever you want, you must call OpenGL methods on a thread on which the OpenGL context is current.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

Netix
In reply to this post by Netix
When i was deleted this function its working. But Texture is not deleted. Any idea how handle it in JAVA?
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
You don't have to delete the texture identifier at the end of the program as JOGL will do it for you but you can delete it at runtime by calling glDeleteTextures in a method in which the OpenGL context is current, for example in GLEventListener.display() or in GLEventListener.dispose().
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

Xerxes RÃ¥nby
I notice from your crash log that NetBeans still include classes from the "build" directory, a directory that NetBeans will delete!

Firebit Engine Editor\build\classes

Make sure that you run your application for a directory that NetBeans will not delete at runtime!

2015-10-26 21:33 GMT+01:00 gouessej [via jogamp] <[hidden email]>:
You don't have to delete the texture identifier at the end of the program as JOGL will do it for you but you can delete it at runtime by calling glDeleteTextures in a method in which the OpenGL context is current, for example in GLEventListener.display() or in GLEventListener.dispose().


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/JOGL-OpenGL-ES-error-in-NetBeans-tp4035582p4035603.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

elect
In reply to this post by Netix
Netix wrote
Now, when i am looking at log, maybe there something wrong with my finalize method in IGLTexture class. I am coding in JAVA after i have coded in c++ for years, so i am used to work with destruktors.
First, as Gouessej said, everything OpenGL related should be called from the methods belonging to the GLEventListener.

Second, since you come from C++ word, if you want to optimize your java program memory management, you need to change your approach from destructors to memory pools. Although java GC are, nowadays, quite advanced and efficient, you may want to reduce their interventions to the minimum.

If you know you are going to use a variable for each frame, avoid instantiating it every time, declare it somewhere and re-use.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
Object pooling should be avoided except in a very few particular cases since Java 1.4. I advise to have a clear way of identifying a resource to avoid loading the same texture several times. If you use direct NIO buffers to store the texture data, it's up to you to release their memory on the native heap, the garbage collector won't help.

Netix, please never store a GL instance, it can be invalidated at any time.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

elect
gouessej wrote
If you use direct NIO buffers to store the texture data, it's up to you to release their memory on the native heap, the garbage collector won't help.
What about this? He says they are garbage collected using a phantom reference
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

jmaasing
Java does release native buffers back when the Java Buffer object is garbage collected. So using NIO buffers is not automatically a memory leak.
But there are 2 catches:

Given that a NIO buffer is collectable (i.e. the java side has no more references to a buffer), will the GC collect it? Probably not since the buffer object on the heap is quite small so the GC usually does not bother, it can reclaim more memory by collecting other "dead" references so it may prioritize other things. Remember that the native memory is off-heap so not visible to the GC. So it is better that your code knows about the native memory allocations and clean them up itself.

The other catch is that texture memory is probably uploaded to the graphics card to be of any use. Since graphics memory is a scarce resource you really want to manage that yourself since only your code knows what textures are of interest at a given time. To inform the OpenGL-driver that you are done with a texture and it can be destroyed you must do so on a thread with an active GL Context and the JVM does not know anything about that so it is up to user code to manage that.

So it all boils down to what gouessej said :-)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
In reply to this post by elect
I advise you to look at the source code of OpenJDK instead of assuming that the content of this SO post is true but actually, you seem to have misunderstood it a little bit. The garbage collector will effectively release the memory of a direct NIO buffer on the native heap when it releases the memory of an object referring to it on the Java heap. However, if you run out of native memory before running out of Java memory, you'll be out of luck (unable to create another direct NIO buffer, OutOfMemoryError). I quoted a document written by IBM about this subject, I don't remember where it is but I can probably find it again...

Moreover, this simplistic code doesn't handle as much cases as my deallocator helper, this code only treats the most trivial case of a direct NIO buffer created by calling ByteBuffer.allocateDirect().

Finally, read carefully the end of the comment in the post you quote. The suggested hack is almost necessary to avoid an OutOfMemoryError.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
In reply to this post by elect
This is a better explanation :) with the article of IBM on the native memory.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

elect
No way I am gonna dig the OpenJDK source code ^^

I just bringt it in the discussion, since I read it also some other times about GC taking care (somehow) of native buffers. I just wanted to get it clear.

Anyway, thanks both for your reply, very interesting the IBM article
Reply | Threaded
Open this post in threaded view
|

Re: JOGL OpenGL ES error in NetBeans

gouessej
Administrator
This is something that we could clarify in the wiki but after reading the IBM article, you probably understand better... what it written in the Java documentation concerning the direct NIO buffers:
The contents of direct buffers may reside outside of the normal garbage-collected heap
http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#direct

I advise you to evaluate correctly the reliability of a source of information and the most straightforward way to understand how the direct NIO buffers work consists in looking at their implementations.
Julien Gouesse | Personal blog | Website
12