JOverseer / joverseer

JOverseer is a desktop application which aims to assist players of the Middle Earth PBM game.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Version 1.16.10 of jOverseer corrupts the save files; possibly 1.16.8 as well #679

Closed randybias closed 1 year ago

randybias commented 5 years ago

I can't figure this out. When I use jOverseer only 800 orders show up in the drop down box for all characters. I was using a version that I compiled on the Mac, but I tried installing older versions that I compiled that were known to work. I also tried the version on the website. Somehow there is some kind of stale data or a cache somewhere that is some how making this happen.

I can try to investigate further, but I really need some pointers on where to look. I've deleted the app with AppZapper (a Mac app to completely remove an app that works quite well). I've rebooted. I've re-installed and uninstalled 4 different versions, official ones and ones I compiled, but to no avail. This happens across multiple games and game saves that were all known working at one point.

I'm stymied at this point. I may have to install a VM with Windows or Linux just so I can do my orders this turn, which is a real bummer.

Please point me to where I can look.

See attached screen shot.

borked-joverseer-orders

randybias commented 5 years ago

Clint didn't seem to believe me since the screen shot is from an earlier known good version and package that I built a while back. So here is the same screenshot from the latest 1.16.10 build. I can provide them from every other build including 1.16.6, which is on the website if you really want, but this is a real bug.

borked-joverseer-orders-v1 16 10

randybias commented 5 years ago

Sigh. I just installed jOverseer into a Windows VM. Same thing. Bizarre. I guess it must somehow be in my save file? I'm going to try to rebuild the game from scratch and see what happens.

randybias commented 5 years ago

OK. It looks like 1.16.10 installs something that jacks up the orders. When I uninstalled on the Windows VM and re-installed 1.16.6 from the website without doing the upgrade, things return to normal if I rebuild the game from scratch. The difference appears to be that once you install 1.16.10 it does something to mess up the JOV save file.

randybias commented 5 years ago

Confirmed work around on Mac: uninstall; install a version previous to 1.16.10 (possibly also 1.16.8). I used 1.16.6. Create a new game, re-import the XML and PDF files.

GnarlyDave commented 5 years ago

My initial thought is the serialisation version id of some objects may have changed unintentionally when I set some defaults to reduce the noise of compilation warnings. I'll have a think about a strategy for isolating the problem.

GnarlyDave commented 5 years ago

doing some goggling suggests that if there's is no explicit serial version id for a class, then each version of JVM is allowed to make it's own number hashed from the members of the class. And each version of the JVM can have different ideas of what changes are 'compatible'. This could be why you're seeing the problem and not everyone is.

randybias commented 5 years ago

It’s strange that I can consistently recreate with 1.16.10 on both Mac and PC the problem.

randybias commented 5 years ago

Have verified that 1.16.8 works properly if you recreate the game from scratch. It looks like 1.16.10 is the version that corrupts the save file.

GnarlyDave commented 5 years ago

I've checked the changes since 1.16.8 and none of the domain classes should have changed their signatures. The only thing that I did notice that 25 october I switched the build settings from a really obsolete version of java (1.6) to a only just obsolete version of java (1.8). Hence the added lib/compat-1.8-rt.jar runtime jar, which I just copied from a recent 1.8 JDK. At some point I also switched to using subant tasks for building. I believe that you're using a different build script, so that may account for some incompatabilities.

In case it wasn't obvious, the .jov is just the Game java object serialized to a GZIPStream. The serialization mechanism is the default built into java..probably actually the runtime library. When compiling JO I've been telling the compiler which compatability level to assume for the bytecode and for the runtime library. see (google 'bootclasspath')

Hmm, I'd better check that the rt.jar is the only file needed for serialization in 1.8.

randybias commented 5 years ago

I see. That makes sense. I will try and test the new build script.

randybias commented 5 years ago

Is it a new file or an updated build.xml?

On Mon, Nov 5, 2018 at 2:29 PM Randy Bias randybias@gmail.com wrote:

I see. That makes sense. I will try and test the new build script.

GnarlyDave commented 5 years ago

Ed just pointed out that if you happened to pick a .jov file which was written when JO was having problems with reading the order info, the order Metadata stored in the .jov file would be wrong. This would explain why you see the 'corruption' only in the order drop down.

EdwardLaneUK commented 5 years ago

suggest checking your 'order info' tab and comparing what you see in the 'skill' column

it used to have CS for command skill, it now says Command Skill in that column, and at one stage the code was using that table to decide which order types to offer to characters - so perhaps it is just offering move orders if the letter combos in that table don't now line up with whatever criteria Joverseer is using in the compiled version you have.

Dave fixed something similar on PC a while back, and perhaps this is related, perhaps the fix form PC doesn't work for MAC ?

On Sat, 3 Nov 2018 at 21:28, Randy Bias notifications@github.com wrote:

Confirmed work around on Mac: uninstall; install a version previous to 1.16.10 (possibly also 1.16.8). I used 1.16.6. Create a new game, re-import the XML and PDF files.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JOverseer/joverseer/issues/679#issuecomment-435622236, or mute the thread https://github.com/notifications/unsubscribe-auth/AMu-lCLyZmTSRx0UEJRKzZG4FbjVhS6yks5urgp6gaJpZM4YMp9w .

randybias commented 5 years ago

I can try and take a look at it soon, but it might be another week or so.

GnarlyDave commented 1 year ago

Closing as I can't see how to progress this, and not seen any complaints in the last 4 years of people unable to read old .jov files.