Game crashes when changing nickname

This didn’t happen yesterday but now I tried 5 times in a row and everytime I change my nick my game crashes and I get an error

EDIT: 6th time worked fine, but 7th crashed again

EDIT2: 8th and 9th times crashed again… it’s annoying i can’t play because of this

Edit: Solved by updating to a newer version of Enhanced Reborn Trainer