Skip to content

Strange "TooManyChanges" exception (in cdm) #155

@tombrus

Description

@tombrus

The following rule triggers it:

rule if (propertyValue != null) { 
  propertyValue.result := derivedValue; 
  propertyValue.causes := assignments.reasonRefs.distinct.copy; 
}

the following change solves it:

rule if (propertyValue != null) { 
  propertyValue.causes := assignments.reasonRefs.distinct.copy; 
} 
rule if (propertyValue != null) { 
  propertyValue.result := derivedValue; 
}

there seem to be other solutions like changing the order of the assignments, adding .toList after the copy or adding some tracing of assignments.reasonRefs.distinct.copy in a local variable.

We discovered this in a private repo (Osteoporose), see revision e39faec67a5558fd3076b66ed2a2aba8e4a8b10c.
The above change in cdm (also private) is in 59848d85f759daa0c83500b95bbf6ebcb51a5c1f.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions