jeheydorn / nortantis

Nortantis is a fantasy map generator. It uses a simple tectonic plate simulation to create islands and continents with trees, rivers, and mountains. The result has the appearance of an old-fashioned hand-drawn map.
GNU Affero General Public License v3.0
70 stars 19 forks source link

Generator getting stuck #3

Closed SleepyKitten-Games closed 5 years ago

SleepyKitten-Games commented 5 years ago

Whenever I click the "generate" button, nothing happens. If there was text in the bottom-left text window, it clears and them says "Creating the map." and "Generating the background image." Nothing happens after that. A similar problem happens when I try to open the Editor (Editor>Launch Editor) and have it display the map at 75% zoom. It was running mostly ok on 25% and 50% zoom, and a couple times I even got it to work at 100% zoom. But whenever I try to open the Editor and the zoom is set to 75%, it gets stuck at "Drawing ocean.", or however the program phrases it. I realize there is the chance it's a hardware problem on my end, but according to Task Manager>Performance, I have 4.3 GB of a total 8 GB available. I've even tried closing all other apps, but the program still gets stuck in those two placea. I've tried redownloading the program, I've tried closing the program and reopening it, but it doesn't seem to work. My laptop has Windows 10, and I recently installed the latest version of Java.

jeheydorn commented 5 years ago

It sounds like it's running out of memory. Java programs are only allowed up to 25% of the system memory by default. If you run the generator using the batch files I provide from the zip file it will use 2GBs by default (which for your case is the same as the default). Try editing the batch file to increase the memory. Which file to edit depends on your OS. I have instructions on the download page with how to increase the memory.

On Thu, Jan 3, 2019 at 1:08 PM NatfromGameFire notifications@github.com wrote:

Whenever I click the "generate" button, nothing happens. If there was text in the bottom-left text window, it clears and them says "Creating the map." and "Generating the background image." Nothing happens after that. A similar problem happens when I try to open the Editor (Editor>Launch Editor) and have it display the map at 75% zoom. It was running mostly ok on 25% and 50% zoom, and a couple times I even got it to work at 100% zoom. But whenever I try to open the Editor and the zoom is set to 75%, it gets stuck at "Drawing ocean.", or however the program phrases it. I realize there is the chance it's a hardware problem on my end, but according to Task Manager>Performance, I have 4.3 GB of a total 8 GB available. I've even tried closing all other apps, but the program still gets stuck in those two placea. I've tried redownloading the program, I've tried closing the program and reopening it, but it doesn't seem to work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jeheydorn/nortantis/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AHG-KYaydA9oIGQusO-Yqc319vGGU6LIks5u_lUfgaJpZM4ZonXx .

SleepyKitten-Games commented 5 years ago

Increasing it to "-Xmx3G" got the Generate button working. Though that seems to be the highest I can set it to, as setting the 3 to a 4 doesn't seem to work. The 75% zoom option in the editor still is giving my laptop some issue (though that could also just be a fault of my laptop itself). Are there any other ways I could try getting the 75% zoom option to work on this laptop? I am also curious about what this text means. This appears whenever I run the .bat file, as long as the "-Xmx3G" bit is set to either 2 or 3. "Error occurred during initialization of VM Could not reserve enough space for 3145728KB object heap" When I set that to a 4, instead it says this: "Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit."

jeheydorn commented 5 years ago

I think your problem is you are probably using 32 bit Java. Could you try switching to 64-bit Java?

I believe you can tell what Java version you have by running java -version in a command prompt.

On Fri, Jan 4, 2019, 12:19 PM NatfromGameFire <notifications@github.com wrote:

Increasing it to "-Xmx3G" got the Generate button working. Though that seems to be the highest I can set it to, as setting the 3 to a 4 doesn't seem to work. The 75% zoom option in the editor still is giving my laptop some issue (though that could also just be a fault of my laptop itself). Are there any other ways I could try getting the 75% zoom option to work on this laptop? I am also curious about what this text means. This appears whenever I run the .bat file, as long as the "-Xmx3G" bit is set to either 2 or 3. "Error occurred during initialization of VM Could not reserve enough space for 3145728KB object heap" When I set that to a 4, instead it says this: "Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit."

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeheydorn/nortantis/issues/3#issuecomment-451525147, or mute the thread https://github.com/notifications/unsubscribe-auth/AHG-Kaj2LkujXGQjiVNK8EhnRX2E5J5hks5u_5swgaJpZM4ZonXx .

SleepyKitten-Games commented 5 years ago

This is what comes up when I type "java -version": java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode, sharing)

jeheydorn commented 5 years ago

That's 32 bit Java. 64 bit Java will say 64-bit in the output:

C:\Users\Joseph>java -version openjdk version "11.0.1" 2018-10-16 OpenJDK Runtime Environment 18.9 (build 11.0.1+13) OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

On Fri, Jan 4, 2019 at 8:12 PM NatfromGameFire notifications@github.com wrote:

This is what comes up when I type "java -version": java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode, sharing)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeheydorn/nortantis/issues/3#issuecomment-451619479, or mute the thread https://github.com/notifications/unsubscribe-auth/AHG-KUp2NhkROL4v7VGUrYdEohQlwe8bks5vAAohgaJpZM4ZonXx .

SleepyKitten-Games commented 5 years ago

Upgraded to 64 bit Java. First thing I noticed was that "run in Windows.bat" actually opened the program, instead of me having to manually open it. And now the Editor is working too. Thank you, I didn't realize I'd been using a different bit type of Java. A minor side question, though I realize this doesn't have to do with the problems I was having with the program before. Is there a way to get the Generate button to generate the map at different zooms? It seems it defaults to 25%.

jeheydorn commented 5 years ago

I'm glad it's working for you. I pushed out a fixed todaythqt will cause the memory error to show a pop-up when it happens. I also reduced the memory used by the generator by clearing the image cache when pressing Generate or when changing zoom in the editor.

To answer your other question, I'm not sure whether you mean the zoom or the resolution of the generated map. I don't do anything to control the zoom of the generated map because that's handled by your system's default image editor. As for changing the resolution of the generated map, try changing the resolution slider in the background tab.

On Sat, Jan 5, 2019, 12:13 PM NatfromGameFire <notifications@github.com wrote:

Upgraded to 64 bit Java. First thing I noticed was that "run in Windows.bat" actually opened the program, instead of me having to manually open it. And now the Editor is working too. Thank you, I didn't realize I'd been using a different bit type of Java. A minor side question, though I realize this doesn't have to do with the problems I was having with the program before. Is there a way to get the Generate button to generate the map at different zooms? It seems it defaults to 25%.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeheydorn/nortantis/issues/3#issuecomment-451678336, or mute the thread https://github.com/notifications/unsubscribe-auth/AHG-Ka-KwlI4Jof-k7H1xNit1nwVcqNTks5vAOtKgaJpZM4ZonXx .

SleepyKitten-Games commented 5 years ago

I suppose I meant resolution. I phrased it like that because when I clicked "generate" while Resolution was set to 0.25, the image it created and pulled up was the same size as the map it shows in the Editor at 25% zoom. Thank you for answering my questions so quickly.