Closed manoskary closed 11 months ago
I don't really know where to start with this. I can reproduce the error and I also get for all randomly picked files from this repo, but not for other kern files. My guess is that either the parsing goes wrong for these files or there's a bug with numpy.
I will take a closer look at these files today once again and try to pinpoint which elements are causing this cloning error.
What I found is that the part structure is too deep and that is causing the recursion error, it can be fixed when the recursion limit is increased, like so : sys.setrecursionlimit(10000)
This is probably caused when the TimedObjects keep calling ending and starting objects on the timeline. Since any time objects can have many starting and ending objects which themselves will have other starting and ending objects then copy tries to pickle all these objects one by one but reaches a max recursion which could potentially be up to the number of TimedObjects in the score and therefore it fails. This is my best guess.
A potential fix is before calling copy to count the number of TimedObjects and set the recursion limit to that number. (update that did not work maybe some multiple could work better)
This problem occurs when
copy.deepcopy(score)
is called. The issue results in a system error:To reproduce:
use this score : here and call
copy.deepcopy(score)
.