These errors are related to the files corruption. In this case, the only thing to do is to reinstall the software. When mapmain undefined is encountered, it means the software needs a module and can't access it. This is due to the usage of another function of the software. Before activating that option, make sure to define the map. The second one is probably caused by file corruption. A simple reinstallation should fix them.