Check for layer parent-child cycles.#262
Conversation
|
@john-preston , I think this fix should go inside the Model so that rendering code will be much simpler to maintain. as less unusual case to handle. |
|
Yes, the idea is to handle without crashing any json file the user offers. I didn't understand where you think the checks for the cycles should go inside the Model and when should they be performed. |
|
What I meant is .. this checks should go inside lottieparser so that the renderer dosen't have to deal with all the checks to see if the layer is valid or not. If during resource parsing we find the layer data is corrupted then we can just remove that layer all together. |
In case of bad input file there could be a cycle in parent-child relationship that leads to stack overflow crash. Simplest case is when the layer is made a parent to itself.