I think Lars Rasmusson wrote:
> 
> Hi, I get the following strange exception when I try to retract a fact
> that was definstance'd.  
> 
>   Message: Corrupted Negcnt (< 0) ..
>   Rete Exception in routine NodeNot2::RunTestsVaryLeft.
>   Message: Corrupted Negcnt (< 0) .
>   at jess.NodeNot2.runTestsVaryLeft(NodeNot2.java:153)
>   .
>   .
>   .
> 
> It appears that the counter of a NOT-node has been corrupted in some
> way.
> What could be the reason for this?  
> 
> The app I'm writing is fairly complicated with several threads asserting
> facts in parallell and invoking the (run) command from within.  Could
> this
> cause the exception?

The Rete network is protected by a single mutex (in 4.1b3, anyway) so
the multiple threads asserting at once should not cause a problem;
the asserts will be serialized. What might cause this, however, is if
any of the functions you call on any rule LHSs cause a
PropertyChangeEvent to be fired - i.e., if any of the definstanced
object's Bean properties are being changed by code that already holds the
lock on the Rete network. Similarly, if any functions you call on a
rule LHS themselves call "assert", we could see the same problem. Make
sure this isn't happening.

If this isn't it, then there might be a bug and we'll have to look
into it further.  


> /Lars



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (510) 294-2154
Sandia National Labs                FAX:   (510) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to