path.insertNode_atIndex_() leading to crashes

Hello, I’m afraid I’m running into a recurring issue while trying to write a plugin.

I have the following code block:

path.insertNode_atIndex_(GSNode(position_1), node.index)
path.insertNode_atIndex_(GSNode(position_2), node.index + 1)

However, when I run this when the index of node is 0, I get a crash a lot of the time. Sometimes, it doesn’t crash but crashes when I change the position arguments (I am running this from a filter).

I sent crash reports (twice), but can’t see how to resolve the issue myself, as it’s not 100% reproducible (it sometimes works although I changed absolutely nothing).

Thanks for any hints!

EDIT: Not only when node index is 0. Even with different indices. I am truly lost.

Is is fully crashing the app? Any hint in the crash report?
Can you send me code to reproduce this?

And can you run it from the Terminal? That might give some log that helps figuring it out?

I can’t read the crash report properly, sorry. The app fully crashes.

I added you to the repository. The code I am testing is in the dev branch.

How do I run a filter from Terminal?