Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [0.9.1a RC8] Unloadable save due to conversion failure  (Read 627 times)

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
[0.9.1a RC8] Unloadable save due to conversion failure
« on: May 22, 2020, 01:33:37 AM »

On Nexerelin's Bitbucket a user reported an unloadable save (download available via that link):
(zip with mods needed to run the save can be provided if needed)

Code
187212 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Error loading
187212 [Thread-4] ERROR com.fs.starfarer.campaign.save.CampaignGameManager  - Cannot convert type java.util.ArrayList to type com.fs.starfarer.campaign.econ.Economy
---- Debugging information ----
message             : Cannot convert type java.util.ArrayList to type com.fs.starfarer.campaign.econ.Economy
class               : com.fs.starfarer.campaign.econ.Market
required-type       : com.fs.starfarer.campaign.econ.Market
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number         : 369341
class[1]            : java.util.HashMap
converter-type[1]   : com.thoughtworks.xstream.converters.collections.MapConverter
class[2]            : com.fs.starfarer.api.impl.campaign.shared.PlayerActivityTracker
class[3]            : com.fs.starfarer.api.impl.campaign.shared.SharedData
class[4]            : com.fs.starfarer.campaign.ModAndPluginData
class[5]            : com.fs.starfarer.campaign.CampaignEngine
converter-type[2]   : com.fs.starfarer.campaign.save.I
version             : not available

My attempt to work around this by changing the economy referenced in that market simply led to similar errors in other places, sometimes to the point of absurdity:
Code
416897 [Thread-4] ERROR com.fs.starfarer.campaign.save.CampaignGameManager  - Cannot convert type java.util.LinkedHashMap to type com.fs.starfarer.campaign.Faction
---- Debugging information ----
message             : Cannot convert type java.util.LinkedHashMap to type com.fs.starfarer.campaign.Faction
class               : com.fs.starfarer.campaign.CustomCampaignEntity
required-type       : com.fs.starfarer.campaign.CustomCampaignEntity
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number         : 369380
Code
545221 [Thread-4] ERROR com.fs.starfarer.campaign.save.CampaignGameManager  - Cannot convert type java.util.LinkedHashMap to type com.fs.starfarer.api.campaign.SectorEntityToken
---- Debugging information ----
message             : Cannot convert type java.util.LinkedHashMap to type com.fs.starfarer.api.campaign.SectorEntityToken
class               : com.fs.starfarer.campaign.CircularOrbitWithSpin
required-type       : com.fs.starfarer.campaign.CircularOrbitWithSpin
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number         : 369383
As noted on that page, the backup save worked correctly.

Is this just a bizarre one-off glitch in the save process, or might it have a cause in vanilla/mods? Can a save so affected be easily rescued?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile
Re: [0.9.1a RC8] Unloadable save due to conversion failure
« Reply #1 on: May 22, 2020, 12:23:27 PM »

Hmm, that's super weird. I'm guessing what you tried is changing all instances of:
<economy ref="357"></economy>

To:
<economy ref="355"></economy>

Right? And then it still didn't load because other IDs were messed up, too. Haven't ever seen this before; my initial guess is this is some kind of rare/obscure xstream bug. It's hard to see how a mod might cause this, aside from perhaps increasing the complexity of the save data and thus somehow triggering the bug. Although... I wonder if any class having a field named "z" would cause problems. That seems... not impossible. Not likely, but still.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: [0.9.1a RC8] Unloadable save due to conversion failure
« Reply #2 on: May 23, 2020, 07:15:37 PM »

I'm guessing what you tried is changing all instances of:
<economy ref="357"></economy>

To:
<economy ref="355"></economy>

Right? And then it still didn't load because other IDs were messed up, too.
Yeah that's what happened.

I don't think I've ever heard of this issue happening before, including with playthroughs with the same mods this user had + many, many more. And continuing the game from the backed-up save seems to have worked (i.e. the issue isn't inevitable for a certain modlist or other broad campaign circumstances).
So... hopefully it's not something to worry about?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile
Re: [0.9.1a RC8] Unloadable save due to conversion failure
« Reply #3 on: May 23, 2020, 07:43:11 PM »

So... hopefully it's not something to worry about?

Here's hoping, fingers crossed!
Logged