-
Bug
-
Resolution: Fixed
-
P1
-
6
The restructuring in 6317330 switching the AWT lock to use
ReentrantLock has caused a regression in the AWT native interface
(JAWT)'s ability to lock the AWT on X11 platforms. The logic error is
in src/solaris/native/sun/awt/awt_DrawingSurface.c and is quite
obvious:
***************
*** 350,356 ****
JNIEXPORT void JNICALL
awt_Lock(JNIEnv* env)
{
! if (awt_lock != NULL) {
AWT_LOCK();
}
}
--- 350,356 ----
JNIEXPORT void JNICALL
awt_Lock(JNIEnv* env)
{
! if (!awtLockInited) {
AWT_LOCK();
}
}
***************
*** 358,364 ****
JNIEXPORT void JNICALL
awt_Unlock(JNIEnv* env)
{
! if (awt_lock != NULL) {
AWT_FLUSH_UNLOCK();
}
}
--- 358,364 ----
JNIEXPORT void JNICALL
awt_Unlock(JNIEnv* env)
{
! if (!awtLockInited) {
AWT_FLUSH_UNLOCK();
}
}
The sense is wrong on the tests of "awtLockInited".
This has caused the current builds of JOGL (http://jogl.dev.java.net/)
to break and can cause any application performing native rendering to
potentially break. This did not become apparent in earlier builds
because the locking JOGL was doing was overly strict. This is a
serious regression and must be fixed immediately.
ReentrantLock has caused a regression in the AWT native interface
(JAWT)'s ability to lock the AWT on X11 platforms. The logic error is
in src/solaris/native/sun/awt/awt_DrawingSurface.c and is quite
obvious:
***************
*** 350,356 ****
JNIEXPORT void JNICALL
awt_Lock(JNIEnv* env)
{
! if (awt_lock != NULL) {
AWT_LOCK();
}
}
--- 350,356 ----
JNIEXPORT void JNICALL
awt_Lock(JNIEnv* env)
{
! if (!awtLockInited) {
AWT_LOCK();
}
}
***************
*** 358,364 ****
JNIEXPORT void JNICALL
awt_Unlock(JNIEnv* env)
{
! if (awt_lock != NULL) {
AWT_FLUSH_UNLOCK();
}
}
--- 358,364 ----
JNIEXPORT void JNICALL
awt_Unlock(JNIEnv* env)
{
! if (!awtLockInited) {
AWT_FLUSH_UNLOCK();
}
}
The sense is wrong on the tests of "awtLockInited".
This has caused the current builds of JOGL (http://jogl.dev.java.net/)
to break and can cause any application performing native rendering to
potentially break. This did not become apparent in earlier builds
because the locking JOGL was doing was overly strict. This is a
serious regression and must be fixed immediately.
- relates to
-
JDK-6317330 Use ReentrantLock to serialize access to Xlib, etc for improved performance
-
- Resolved
-