aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
authorKevin Rushforth <[email protected]>2006-10-30 19:08:55 +0000
committerKevin Rushforth <[email protected]>2006-10-30 19:08:55 +0000
commit62c048b3666d71f8fefe9c2571548f250a5ef74a (patch)
treed92cd1f7914a4c5b9acbf5f711252b181196edec /src/classes
parent50454651c5feafbef5dd84aa777882e2b6a87772 (diff)
Fixed issue 370: Deadlock when calling Raster.setimage from user thread
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@733 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/share/javax/media/j3d/RasterRetained.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/classes/share/javax/media/j3d/RasterRetained.java b/src/classes/share/javax/media/j3d/RasterRetained.java
index 5a20a45..b1aa0d4 100644
--- a/src/classes/share/javax/media/j3d/RasterRetained.java
+++ b/src/classes/share/javax/media/j3d/RasterRetained.java
@@ -254,14 +254,18 @@ class RasterRetained extends GeometryRetained {
}
TextureRetained oldTex = this.texture;
- geomLock.getLock();
if (source.isLive()) {
if (this.texture != null) {
this.texture.clearLive(refCount);
}
}
-
+
+ // Issue 370: only hold the geomLock while calling initImage
+ // (cannot hold it while sending a message).
+ geomLock.getLock();
initImage(img);
+ geomLock.unLock();
+
if (source.isLive()) {
if (texture != null) {
texture.setLive(inBackgroundGroup, refCount);
@@ -270,7 +274,6 @@ class RasterRetained extends GeometryRetained {
sendChangedMessage((J3dThread.UPDATE_RENDER|J3dThread.UPDATE_RENDERING_ATTRIBUTES),
oldTex, this.texture);
}
- geomLock.unLock();
}
/**