Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: [0.8.1a RC8] Freeze on Save  (Read 3118 times)

matveich

  • Ensign
  • *
  • Posts: 30
    • View Profile
[0.8.1a RC8] Freeze on Save
« on: June 18, 2017, 01:19:44 AM »

There is already a number of topics reporting freezes/crashes on save of modded game. I have managed to produce a save, where this problem is reproducible. The save and mods can be found here: https://drive.google.com/file/d/0BzaLdTtFg_piVU9TQTdMLVVpeW8

To reproduce the issue:
1) Attack the Teresa Terror fleet.
2) Fleet battle size 500.  Deploy all combat ships, except Desdinova.
3) Destroy all enemy ships except the custom cruiser Gulf-class Fang.
4) Once the cruiser is the only ship left retreat.
5) Disengage and save the game. The game should freeze on saving backup file.

I am using -Xms8g -Xmx8g.

Also, unrelated question: why starsector.exe is not working(windows 10)? If I double click it, nothing happens and the only way to launch the game is via bat file.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.8.1a RC8] Freeze on Save
« Reply #1 on: June 18, 2017, 05:59:26 AM »

I made a custom version of xstream to add some debug info.  Apparently it's dying on the IBB fleet's memory.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.8.1a RC8] Freeze on Save
« Reply #2 on: June 18, 2017, 06:38:08 AM »

I think I found what was causing it.  Apparently, referencing a FleetMemberAPI via memory is Very Bad, so certain IBBs can cause this.

A workaround for now is to save copy.  The real fix, unfortunately, will come later and break saves.


P.S. You don't want to know what I had to go through to find this.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: [0.8.1a RC8] Freeze on Save
« Reply #3 on: June 18, 2017, 08:11:04 AM »

Oh, jeez, I think I can imagine what you went through there. Xstream can get real temperamental if things are saved in a certain order - generally reference loops are fine, but sometimes it'll just freak out. It hanging is a new one for me, though - have only seen it crash out in that case, so far.

Did you recompile the xstream jar or did some fancy configuring via custom converters etc? Either way, that's a really good idea, makes the black box a good deal less black boxy.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.8.1a RC8] Freeze on Save
« Reply #4 on: June 18, 2017, 01:05:52 PM »

I recompiled, and yes it did crash out (throw an exception).  The hang was due to the Starsector loading logic; that part's on you.

I assume saving a Fleet/Entity in memory is safe, because there's a specific "getFleet()" and "getEntity()" method in MemoryAPI.  Or would that cause issues?
« Last Edit: June 18, 2017, 01:16:50 PM by Dark.Revenant »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: [0.8.1a RC8] Freeze on Save
« Reply #5 on: June 18, 2017, 01:17:39 PM »

Ahh, right, right - I think I fixed the "freeze" part up a few days ago.

(Would you mind emailing me the jar, if you get a chance? That could come in quite handy.)
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.8.1a RC8] Freeze on Save
« Reply #6 on: June 18, 2017, 01:37:45 PM »

Sure; sent it.
Logged