Cassowary Implementations - Bug Reports

Last updated 2 June 2005

The Cassowary implementations are not currently being maintained (or at least maintained very infrequently). As the next best thing, below we list bug reports from users. (These haven't been carefully verified yet.)


From Jo Vermeulen, Universiteit Hasselt, Belgium:

In the insertErrorVar(...) method of the ClSimplexSolver class:

// Protected convenience function to insert an error variable into
// the _errorVars set, creating the mapping with put as necessary
protected final void insertErrorVar(ClConstraint cn, 
                                    ClAbstractVariablevar)
{ 
  if (fTraceOn) fnenterprint("insertErrorVar:" + cn + ", " + var);

  Set cnset = (Set) _errorVars.get(var);
                                   ^^^
  if (cnset == null)
    _errorVars.put(cn,cnset = new Set());
  cnset.insert(var);
}

Set cnset = (Set) _errorVars.get(var);

should be:

Set cnset = (Set) _errorVars.get(cn);

since _errorVars uses ClConstraint instances as its keys (it is 
a Hashtable). The test "if (cnset == null)" will always evaluate to
null, because there is no element with key var in _errorVars. 
cnset itself does contain ClVariable instances though, so that probably
caused the confusion.