If you start emacs with
emacs -q
and then try some of the rectagular edit commands and you don't get an error, then you know the problem is being caused by something in your emacs init configuration.
If this is the case, you can start tracking it down by going through your init files and commenting out bits. A good approach is to comment out the last half of your init, restart emacs with -q, try the command again. If the error is still there, then you know it is being caused by something in the first half of your config which was not commented out. If the error does not occur, then you know it was being caused by something in the last half of your init file which you have commented out.
You then continue this process, commenting and uncommenting your init file and restarting with -q until you find the line in your init file which is causing the error.