Now don't panic, but it looks like we have uncovered
a serious JVM bug in Sun derived JVMs >= 1.2 that
nukes the Tcl/Java reflect table. Lots of
thanks go to Thomas McKay for tracking down and
creating a test case for this bug (it took months).
It looks like two different Java object are returning
the exact same "unique id" from System.identityHashCode().
(this has nothing to do with the getClass() discussion
that has been going on, so don't worry about that)
I have been able to reproduce this error running IBM 1.3
on Linux, and I hear that it also happens with Sun JDK
1.2 under Windows.
Could everyone please download and run the example
code that is attached to this file? Just unzip
the file (use jar if you don't have unzip) and
source the mytest.tcl file. This problem should
happen in either Jacl or Tcl Blend.
If you get a fatal exception, please
report what JVM version you are using and on
what system. Don't worry about the details
that are printed out, this problem can only
be caused by one thing.
(it should look like this)
Exception in thread "main" tcl.lang.TclRuntimeError:
(find) table entry "SomeObject.1512497281" mapped to an invalid entry,
...
I tested this under JDK 1.1.8 from Blackdown and Kaffe
and there was no problem with either of those JVMs
(I ran the test for several hours).
thanks
Mo DeJong
Red Hat Inc
ReflectCrash.zip