Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hang When saved #1150

Open
MK-coder-bit opened this issue Jun 7, 2024 · 30 comments
Open

Hang When saved #1150

MK-coder-bit opened this issue Jun 7, 2024 · 30 comments

Comments

@MK-coder-bit
Copy link

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

Which autosave causes the second error?

@MK-coder-bit
Copy link
Author

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

@MK-coder-bit
Copy link
Author

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

@hemoridos
Copy link
Contributor

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
Copy link
Author

MK-coder-bit commented Jun 9, 2024 via email

@MK-coder-bit
Copy link
Author

IG Folder

@hemoridos
Copy link
Contributor

That should be the the one
image

@hemoridos
Copy link
Contributor

hemoridos commented Jun 9, 2024

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
Copy link
Author

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

@MK-coder-bit
Copy link
Author

open-ig.log

@hemoridos
Copy link
Contributor

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
Copy link
Author

yeah my previous is 64bit ;(

@hemoridos
Copy link
Contributor

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
Copy link
Author

MK-coder-bit commented Jun 11, 2024 via email

@hemoridos
Copy link
Contributor

hemoridos commented Jun 11, 2024

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

@MK-coder-bit
Copy link
Author

MK-coder-bit commented Jun 11, 2024 via email

@hemoridos
Copy link
Contributor

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

@MK-coder-bit
Copy link
Author

MK-coder-bit commented Jun 11, 2024 via email

@MK-coder-bit
Copy link
Author

MK-coder-bit commented Jun 11, 2024 via email

@hemoridos
Copy link
Contributor

These settings should be enough
image

@MK-coder-bit
Copy link
Author

MK-coder-bit commented Jun 11, 2024 via email

@MK-coder-bit
Copy link
Author

MK-coder-bit commented Jun 11, 2024 via email

@MK-coder-bit
Copy link
Author

Same result with the error~
Error1

Hang.mp4

@akarnokd
Copy link
Owner

Remember this setting? #1149 (comment)

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

@hemoridos
Copy link
Contributor

@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
Copy link
Author

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

@hemoridos
Copy link
Contributor

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
Copy link
Contributor

The message overflow causing this should be solved with #1152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants