sun.java2d.noddraw=true prevent my applet for work?

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

sun.java2d.noddraw=true prevent my applet for work?

Alexei A. Morozov
Dear colleagues,

I have meet a strange bug linked with the -Dsun.java2d.noddraw=true option that is recommended for use in manuals. My demo applet use the following jar files:

gluegen-rt.jar
gluegen-rt-natives-windows-i586.jar
jogl-all.jar
jogl-all-natives-windows-i586.jar
j3d-core.jar
j3d-core-utils.jar
vecmath.jar
morozov.jar - My own JAR
main.jar - My own JAR

The HTML file is the following (this version does work):
<HTML>
<HEAD>
<TITLE>Test_Canvas3D_11_Java (PickCanvas)</TITLE>
</HEAD>
<BODY>
<applet code = "target.Main" archive = "main.jar" width = "75%" height = "75%">
<PARAM name="java_arguments" value="-Dsun.java2d.noddraw=false">
</applet>
</BODY>
</HTML>
See figure:


This version of the HTML file does NOT work:
<HTML>
<HEAD>
<TITLE>Test_Canvas3D_11_Java (PickCanvas)</TITLE>
</HEAD>
<BODY>
<applet code = "target.Main" archive = "main.jar" width = "75%" height = "75%">
<PARAM name="java_arguments" value="-Dsun.java2d.noddraw=true">
</applet>
</BODY>
</HTML>
See figure:


I cannot understand what could be the reason for this strange behavior.
I have understood only that this issue is computer-dependent. I have reproduced it on two computers with the following configuration:

java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
Microsoft Windows XP Pro 2002, SP3
Q9450 @2.5Gh, NVIDIA GeForce 8800 GS

I have found some old posts in the Web considering problems with use of sun.java2d.noddraw=true, but it seems the problem was not explained and fixed still.

Have anybody an idea what is the problem, or even what should I check first of all to determine it please?

Thank you,

Alexei
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

gouessej
Administrator
Hi Alexei

Do you reproduce this behavior with other versions of Windows? Windows 7? Do you reproduce this bug with Java 1.6? Have you ever tested with Mozilla Firefox? Maybe it is only happening in Opera.

Keep in mind that applets are not that reliable even though the situation has been improved these last years. I prefer using Java Web Start, I don't deeply depend on the web browser, it is really more reliable.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

Alexei A. Morozov
Hi Julien

> Keep in mind that applets are not that reliable even though the situation has been improved
> these last years. I prefer using Java Web Start, I don't deeply depend on the web browser,
> it is really more reliable.

Thank you for your reply (and this terrible truth about the applets :).

Well, my investigations show that:

1) The problem can be reproduced on various browsers, including: Internet Explorer 8 Beta, Opera 12.02, Google Chrome 22.0.1229.94 m, Mozilla Firefox 3.6.8. So, this is not a browser problem, probably.
2) The problem can be reproduced on computers with various graphic cards, including NVIDIA GeForce 8800GS and ASUS EAH4350. So, this is not a graphic card OpenGL bug problem, probably.
3) I CANNOT reproduce the problem on different operation systems, including: Windows 7 and Windows XP 64-bit.
4) Unfortunately, I cannot check the test with JDK 1.6, because one JAR file is based on JDK 1.7 features (though these features are not used in this particular test actually). Nevertheless, I suppose that the problem is not in JDK version, because similar problem was reported about 10 years ago already (see closed bug 4690088 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4690088), but was not explained and fixed in time. I don’t use fullscreen mode (as in 4690088), but specifying sun.java2d.noddraw=true causes my test application to hang actually.

Alexei
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

Sven Gothel
Administrator
> Hi Julien

>
>> Keep in mind that applets are not that reliable even though the situation has been improved
>> these last years. I prefer using Java Web Start, I don't deeply depend on the web browser,
>> it is really more reliable.
>
> Thank you for your reply (and this terrible truth about the applets :).
>
> Well, my investigations show that:
>
> 1) The problem can be reproduced on various browsers, including: Internet Explorer 8 Beta, Opera 12.02, Google Chrome 22.0.1229.94 m, Mozilla Firefox 3.6.8. So, this is not a browser problem, probably.
> 2) The problem can be reproduced on computers with various graphic cards, including NVIDIA GeForce 8800GS and ASUS EAH4350. So, this is not a graphic card OpenGL bug problem, probably.
> 3) I CANNOT reproduce the problem on different operation systems, including: Windows 7 and Windows XP 64-bit.
3b) It CAN be reproduced on "Microsoft Windows XP Pro" ! (as you reported)
3c) It CANNOT be reproduced on Linux ??

> 4) Unfortunately, I cannot check the test with JDK 1.6, because one JAR file is based on JDK 1.7 features (though these features are not used in this particular test actually). Nevertheless, I suppose that the problem is not in JDK version, because similar problem was reported about 10 years ago already (see closed bug 4690088 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4690088), but was not explained and fixed in time. I don’t use fullscreen mode (as in 4690088), but specifying sun.java2d.noddraw=true causes my test application to hang actually.

How about not specifying '-Dsun.java2d.noddraw=XXX' at all ?

>

~Sven

> Alexei




signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

Alexei A. Morozov
Hi, Sven

> 3c) It CANNOT be reproduced on Linux ??

Well, actually I have no access to well-installed Linux computer to check it right now, sorry.

> How about not specifying '-Dsun.java2d.noddraw=XXX' at all ?

All works fine:
http://alexei-morozov-2012.narod2.ru/

Well, and now I can add something new. I have reproduced the problem offline in command line mode!

java -Dsun.java2d.noddraw=true -jar main.jar

It creates the window, but draws nothing. Moreover, the application crashes after several seconds! I have a log file, though I afraid the logged problem is secondary one:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69742345, pid=6624, tid=7136
#
# JRE version: 7.0_07-b11
# Java VM: Java HotSpot(TM) Client VM (23.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglnt.dll+0x242345]  DrvCopyContext+0xccd5

...

Stack: [0x04020000,0x04070000],  sp=0x0406f538,  free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [nvoglnt.dll+0x242345]  DrvCopyContext+0xccd5
j  jogamp.opengl.windows.wgl.WGLExtImpl.dispatch_wglChoosePixelFormatARB1(JLjava/lang/Object;IZLjava/lang/Object;IZILjava/lang/Object;IZLjava/lang/Object;IZJ)Z+0
j  jogamp.opengl.windows.wgl.WGLExtImpl.wglChoosePixelFormatARB(J[II[FII[II[II)Z+287
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.wglChoosePixelFormatARB(JLjogamp/opengl/windows/wgl/WindowsWGLDrawableFactory$SharedResource;Ljavax/media/opengl/GLCapabilitiesImmutable;[II[F)[I+89
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationARB(JZLjogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration;Ljavax/media/nativewindow/CapabilitiesChooser;Ljogamp/opengl/windows/wgl/WindowsWGLDrawableFactory;[I)Z+358
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(Ljogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration;Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/opengl/GLDrawableFactory;JZ[I)V+192
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/opengl/GLDrawableFactory;Ljavax/media/nativewindow/AbstractGraphicsDevice;Ljogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration;[I)V+198
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(Ljavax/media/opengl/GLDrawableFactory;[I)V+18
j  jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/nativewindow/AbstractGraphicsScreen;I)Ljavax/media/nativewindow/AbstractGraphicsConfiguration;+308
j  javax.media.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/nativewindow/AbstractGraphicsScreen;I)Ljavax/media/nativewindow/AbstractGraphicsConfiguration;+86
j  javax.media.j3d.JoglPipeline.createNewContext(Ljavax/media/j3d/Canvas3D;Ljavax/media/j3d/Drawable;Ljavax/media/j3d/Context;ZZ)Ljavax/media/j3d/Context;+92
j  javax.media.j3d.Canvas3D.createNewContext(Ljavax/media/j3d/Drawable;Ljavax/media/j3d/Context;ZZ)Ljavax/media/j3d/Context;+9
j  javax.media.j3d.Canvas3D.createNewContext(Ljavax/media/j3d/Context;Z)Ljavax/media/j3d/Context;+11
j  javax.media.j3d.Renderer.doWork(J)V+3607
j  javax.media.j3d.J3dThread.run()V+19
v  ~StubRoutines::call_stub
V  [jvm.dll+0x12a39a]
V  [jvm.dll+0x1d962e]
V  [jvm.dll+0x12a583]
V  [jvm.dll+0x12a5e7]
V  [jvm.dll+0xd315f]
V  [jvm.dll+0x14a697]
V  [jvm.dll+0x14a800]
V  [jvm.dll+0x17efe9]
C  [msvcr100.dll+0x5c6de]  endthreadex+0x3a
C  [msvcr100.dll+0x5c788]  endthreadex+0xe4
C  [kernel32.dll+0xb713]  GetModuleFileNameA+0x1b4

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jogamp.opengl.windows.wgl.WGLExtImpl.dispatch_wglChoosePixelFormatARB1(JLjava/lang/Object;IZLjava/lang/Object;IZILjava/lang/Object;IZLjava/lang/Object;IZJ)Z+0
j  jogamp.opengl.windows.wgl.WGLExtImpl.wglChoosePixelFormatARB(J[II[FII[II[II)Z+287
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.wglChoosePixelFormatARB(JLjogamp/opengl/windows/wgl/WindowsWGLDrawableFactory$SharedResource;Ljavax/media/opengl/GLCapabilitiesImmutable;[II[F)[I+89
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationARB(JZLjogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration;Ljavax/media/nativewindow/CapabilitiesChooser;Ljogamp/opengl/windows/wgl/WindowsWGLDrawableFactory;[I)Z+358
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(Ljogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration;Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/opengl/GLDrawableFactory;JZ[I)V+192
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/opengl/GLDrawableFactory;Ljavax/media/nativewindow/AbstractGraphicsDevice;Ljogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration;[I)V+198
j  jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(Ljavax/media/opengl/GLDrawableFactory;[I)V+18
j  jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/nativewindow/AbstractGraphicsScreen;I)Ljavax/media/nativewindow/AbstractGraphicsConfiguration;+308
j  javax.media.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesImmutable;Ljavax/media/nativewindow/CapabilitiesChooser;Ljavax/media/nativewindow/AbstractGraphicsScreen;I)Ljavax/media/nativewindow/AbstractGraphicsConfiguration;+86
j  javax.media.j3d.JoglPipeline.createNewContext(Ljavax/media/j3d/Canvas3D;Ljavax/media/j3d/Drawable;Ljavax/media/j3d/Context;ZZ)Ljavax/media/j3d/Context;+92
j  javax.media.j3d.Canvas3D.createNewContext(Ljavax/media/j3d/Drawable;Ljavax/media/j3d/Context;ZZ)Ljavax/media/j3d/Context;+9
j  javax.media.j3d.Canvas3D.createNewContext(Ljavax/media/j3d/Context;Z)Ljavax/media/j3d/Context;+11
j  javax.media.j3d.Renderer.doWork(J)V+3607
j  javax.media.j3d.J3dThread.run()V+19
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
  0x038eb400 JavaThread "J3D-InputDeviceScheduler-1" [_thread_blocked, id=2744, stack(0x04bc0000,0x04c10000)]
  0x038e9400 JavaThread "J3D-SoundSchedulerUpdateThread-1" [_thread_blocked, id=6372, stack(0x04b70000,0x04bc0000)]
  0x038e8800 JavaThread "J3D-RenderStructureUpdateThread-1" [_thread_blocked, id=2968, stack(0x04b20000,0x04b70000)]
  0x038e7400 JavaThread "J3D-BehaviorScheduler-1" [_thread_blocked, id=7760, stack(0x04ad0000,0x04b20000)]
  0x038e1400 JavaThread "J3D-TransformStructureUpdateThread-1" [_thread_blocked, id=5340, stack(0x04a80000,0x04ad0000)]
  0x03903c00 JavaThread "J3D-RenderingEnvironmentStructureUpdateThread-1" [_thread_blocked, id=808, stack(0x04a30000,0x04a80000)]
  0x03902000 JavaThread "J3D-SoundStructureUpdateThread-1" [_thread_blocked, id=5680, stack(0x049e0000,0x04a30000)]
  0x038fd400 JavaThread "J3D-GeometryStructureUpdateThread-1" [_thread_blocked, id=4620, stack(0x04990000,0x049e0000)]
  0x038fbc00 JavaThread "J3D-BehaviorStructureUpdateThread-1" [_thread_blocked, id=6568, stack(0x04940000,0x04990000)]
  0x038fa000 JavaThread "Timer-0" daemon [_thread_blocked, id=7228, stack(0x048f0000,0x04940000)]
  0x0372c400 JavaThread "J3D-Renderer-1-SharedResourceRunner" daemon [_thread_blocked, id=4084, stack(0x04070000,0x040c0000)]
=>0x030ff000 JavaThread "J3D-Renderer-1" [_thread_in_native, id=7136, stack(0x04020000,0x04070000)]
  0x02bad400 JavaThread "J3D-MasterControl-1" [_thread_blocked, id=2488, stack(0x03fd0000,0x04020000)]
  0x02bd9c00 JavaThread "J3D-NotificationThread" [_thread_blocked, id=2392, stack(0x03b70000,0x03bc0000)]
  0x02bd0c00 JavaThread "J3D-TimerThread" [_thread_blocked, id=6940, stack(0x03b20000,0x03b70000)]
  0x0314c400 JavaThread "J3D-RenderingAttributesStructureUpdateThread" [_thread_blocked, id=6208, stack(0x034b0000,0x03500000)]
  0x0312c000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=7196, stack(0x033a0000,0x033f0000)]
  0x0310c400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5788, stack(0x03300000,0x03350000)]
  0x0310a800 JavaThread "AWT-Shutdown" [_thread_blocked, id=3456, stack(0x032b0000,0x03300000)]
  0x03109800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1152, stack(0x03260000,0x032b0000)]
  0x003e8800 JavaThread "DestroyJavaVM" [_thread_blocked, id=3616, stack(0x00a10000,0x00a60000)]
  0x030cd000 JavaThread "Thread-0" [_thread_blocked, id=2188, stack(0x03210000,0x03260000)]
  0x02bbb000 JavaThread "Service Thread" daemon [_thread_blocked, id=1840, stack(0x02f50000,0x02fa0000)]
  0x02bb5800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=8040, stack(0x02f00000,0x02f50000)]
  0x02bb3c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=7024, stack(0x02eb0000,0x02f00000)]
  0x02bb2800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8032, stack(0x02e60000,0x02eb0000)]
  0x02ba0c00 JavaThread "Finalizer" daemon [_thread_blocked, id=5312, stack(0x02e10000,0x02e60000)]
  0x02b9f400 JavaThread "Reference Handler" daemon [_thread_blocked, id=7204, stack(0x02dc0000,0x02e10000)]

Other Threads:
  0x02b9d800 VMThread [stack: 0x02d70000,0x02dc0000] [id=5488]
  0x02bce800 WatcherThread [stack: 0x02fa0000,0x02ff0000] [id=8044]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

...

Could anybody propose any idea how to localize the source of the problem please?

Alexei
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

Alexei A. Morozov
P.S.

I have reproduced the bug in client and server modes:

java -Dsun.java2d.noddraw=true -jar main.jar
java -server -Dsun.java2d.noddraw=true -jar main.jar

See log files in attachments please.

Alexei

hs_err_pid4268.log
hs_err_pid8056.log
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

Sven Gothel
Administrator
In reply to this post by Alexei A. Morozov
On 10/24/2012 06:12 PM, Alexei A. Morozov [via jogamp] wrote:

> Hi, Sven
>
>> 3c) It CANNOT be reproduced on Linux ??
>
> Well, actually I have no access to well-installed Linux computer to check it
> right now, sorry.
>
>> How about not specifying '-Dsun.java2d.noddraw=XXX' at all ?
>
> All works fine:
> http://alexei-morozov-2012.narod2.ru/
>
> Well, and now I can add something new. I have reproduced the problem offline
> in command line mode!
>
> java -Dsun.java2d.noddraw=true -jar main.jar
>
> It creates the window, but draws nothing. Moreover, the application crashes
> after several seconds! I have a log file, though I afraid the logged problem
> is secondary one:
>
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69742345, pid=6624, tid=7136
> #
> # JRE version: 7.0_07-b11
> # Java VM: Java HotSpot(TM) Client VM (23.3-b01 mixed mode, sharing windows-x86 )
> # Problematic frame:
> # C  [nvoglnt.dll+0x242345]  DrvCopyContext+0xccd5
>
WinXP I assume ?

Please be aware that WinXP is EOL, but I am sure you know that.
Due to WinXP's [dead] status, there will hardly be any driver
updates anymore - hence the Nvidia troubles will unlikely be fixed.

We assume it's an Nvidia difficulty due to the native stack frame within
the NV driver. Even if GL or WGL is used in a wrong way, this shall not happen.

~Sven


signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: sun.java2d.noddraw=true prevent my applet for work?

Alexei A. Morozov
Hi, Sven

I hope you are right. The only think that confuse me is that I have reproduced the bug on computer with ASUS EAH4350 graphics card (not NVidia). So, it may be not a problem of separate graphics card developer. I afraid that I have discovered the bug under XP only because this is only one 32-bit OS I have access to (all the other tests were on various 64-bit systems). Well, I will continue the investigation... And if somebody has access to other 32-bit systems, you are welcome to participate in the testing:

http://alexei-morozov-2012.narod2.ru/test_noddraw_true/ – hangs on
http://alexei-morozov-2012.narod2.ru/test_noddraw_false/ – O.K.

Thank you,

Alexei