ModellingWebLab / cellmlmanip

CellML loading and model equation manipulation
Other
3 stars 1 forks source link

Cellmlmanip hangs when given invalid file #33

Closed MichaelClerx closed 5 years ago

MichaelClerx commented 6 years ago

Example:

<?xml version="1.0" encoding="utf-8"?>
<model name="generated_model" xmlns="http://www.cellml.org/cellml/1.0#" xmlns:cellml="http://www.cellml.org/cellml/1.0#">
    <component name="c">
        <variable name="a" units="dimensionless"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>b</ci>
                <cn cellml:units="dimensionless">2.0</cn>
            </apply>
        </math>
    </component>
</model>

Trying to load this model and scan equations etc. it hangs

Note that the component defines a variable a, but then gives an equation for variable b

tamuri commented 5 years ago

now handles undefined variables