How to understand why the application crashes?

I’m afraid I have to give up. You are probably doing something wrong and possibly hit a bug or at least inelegant handling of a bug in your code. Seems this needs a reproducing example or at least a decent snippet of the code that is likely responsible with a decent description on how this code is being used.

Good luck.

But: if you succeed in fixing it without Jan’s help you’ll have learned quite a bit about programming (and how to get out of a trap, here I would say that elegance is a secondary matter…) :sweat_smile: