( This is on the contract branch ) Here is a nice little crash that is happening because the GC thread tries to call a JNI method in a thread that was not the initial thread or one that had been attached to the JVM. tclsh: /home/mo/project/tcljava_ajuba/tcljava/src/native/javaCmd.c:379: JavaGetEnv: Assertion `tsdPtr->initialized_currentEnv' failed. SIGABRT 6 (*) abort process stackpointer=0xbf1ff53c Full thread dump Classic VM (J2RE 1.3.0 IBM build cxdev-20000502, native threads ): "Finalizer" (TID:0x403d8708, sys_thread_t:0x811b2a8, state:R, native ID:0x10 05) prio=8 at tcl.lang.CObject.decrRefCount(Native Method) at tcl.lang.CObject.finalize(CObject.java:225) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:92) at java.lang.ref.Finalizer.access$1(Finalizer.java:84) The only good solution to this problem is to not call a JNI method from the GC thread. Of course, we still need to work out the right way to do that. Jiang rightly points out that putting a "free native object" into the thread safe event queue will not help if the Interp does not enter the event queue (like tclsh). 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