Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#27 Retracting non asserted facts causes segmentation fault

Errors
closed-fixed
5
2005-06-09
2005-06-09
Francesco Garosi
No

When a Fact is created from a Template and is retracted
before being asserted, the results are unpredictable
and can cause a segmentation fault: apparently a Fact
is put in the intenal fact list (thus Exists == True)
as soon as it is created - which doesn't imply
asserted, so that it results eligible for (and is not
prevented from) retraction.

An example of this follows:

import clips
t0 = clips.BuildTemplate("t0", "(slot s1)")
f0 = t0.BuildFact()
f0.Retract()
(segmentation fault?)

This bug should not prevent usability, as a Fact should
only be retracted after assertion. However the code
should be corrected in order to fail with an exception.

Discussion

  • Logged In: YES
    user_id=328337

    The fixes for this bug or request have been accepted and
    committed to current CVS tree: next release will include these
    fixes, possibly among other enhancements.

     
    • status: open --> closed-fixed