                          CLIPS DISCREPANCY REPORT

DR #                : 0873
DATE                : 06/22/06
STATUS              : OPEN

REPORTED BY         : CLIPS User
ORGANIZATION        : 
PHONE #             :
ADDRESS             :

CLIPS VERSION       : CLIPS 6.24
HOST                : All
OS                  : All

********************
PROBLEM DESCRIPTION:
********************

Use of the object-pattern-match-delay function could cause a NULL
pointer exception.

*****************
COMMAND SEQUENCE:
*****************

1) Load this program:

(defclass A
   (is-a USER) 
   (slot x)) 

(defclass B
   (is-a USER) 
   (slot y)) 

(definstances initialization 
   (ob1 of A (x 1)) 
   (ob2 of B (y 1))) 

(defrule one 
   (object (is-a A) 
           (x ~0)) 
   (object (is-a B) 
           (y ?val)) 
   (test (> ?val 0)) 
   =>)
   
(defrule trigger
   =>
   (object-pattern-match-delay
      (modify-instance [ob1] (x 2))
      (make-instance [ob2] of B (y 2))))
      
2) Issue a (reset) command followed by a (run) command.      
      

***********
RESOLUTION:
***********

Modified the QueueObjectMatchAction function in objrtmch.c
so that instance retract actions always occur before instance
assert and modify actions. This prevents the pattern matching
process from attempting the evaluation of a join expression
that accesses the slots of a retracted instance.

*******
STATUS:
*******

FIXED BY            : Gary Riley
DATE                : 06/22/06
IMPLEMENTED BY      : Gary Riley
IN VERSION          : 6.25
DATE                :
DOCUMENTED BY       :
DATE                :
TESTED BY           :
DATE                :
APPROVED BY         :
DATE                :

