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

Bload problem

2010-12-16
2013-09-15
  • I am trying to Bload some constructs into my Clips session, but I can't get it to work. Works fine if I replace the Bload with a Load of the original ASCII file. Could be user error or a CLIPS bug. I'm using the latest 6.30 code from the SVN repository on Windows7 64-bit, VS2008 (plus the small bload patch I just submitted). Here's my code:

    InitializeEnvironment();
    Bload("stacking.clb");

    The corresponding stacking.clp contains 5 deftemplates and 6 defrules. In the Bload it loops while printing "Skipping  constructs because of unavailability".

    I previously saved the constructs using the code below - the status codes returned from these functions were all 1.

    InitializeEnvironment();
    Load("stacking.clp");
    SetDynamicConstraintChecking(TRUE);
    Bsave("stacking.clb");

    Thanks for any help,

    Uli

     
  • Gary Riley
    Gary Riley
    2010-12-16

    Please include the 5 deftemplates and 6 defrules. That will make it much easier to find the problem.

     
  • I run into the same problem even with an empty stacking.clp file.

     
  • The problem appears to be with using Bsave/Bload in 64-bit apps on 64-bit Windows. I wrote a minimal test app, loading an empty .clp file, then doing a Bsave. Upon the next run I did a Bload of the .clb file.

    This worked fine with a 32-bit executable, but ran into very similar issues as before with a 64-bit executable. The output I received is below, it's what I got on debug runs in the case of my original message as well. So something screwed up with 64-bit binary formats it seems.

    *** DEALLOCATING MEMORY ***
    *** MEMORY  DEALLOCATED ***

    *** DEALLOCATING MEMORY ***
    *** MEMORY  DEALLOCATED ***

    Out of memory.

     
  • Gary Riley
    Gary Riley
    2013-09-15

    This issue should be fixed now with the code recently checked into the repository.