-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
None
-
beta
-
generic
-
generic
The attached test case is a simple double buffering application which
has one thread drawing lines into an image and issuing delayed repaints.
When the repaint handler calls the update() method, the simultaneous
access to the image from both the rendering thread and the thread copying
the image to the window causes a JNI fault in the rendering code. The
JNI fault is unrecoverable and causes the application to crash.
The problem appears to be that the code to allow native access to a
BufferedImage data array is trying to share the JNI array accesses between
threads such that when the thread that locked the array for native access
returns from its native method it may not be able to unlock the array since
another thread may be also using that locked pointer.
has one thread drawing lines into an image and issuing delayed repaints.
When the repaint handler calls the update() method, the simultaneous
access to the image from both the rendering thread and the thread copying
the image to the window causes a JNI fault in the rendering code. The
JNI fault is unrecoverable and causes the application to crash.
The problem appears to be that the code to allow native access to a
BufferedImage data array is trying to share the JNI array accesses between
threads such that when the thread that locked the array for native access
returns from its native method it may not be able to unlock the array since
another thread may be also using that locked pointer.