Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JVM Crash java 1.6.0_12, JOGL sun.java2d.d3d=false OR sun.java2d.noddraw=true  (Read 3749 times)
0 Members and 1 Guest are viewing this topic.
Offline ichiban

Junior Newbie





« Posted 2011-05-24 18: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
Offline gouessej

« In padded room »



TUER


« Reply #1 - Posted 2011-05-27 14:20:56 »

Hi!

Thank you for the report. However, we cannot provide fixes for bugs of the JVM already fixed in later versions, do you see what I mean? A small test case to reproduce your bug would be useful to see whether it is really a bug of JOGL.

Offline ichiban

Junior Newbie





« Reply #2 - Posted 2011-05-27 18: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...



Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej

« In padded room »



TUER


« Reply #3 - Posted 2011-05-27 22:59:10 »

Please speak about that to Sven as you have some precise pieces of information now. Thanks for debugging Smiley Go to http://jogamp.org

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (23 views)
2014-04-15 18:08:23

BurntPizza (18 views)
2014-04-15 03:46:01

UprightPath (32 views)
2014-04-14 17:39:50

UprightPath (16 views)
2014-04-14 17:35:47

Porlus (32 views)
2014-04-14 15:48:38

tom_mai78101 (58 views)
2014-04-10 04:04:31

BurntPizza (116 views)
2014-04-08 23:06:04

tom_mai78101 (216 views)
2014-04-05 13:34:39

trollwarrior1 (183 views)
2014-04-04 12:06:45

CJLetsGame (190 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!