Menu

Crashes in Reset

Help
vranoch
2009-04-21
2012-11-23
  • vranoch

    vranoch - 2009-04-21

    Hello all,

    I have a problem with this release. Having the following rule:

    (defrule x ""
    (exists
       (SAD G ?V2853_II1242 G02N ?V2853_TV1299)
       (SAD G ?V2853_II1242 G02N ?V2853_TV1302)
       (or 
          (test
             (str-index  ?V2853_TV1299 "23080090,28369917,29224100")
          )
          (test
             (str-index  ?V2853_TV1302 "29232000,29309013")
          )
       )
    )

    =>
    )

    when do:
    1) (load "x.clp")
    2) (bsave "x.prg")
    3) (bload "x.prg")
    4) (reset)

    the library (as well as CLIPSWin application) crashes. The same happens for cosequent

    1) (bload "x.prg")
    2) (reset)

    But when I do only:
    1) (load "x.clp")
    2) (reset)

    Everything works fine.

    If it crashes, it always crashes in file rulebsc.c, line 144 (notParent = theLink->join->leftMemory->beta[0];)

    Does anyone have any suggestion?

    thanks a lot Vranoch

     
    • Gary Riley

      Gary Riley - 2009-05-04

      If you can recompile the code, try this:

      In the function AddBetaMemoriesToJoin in the file ruledef.c, change the line

         if ((! theNode->firstJoin) || theNode->patternIsExists)

      to

         if ((! theNode->firstJoin) || theNode->patternIsExists || theNode-> patternIsNegated || theNode->joinFromTheRight)

      and change the line

            if (theNode->firstJoin && theNode->patternIsExists)

      to

            if (theNode->firstJoin && (theNode->patternIsExists || theNode-> patternIsNegated || theNode->joinFromTheRight))

       
    • vranoch

      vranoch - 2009-05-19

      Hello Gary,

      Your suggestion helped, now the code looks stable (so far - I will keep testing it).

      Thanks a lot

      Vranoch

       
    • vranoch

      vranoch - 2009-05-21

      Hello Gary,

      Your suggestion helped, now the code looks stable (so far - I will keep testing it).

      Thanks a lot

      Vranoch

       

Log in to post a comment.