Azgaar / Fantasy-Map-Generator

Web application generating interactive and highly customizable maps
https://azgaar.github.io/Fantasy-Map-Generator
Other
4.64k stars 671 forks source link

Cannot load map files #1143

Closed Zorron60 closed 2 months ago

Zorron60 commented 2 months ago

Every time I attempt to load a map with the downloaded program or browser, I'm met with an error this error here:

An error has occurred on map generation. Please retry. If error is critical, clear the stored data and try again. TypeError: Cannot read properties of undefined (reading '0') at bitCode (lineclip.min.js?v1.105.0:2:912) at polygonclip (lineclip.min.js?v1.105.0:2:434) at clipPoly (commonUtils.js?v=1.103.0:6:10) at addFeature (features.js?v=1.104.0:158:22) at Object.markupPack (features.js?v=1.104.0:131:21) at generate (main.js?v=1.105.2:652:14) at async main.js?v=1.105.2:1251:3

This occurs when I load a previous saved map or try to create a new map. However, I'm ultimately trying to work on my saved map. I've changed the version in the .map file to 1.105.5 and the error changed to the screenshot shown below. The error above is what I get when I try to create a new map.

Steps to reproduce Open any map, new or old.

Expected behavior Receive the error message shown in the description

.map file Gathering Shadows 2024-07-28-22-59.zip

Screenshots Screenshot 2024-09-26 130542

System

Azgaar commented 2 months ago

Hello. The .map file format is incorrect in its svg part. It happens when the file is changed by some application that replaces the line ending symbols. It can be manually fixed, please see the comments here: https://github.com/Azgaar/Fantasy-Map-Generator/issues/64#issuecomment-392032945