When this happens, there are a couple of things to try (I know you've already found the cause, but you may run into it again for a different reason).
If you can turn in different directions and access the menus, it's a passability issue, so check the passages settings on your tileset.
If you can't even turn or access the menu, it's likely to be an autorun event. So check all events on the map to see if any have autorun pages that might be active, as well as all common events that might have an autorun trigger and be active. This includes common events that aren't named, and common events and map events that don't actually have any commands, but are still set to autorun.
Another possibility is that a plugin could be interfering. In this case, you've added a plugin but not checked to see what switches or variables it uses, and you have used a switch or variable that it's using for something different. This is more likely if you use very low-numbered switches or variables, which is exactly what you've done. When adding plugins, check their parameters to see if they use switches or variables. If they do, make note of which ones, and go and see if you've already used them for something else. If you have, find some that you haven't used, and change the plugin to use those instead. Once you change the switch/variable being used (or if you didn't need to change them because you haven't used the same ones), go in and give those switches/variables names so you don't accidentally use them for something else later.