#4 Assigning multifields to slots causes segmentation fault

Errors
closed-fixed
8
2004-08-01
2004-07-29
No

When a Fact is created using a Template (or
deftemplate) and a Multifield value is assigned to a
multislot, the Python interpreter accesses an invalid
memory location and receives a SIGSEGV (on UNIX). The
following code causes the error:

import clips
te1 = clips.BuildTemplate("te1", "(multislot ms)")
clips.Reset()
f = clips.Fact(te1)
f.Slots['ms'] = clips.Multifield(['s1', 's2'])

Also, assigning a Multifield to a multislot value in an
Instance causes the same behaviour.

Discussion

  • Francesco Garosi

    Logged In: YES
    user_id=328337

    Sorry...

    when I coded the helpers that transform Python structures in
    CLIPS DATA_OBJECTS, I did not notice that you have to set
    the beginning and ending indexes of a multifield
    DATA_OBJECTS anyway (I missed the last two lines in the
    APG example, pages 40-41). This is corrected in the latest
    CVS.

     
  • Francesco Garosi

    • status: open --> open-fixed
     
  • Francesco Garosi

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks