Motor suddenly lock

When I was training today, I encountered a situation that the motor would suddenly lock, so I couldn’t control the motor. Even if I quit the program, the motor remained locked until I unplugged the battery.
I have tried several times, and this situation will also occur. I guarantee that there is no problem with the code,

Have you opened up the motor and examined the gear cartridge for any mechanical issues, like a broken tooth? Perhaps try a different cartridge to see if the problem repeats.