akarnokd / open-ig

Free & open-source reimplementation of Imperium Galactica. Download the Installer below the file list!
GNU Lesser General Public License v3.0
252 stars 57 forks source link

Hang When saved #1150

Open MK-coder-bit opened 3 months ago

MK-coder-bit commented 3 months ago

Hi! Thank you for the game update! After i update, everything seem to be doing great, till i save~ it hang on me~

Error msg as below

An unexpected error occurred. You should consider submitting an error report via the project issue list: https://github.com/akarnokd/open-ig/issues Please include the following diagnostic information followed by the error stacktrace(s): Java version: 1.8.0_361 Java vendor: Oracle Corporation (http://java.oracle.com/) Java class version: 52.0 Operating system: Windows 10, amd64, 10.0 Game version: 0.95.248 Command line: [-memonce, -en] Available memory: 174 MB Maximum memory: 910 MB Parallelism: 12 Language: en Date and time: 2024-06-07T23:33:47.622Z

A crash save may have been created. Please attach it in the issue report (zipped). javax.xml.stream.XMLStreamException: java.io.EOFException at hu.openig.utils.XElement.parseXMLGZ(XElement.java:327) at hu.openig.screen.items.LoadSaveScreen.findSaves(LoadSaveScreen.java:2237) at hu.openig.screen.items.LoadSaveScreen$16.doInBackground(LoadSaveScreen.java:744) at hu.openig.screen.items.LoadSaveScreen$16.doInBackground(LoadSaveScreen.java:1) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.EOFException at java.util.zip.GZIPInputStream.readUByte(Unknown Source) at java.util.zip.GZIPInputStream.readUShort(Unknown Source) at java.util.zip.GZIPInputStream.readHeader(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at hu.openig.utils.XElement.parseXMLGZ(XElement.java:323) ... 9 more

javax.xml.stream.XMLStreamException: java.io.EOFException at hu.openig.utils.XElement.parseXMLGZ(XElement.java:327) at hu.openig.screen.items.LoadSaveScreen.findSaves(LoadSaveScreen.java:2237) at hu.openig.screen.items.LoadSaveScreen$16.doInBackground(LoadSaveScreen.java:744) at hu.openig.screen.items.LoadSaveScreen$16.doInBackground(LoadSaveScreen.java:1) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.EOFException at java.util.zip.GZIPInputStream.readUByte(Unknown Source) at java.util.zip.GZIPInputStream.readUShort(Unknown Source) at java.util.zip.GZIPInputStream.readHeader(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at hu.openig.utils.XElement.parseXMLGZ(XElement.java:323) ... 9 more

javax.xml.stream.XMLStreamException: java.io.EOFException at hu.openig.utils.XElement.parseXMLGZ(XElement.java:327) at hu.openig.screen.items.LoadSaveScreen.findSaves(LoadSaveScreen.java:2237) at hu.openig.screen.items.LoadSaveScreen$16.doInBackground(LoadSaveScreen.java:744) at hu.openig.screen.items.LoadSaveScreen$16.doInBackground(LoadSaveScreen.java:1) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.EOFException at java.util.zip.GZIPInputStream.readUByte(Unknown Source) at java.util.zip.GZIPInputStream.readUShort(Unknown Source) at java.util.zip.GZIPInputStream.readHeader(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at hu.openig.utils.XElement.parseXMLGZ(XElement.java:323) ... 9 more

save files zip as attached save.zip

MK-coder-bit commented 3 months ago

The alien diplomacy is resolved though~ I try on an autosave file & when the time run, it hang with this error msg which i cant cop lol hear from you! Error ^O^

hemoridos commented 3 months ago

Hello It seems there were some leftover corrupted saves from the bug fixed, that caused this when reading the save files. I cleaned those up attached here saves_fixed.zip

hemoridos commented 3 months ago

Which autosave causes the second error?

MK-coder-bit commented 3 months ago

As you can see the recent ones at 332PM, it just hang on me after 5 mins.... save.zip

MK-coder-bit commented 3 months ago

This is screen record of how it hang~ Error Hang.zip

hemoridos commented 3 months ago

I tried running your save for a while but could not reproduce the error. There should be a few .log files in your open-ig folder, could you please post those here so I can better look what might have happened.

MK-coder-bit commented 3 months ago

Sure! Where is the log folder? Let me know! On Sunday, 9 June 2024 at 05:21:48 am SGT, Zoltan @.***> wrote:

I tried running your save for a while but could not reproduce the error. There should be a few .log files in your open-ig folder, could you please post those here so I can better look what might have happened.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

MK-coder-bit commented 3 months ago

IG Folder

hemoridos commented 3 months ago

That should be the the one image

hemoridos commented 3 months ago

After trying the java version in your error report I did manage to have a similar error. For the time being I suggest updating to a more recent java main version. The one suggested in the readme should not cause this error. https://adoptium.net/

MK-coder-bit commented 3 months ago

Ok download the adoptium so this is the upodateed java eh? here you go log file!@

MK-coder-bit commented 3 months ago

open-ig.log

hemoridos commented 3 months ago

You could also try using a 64bit version of java 8 from the page below. It also seemed to work just fine. https://www.java.com/download/manual.jsp The jre installed by the online installer produced the bug for me as well.

MK-coder-bit commented 3 months ago

yeah my previous is 64bit ;(

hemoridos commented 3 months ago

The overall problem is that the game runs out of available memory. The short term solution is to use newer versions of java as those have better memory handling.

MK-coder-bit commented 3 months ago

Ooo i see,  only have the 64bits java installed now & it still hang~ how does a game run out of memory? ;(

On Tuesday, 11 June 2024 at 04:04:24 pm SGT, Zoltan ***@***.***> wrote:  

The overall problem is that the game runs out of available memory. The short term solution is to use newer versions of java as those have better memory handling.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hemoridos commented 3 months ago

Is it the java 8 64bit or the adoptium one?

MK-coder-bit commented 3 months ago

Java 8 bit you send, i installed~ This is the one right as attached? Adoptium one i also downloaded, so will it supercede or? MK On Tuesday, 11 June 2024 at 05:02:27 pm SGT, Zoltan @.***> wrote:

Is it a java 8 64bit or the adoptium one?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hemoridos commented 3 months ago

The one on the adoptium site is the newer one, try that instead.

MK-coder-bit commented 3 months ago

Ok do i have to change this setting before install? MK On Tuesday, 11 June 2024 at 05:37:18 pm SGT, Zoltan @.***> wrote:

The one on the adoptium site is the newer one, try that instead.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

MK-coder-bit commented 3 months ago

install on local drive or entire feature installed? MK On Tuesday, 11 June 2024 at 05:41:45 pm SGT, Michael Kwah @.***> wrote:

Ok do i have to change this setting before install? MK On Tuesday, 11 June 2024 at 05:37:18 pm SGT, Zoltan @.***> wrote:

The one on the adoptium site is the newer one, try that instead.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hemoridos commented 3 months ago

These settings should be enough image

MK-coder-bit commented 3 months ago

Ok i installed it few days ago so it will auto run after i click the game app again? if it is then the result still hang~ MK On Tuesday, 11 June 2024 at 06:43:09 pm SGT, Zoltan @.***> wrote:

These settings should be enough image.png (view on web)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

MK-coder-bit commented 3 months ago

No need change anything right?

On Tuesday, 11 June 2024 at 06:43:09 pm SGT, Zoltan ***@***.***> wrote:  

These settings should be enough image.png (view on web)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

MK-coder-bit commented 3 months ago

Same result with the error~ Error1

https://github.com/akarnokd/open-ig/assets/172049177/603ffe90-7ed7-4115-b2c4-53c34b9a03b4

akarnokd commented 3 months ago

Remember this setting? https://github.com/akarnokd/open-ig/issues/1149#issuecomment-2154968530

Go in there and change the number to 1500 and see if that hangs.

hemoridos commented 3 months ago

@MK-coder-bit If you installed the java 8 64bit I suggested, that would've overwritten the adoptium installation settings so just to be sure reinstall the adoptium again.

For me it hang even with 2048MB memory limit when using a 32bit jvm. I'm working on a PR that might alleviate some of the issue. On a more recent java the GC seems to do it's job fine for the most part.

MK-coder-bit commented 3 months ago

OMG changing to 1500 setting works! thank you guys! if anything hang, let you know again!

hemoridos commented 3 months ago

It turns out, not surprisingly, that this was also caused by my diplomacy bug. As relations were not initialized correctly, when meeting new races a new message was generated about a new discovery every time a fleet/planet of an alien showed up in radar range. This created ~40Mb worth of messages about new alien races. Add in the overhead of these being loaded and rendered in-game, took up enough memory to make the game crash.

Deleting the message history in the bottom message bar solves this.

hemoridos commented 3 months ago

The message overflow causing this should be solved with #1152