On Mon, 19 Jun 2000, Dr Wes Munsil wrote:
> So, pardon my desperation, but are you gentlemen going to save my job
> and give me a TclBlend 1.2.5 patch to try out?
The "right" solution is still being worked, but you should be able
to try this patch to see if it cures the deadlock. This patch
will leak Tcl_Obj refs that are not freed correctly in Tcl/Java
code.
Index: src/tclblend/tcl/lang/CObject.java
===================================================================
RCS file: /home/cvs/external/tcljava/src/tclblend/tcl/lang/CObject.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 CObject.java
--- CObject.java 1998/10/14 21:09:10 1.1.1.1
+++ CObject.java 2000/06/20 01:23:52
@@ -217,12 +217,15 @@
protected void finalize() throws Throwable
{
if (objPtr != 0) {
- /*
- * If the object is finalized while the reference is still valid,
- * we need to sever the connection to the underlying Tcl_Obj*.
- */
+ // If the object is finalized while the reference is still valid,
+ // we need to sever the connection to the underlying Tcl_Obj*.
+ // Unfortunatly, it is not safe to call Tcl methods
+ // from the Java finalizer threads, so we just punt.
+ // This is a really lame tempory solution that leaks Tcl Objects
+ // that were not freed correctly.
- decrRefCount(objPtr);
+ //decrRefCount(objPtr);
+ System.err.println("WARNING : Leaking object 0x" + objPtr + " in
CObject.finalize()");
}
super.finalize();
}
Mo DeJong
Red Hat Inc
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com