open-physiology / open-physiology-viewer

Apache License 2.0
7 stars 7 forks source link

bronchomotor model fails to load with maximum call stack size exceeded error #278

Closed tgbugs closed 11 months ago

tgbugs commented 1 year ago

This model is unchanged and used to work on older versions of the viewer/converter, so I'm not sure why it is producing errors now. Peeking at the error message it seems to be happening during id generation?

https://github.com/open-physiology/apinatomy-models/blob/e903e83e2682571bcce855acbd1607955d803b95/models/bronchomotor/source/bronchomotor.json

albatros13 commented 11 months ago

The model contains a lyph that wants to include itself into internalLyphs { "id": "B118", "ontologyTerms": [ "FMA:61796"], "name": "Nicotinic acetylcholine receptor", "isTemplate": true, "internalLyphs": ["B118"] } I will add a validation method, report error and automatically remove recursive internalLyphs and layers from input models.

albatros13 commented 11 months ago

A check added to the viewer model generator to prevent max call stack overflow on circular lyph templates. I created an issue on apinatomy model repo to remind that the model needs fixing too.