Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: JVM Crash java 1.6.0_12, JOGL sun.java2d.d3d=false OR sun.java2d.noddraw=true on: 2011-05-27 16:32:09
Hi, thanks for your reply, yeah that is reasonable, was not looking for a specific bug fix within JOGL, just wanted to post this out there to see if anybody else was experiencing a similar issue and for a possible work around.

I tried to write a simple program to reproduce it, however it does not crash even with the same parameters (java 1.6.0_12, sun.java.2d.d3d=false and sun.java2d.noddraw=true).

Afterwards, I debugged my application and found that the crash happens at GLProfile.initSingleton().  For this function I pass in false, since openGL will not be used every time by the application.  My application does a lot of Java2D drawing.

Further debugging shows that the actual crash happens at line 1266 of GLProfile.class:


boolean addedAnyProfile = initProfilesForDevice(defaultDesktopDevice) ||
initProfilesForDevice(defaultEGLDevice);



if you look at the code for initProfilesForDevice() this is what it is:
    /**
     * @param device the device for which profiles shall be initialized
     * @return true if any profile for the device exists, otherwise false
     */
    private static synchronized boolean initProfilesForDevice(AbstractGraphicsDevice device) {
        if(null == device) {
            return false;
        }
        GLDrawableFactory factory = GLDrawableFactory.getFactoryImpl(device);
        factory.enterThreadCriticalZone();
        try {
            return initProfilesForDeviceImpl(device);
        } finally {
            factory.leaveThreadCriticalZone();
        }
    }



The weird thing is that if I step over this using the debugger then I disconnect from the debugger letting the application continue, it does not crash.  However if i let the application continue before this function, it crashes. 

What is this thread critical zone for?  If I am able to debug through it and the application works fine, this probably means that there is some thread miscommunication that when ran fast it is not synchronized or something...



2  Java Game APIs & Engines / JOGL Development / JVM Crash java 1.6.0_12, JOGL sun.java2d.d3d=false OR sun.java2d.noddraw=true on: 2011-05-24 16:17:40
Experiencing a JVM crash when using java 1.6.0_12 with either sun.java2d.d3d=false AND/OR sun.java2d.noddraw=true.

It works just fine when I do one of the following:

-get rid of BOTH sun.java2d.d3d=false OR sun.java2d.noddraw=true
-switch to java 1.6.0_22 (have not tested it with other versions)

JOGL documentation specifies that in order to avoid issues, you have to set sun.java2d.d3d=false.  However in my case that crashes with 1.6.0_12, and has not relevant impact on 1.6.0.22.

Currently, my users have to stay in java 1.6.0_12, the usage of OpenGL is a small part of the application.

My machine is Windows7, however this was experienced accross Windows XP and accross various graphics cards as well.

Part of the hs_err_pidXXXX.log, if requested I will share the whole file:



#
# An unexpected error has been detected by Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x634f0000, pid=12240, tid=15188
#
# Java VM: Java HotSpot(TM) Client VM (11.2-b01 mixed mode windows-x86)
# Problematic frame:
# C  0x634f0000
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/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 (0x63673000):  JavaThread "AWT-EventQueue-0-SharedResourceRunner" daemon [_thread_in_native, id=15188, stack(0x66030000,0x66130000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x634f0000

Registers:
EAX=0x00200310, EBX=0x63673100, ECX=0x00000000, EDX=0x3b01020d
ESP=0x6612f6f8, EBP=0x6612f738, ESI=0x00000000, EDI=0x00000004
EIP=0x634f0000, EFLAGS=0x00010286

Top of Stack: (sp=0x6612f6f8)
0x6612f6f8:   616abaa6 3b01020d 00000000 00000000
0x6612f708:   6612f7f8 63673114 63673000 00000006
0x6612f718:   00000001 00000000 00000001 00000000
0x6612f728:   00000000 00000000 00000000 01007478
0x6612f738:   6612f778 5daac606 3b01020d 00000000
0x6612f748:   6612f710 00000000 3b01020d 00000000
0x6612f758:   616a7470 56c1047c 00000008 63673000
0x6612f768:   0751f800 0751f800 0751f800 63673000

Instructions: (pc=0x634f0000)
0x634efff0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x634f0000:   
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xc0000005]

Stack: [0x66030000,0x66130000],  sp=0x6612f6f8,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x634f0000
C  [jogl_desktop.dll+0x3c606]
j  jogamp.opengl.windows.wgl.WGLExtImpl.dispatch_wglCreateContextAttribsARB1(JJLjava/lang/Object;IZJ)J+0
j  jogamp.opengl.windows.wgl.WGLExtImpl.wglCreateContextAttribsARB(JJ[II)J+98
j  jogamp.opengl.windows.wgl.WindowsWGLContext.createContextARBImpl(JZIII)J+323
j  jogamp.opengl.GLContextImpl.createContextARBVersions(JZIIIII[I[I)J+146
j  jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(IZ)V+123
j  jogamp.opengl.GLContextImpl.mapGLVersions(Ljavax/media/nativewindow/AbstractGraphicsDevice;)V+9
j  jogamp.opengl.GLContextImpl.createContextARB(JZ[I[I[I)J+121
j  jogamp.opengl.windows.wgl.WindowsWGLContext.createImpl()Z+382
j  jogamp.opengl.GLContextImpl.makeCurrentLocking()I+126
j  jogamp.opengl.GLContextImpl.makeCurrent()I+106
j  jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory$SharedResourceImplementation.createSharedResource(Ljava/lang/String;)Ljogamp/opengl/SharedResourceRunner$Resource;+226
j  jogamp.opengl.SharedResourceRunner.run()V+213
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jogamp.opengl.windows.wgl.WGLExtImpl.dispatch_wglCreateContextAttribsARB1(JJLjava/lang/Object;IZJ)J+0
j  jogamp.opengl.windows.wgl.WGLExtImpl.wglCreateContextAttribsARB(JJ[II)J+98
j  jogamp.opengl.windows.wgl.WindowsWGLContext.createContextARBImpl(JZIII)J+323
j  jogamp.opengl.GLContextImpl.createContextARBVersions(JZIIIII[I[I)J+146
j  jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(IZ)V+123
j  jogamp.opengl.GLContextImpl.mapGLVersions(Ljavax/media/nativewindow/AbstractGraphicsDevice;)V+9
j  jogamp.opengl.GLContextImpl.createContextARB(JZ[I[I[I)J+121
j  jogamp.opengl.windows.wgl.WindowsWGLContext.createImpl()Z+382
j  jogamp.opengl.GLContextImpl.makeCurrentLocking()I+126
j  jogamp.opengl.GLContextImpl.makeCurrent()I+106
j  jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory$SharedResourceImplementation.createSharedResource(Ljava/lang/String;)Ljogamp/opengl/SharedResourceRunner$Resource;+226
j  jogamp.opengl.SharedResourceRunner.run()V+213
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (25 views)
2014-09-19 03:14:18

Dwinin (39 views)
2014-09-12 09:08:26

Norakomi (68 views)
2014-09-10 13:57:51

TehJavaDev (93 views)
2014-09-10 06:39:09

Tekkerue (47 views)
2014-09-09 02:24:56

mitcheeb (68 views)
2014-09-08 06:06:29

BurntPizza (51 views)
2014-09-07 01:13:42

Longarmx (38 views)
2014-09-07 01:12:14

Longarmx (44 views)
2014-09-07 01:11:22

Longarmx (40 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!