Humm, without knowing exactly what command it fails on
or what object is puking out, it is going to be hard to
track this down. We need to trim this down to a very
small example that can be run from a single directory
with only a couple of source files. Typically trimming
Tcl code out of your example until it works and then
hitting undo is the best way to get a small example.
You should also try using "regular" Java objects like
java.lang.String in place of your own Java objects to
see if you can create a "Tcl only" example that crashes
without needing your Java classes (that would really help).

Here is some Tcl psudo code for how it should work.

For a given object (java0x1) of class
java.lang.String, map the object id
and it's reflected class to an
entry in the Reflect Table.

set roRep [java::new ReflectObject]

$interp createCommand java0x1 $roRep

set reflectIDTable(java0x1) $roRep
set reflectObjTable(java.lang.String.[identityHashCode]) $roRep

So when we search the table in findInReflectTable(), we simple
look for a table match for the string
"java.lang.String.[identityHashCode]"

The "table entry did not match arguments" error can happen
when the given mapping does exist in the table but
the $roRep value at the mapping does not match the
values passed in to the search (which should never happen).

The only thing I can think of off the top of my head is that
if something was wrong with the identityHashCode() method
that would produce a duplicate identity string. The
string for each Class + Object combo needs to be unique.

Mo Dejong
Red Hat Inc.



On Tue, 1 Feb 2000, Thomas McKay wrote:

> Here's a log file from the run.  Note that I had to modify the debug print
> statements in ReflectObject.java or it would be huge!  I included the source
> for your reference.
> 
> Not sure what to look for.  Could be a problem with
> System.indentityHashCode() or the reflect objects useCount?
> 
> Here's what I'm doing to cause the error:
> 
> % set cs [cellsList]     <--  sets cs to a list of drawing designs
> % foreach c $cs {
>     cellOpen $c          <-- open the drawing
>     write-xpm $c         <-- write out an x pixmap
>     cellQuit             <-- close the drawing
> }
> 
> 
> Here's the script for writing the pixmap.  This is how the commands map to
> reflect objects:
>       layer           catapult.db.xy.layout.LayoutLayer
>       objSelect       catapult.db.xy.layout.LayoutObjPolygon
> 
> proc write-xpm { name } {
> 
>     set layerNames [layers]
> 
>     set fp [open "$name.xpm" w]
>     puts $fp "! XPM2"
>     puts $fp "16 21 [llength $layerNames] 1"
> 
>     set abc "abcdefghijklmnopqrstuvwxyz"
>     foreach layerName $layerNames {
>         set l [layer $layerName]
>         set line "[string index $abc [lsearch $layerNames $layerName]] c #"
> 
>         set color [$l getColor]
>         set r [java::call Integer toHexString [$color getRed]]
>         if { $r == "0" } then {
>             set r "00"
>         }
>         set g [java::call Integer toHexString [$color getGreen]]
>         if { $g == "0" } then {
>             set g "00"
>         }
>         set b [java::call Integer toHexString [$color getBlue]]
>         if { $b == "0" } then {
>             set b "00"
>         }
> 
>         append line "$r$r$g$g$b$b"
>         puts $fp $line
>     }
> 
>     for {set y 0} {$y > -21} {incr y -1} {
>         set line ""
>         for {set x 0} {$x < 16} {incr x} {
>             set obj [objSelect -query $x $y]
>             set l [$obj getLayer]
>             append line [string index $abc [lsearch $layerNames [$l
> getName]]]
>         }
>         puts $fp $line
>     }
> 
>     close $fp
> }
> > -----Original Message-----
> > From: Mo DeJong [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 31, 2000 10:36 PM
> > To: [EMAIL PROTECTED]
> > Subject: ReflectObject problems
> >
> >
> > Any news on those "table entry did not match arguments" asserts
> > you were getting? The error you describe is VERY bad, so I want
> > to make sure that this bug is killed sooner rather than later.
> > I want to get a 1.2.6 release out the door before the Tcl
> > conference (Feb 14th), but this problem is so bad that I would
> > not want to release a 1.2 "final" with the bug.
> >
> > 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

Reply via email to