Menu

Unhandled exception on execution

Help
lna
2015-07-25
2015-07-28
  • lna

    lna - 2015-07-25

    Hi Gary,

    I'm having a hard time compiling my project with the new clips 6.3 version. I'm using Visual Studio 2010 Premium.
    Actually, I can build it just fine but I get the following error on execution :

    Unhandled exception at 0x0046f2e1 in clipsx10.exe: 0xC0000005: Access violation reading location 0xabababdb.

    This occurs in the globle void AddBetaMemoriesToJoin function in ruledef.c.

    I've stripped down my code to a bare minimum, as follows :

    (defmodule MAIN (export ?ALL))

    (defclass PRESTATION (is-a USER)
    (role abstract))

    (defclass RENTE "classe regroupant l'ensemble des prestation de type rente" (is-a PRESTATION)
    (role abstract))

    ;une rente simple est une prestation principale pour un assuré
    (defclass R_SIMPLE (is-a RENTE)
    (role abstract))

    (defclass R_ENFANT (is-a RENTE));montant réduit pour surass. utilisé pour comparer après recalcul surass

    (defclass R_VEUVAGE (is-a RENTE)
    (role abstract))
    ;

    (defclass R_VEUVE (is-a R_VEUVAGE)
    (role concrete)
    (pattern-match reactive)
    (slot genre (type SYMBOL)(storage shared)(access read-only)(default avs)(visibility public)(create-accessor read)))

    (defclass EVENEMENT (is-a USER)
    (role concrete)) ; le nom d'une instance de PRESCRIPTION contenant les informations de prescription de cet evenement

    (defmodule DETECTE (import MAIN ?ALL)
    (export ?ALL))

    (defmodule TRAITEMENT (import MAIN ?ALL)
    (import DETECTE ?ALL)
    (export ?ALL))

    (defrule TRAITEMENT::refus_module_10e "detecte utilisation abusive du module 10e pour cas purement 9e"
    (or (object (is-a RENTE))
    (object (is-a EVENEMENT)))
    =>
    )

    (defrule TRAITEMENT::cree_refus_prest "Cree un refus de prestation"
    (declare (salience 1000))
    =>
    )

    Thing is, this was working just fine with the previous 6.3 Beta clips version, using Visual 2008.

    Any ideas where the problem could be coming from ?

    Please let me know if you need any additional information.

    Thanks,

    Helena

     
  • Gary Riley

    Gary Riley - 2015-07-26

    You didn't mention in your post, but the only situation in which I could get the bug to occur was using the constructs-to-c functionality. Using the load command and bsave/bload for the code worked without a crash. I've checked a fix (rulecmp.c) into the subversion repository. The code which generated the C data structures in constructs-to-c was not properly iterating over the rules when there was a rule using the or conditional element.

     
    • lna

      lna - 2015-07-28

      Sorry, forgot to mention that it was using the constructs-to-c functionality.
      Thanks for the fix, it works fine now !

       

Log in to post a comment.