Author Topic: [Solved] Battlescape saves don't work (yaml-cpp issue)  (Read 10864 times)

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
[Solved] Battlescape saves don't work (yaml-cpp issue)
« on: December 01, 2020, 05:40:53 pm »
Hello folks,

First I would like to thank all those fantastic people who made the original OXC and the extended
 version of OXC possible. This isn't my first rodeo, I did the original OXC some years back and of course right back in 1994 in my student dorm room with my roomates.

Overnight, I compiled OXCE using Meridian's link:

https://openxcom.org/forum/index.php/topic,7048.0.html

I built it on linux, on my Raspberry Pi 3 B+ board. I think it took about 2 hrs to compile -though I'm not too sure about the time as I was fast asleep while RPi 3 hummed along.

It's been a while since I have done any serious package building & compiling on linux, so I couldn't exactly pin-point the problem. First of all, the game worked -everythying seems to be fine so far. Except in some instances when I save my Battlescape mission, log out and returned to my saved game, the terrain seem to be missing and I have instead my squad and AI standing around zombified in a black background --see below:




Hopefully someone has an idea of what's wrong in this instance.

Regards
Heybeardy.
« Last Edit: February 12, 2023, 11:49:58 am by Meridian »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bugs (?) with my saved games
« Reply #1 on: December 01, 2020, 06:20:03 pm »
can you move around, do wall still exists? and could you add this save to your post?

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #2 on: December 01, 2020, 06:33:19 pm »
can you move around, do wall still exists? and could you add this save to your post?

Thanks for the reply Yankes.

Yes, I can move around but not like in the normal fashion. Unit can only move in straight line and with no limbs movement, they can shoot but it's only single shot. AI can see my units and shoot their nasty green peas at my men. lol

I assumed you mean my saved game that you wanted me to post - I have attached the two files, hopefully this is what you wanted,

Regards,
Heybeardy.

Btw, there are no walls -- just a black background, in the first image my units are in the skyranger while in the second they're outside around the skyranger with smoke gen discarded.
« Last Edit: December 01, 2020, 06:38:17 pm by Heybeardy »

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #3 on: December 01, 2020, 06:58:36 pm »
Hey, sorry about it - I have attached the wrong save game files I think.

The save files for the images that I posted are from a terror mission --I have attached the right files for these particular images.

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #4 on: December 01, 2020, 07:16:11 pm »
I went & check my saved games --apparently it's all of the Battlescape. The Geoscape seems to be fine.

I load the Geoscape that I saved before my skyranger landed for the terror mission --the Battlescape seems to be fine and the layout looked similar to the one in my image with black background:



Regards,
Heybeardy.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bugs (?) with my saved games
« Reply #5 on: December 01, 2020, 08:16:09 pm »
I loaded this save and its fine, everything is where it should be. It look like your game get corrupted and stop showing some graphics.
Did you start again whole game after log back or it stay ruining during logoff?

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #6 on: December 01, 2020, 08:55:50 pm »
I loaded this save and its fine, everything is where it should be. It look like your game get corrupted and stop showing some graphics.
Did you start again whole game after log back or it stay ruining during logoff?

If I stayed in the game it seems to worked fine but  when I tried it by logging out & in then this graphic problem reared its head. This is not the first time it occurred --it happened this morning as well.

So if it worked fine for you, then it must be problem relating to my RPi 3+ platform and/or installation. (?) I haven't the idea of how to fix it as I'm not too familiar with how the graphic in the game works, much less how ARM7v in RPi 3+ works.

Regards,
Heybeardy.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bugs (?) with my saved games
« Reply #7 on: December 02, 2020, 12:26:36 am »
If I stayed in the game it seems to worked fine but  when I tried it by logging out & in then this graphic problem reared its head. This is not the first time it occurred --it happened this morning as well.

So if it worked fine for you, then it must be problem relating to my RPi 3+ platform and/or installation. (?) I haven't the idea of how to fix it as I'm not too familiar with how the graphic in the game works, much less how ARM7v in RPi 3+ works.

Regards,
Heybeardy.
First this look like some bad interaction with OS that can't be fix from our end. I would need have exactly same machine recreate this bug to even try fix it.
Second your answer are not precise enough to see what you do, best if you describe what you do in steps what you do to recreate this bug.
E.g.:
Code: [Select]
1) boot machine
2) log in
3) run game
4) load save
5) map work
6) close game
7) log out
8) log in
9) run game
10) load save
11) have black map

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #8 on: December 02, 2020, 01:15:01 am »
First this look like some bad interaction with OS that can't be fix from our end. I would need have exactly same machine recreate this bug to even try fix it.
Second your answer are not precise enough to see what you do, best if you describe what you do in steps what you do to recreate this bug.
E.g.:
Code: [Select]
1) boot machine
2) log in
3) run game
4) load save
5) map work
6) close game
7) log out
8) log in
9) run game
10) load save
11) have black map

Sorry if I wasn't clear. O.k., this is how it goes:

1. Compiled OXCE using the exact commands for Linux installation in Meridian's post. Did it last night on my Raspberry Pi 3 B+ board. Took about 2 (?) hrs to complete without any errors.

2. Played the game this morning --everything seems to worked fine.

3. Later in the morning, I reboot  into my RPi3 B+ board & logged in and attempted to start my saved Battlescape game. It turned out that all saved battlescape games are affected.

4. The sequence went like this:

   a) Boot into RPi3 B+.
   b) Logged in Raspberey Pi Os (based on Debian).
   c) Started OXCE in the terminal.
   d) Clicked on the saved Battlescape game.
   e) Game opened to black map screen with just my units & AI visible --same as the two images
        in my first post above. All saved Battlescape games are affected.
   f) Quit the Battlescape mission.
   g) Clicked on the saved Geoscape game.
   h) Game worked fine. I have one such save game where the skyranger was just about to land
       on a terror mission.
    i) Clicked on the saved Geoscape game with skyranger on way to terror mission.
    j) Game opened to normal map, did the first turn.
    k) Saved the Battlescape game and quit.
    l) Clicked on the save Battlescape game,  game opened to the same black map.

It work fine if I goes through the terror mission from start to finish, return to Geoscape & save it. But I do not have the time to play continuously, hence the need to save the game.

Regards,
Heybeardy.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bugs (?) with my saved games
« Reply #9 on: December 02, 2020, 01:57:32 am »
One possible fix I would see is to disable lazy loading. Because it look like it do not load all surfaces correctly when load save game, but load them when you start new mission.
What commit you used to compile this version?

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #10 on: December 02, 2020, 01:42:13 pm »
One possible fix I would see is to disable lazy loading. Because it look like it do not load all surfaces correctly when load save game, but load them when you start new mission.
What commit you used to compile this version?

Excuse my ignorance, but what's 'lazy loading'?

By commit I assumed you mean the git repo that I used. I pulled from Meridian's --I believe that this is what you're referring to, the commit tag:

Quote
d30709a0bf7b4f263e4db28bbce848c8036614cd

Quote
$ git show d30709a0bf7b4f263e4db28bbce848c8036614cd
commit d30709a0bf7b4f263e4db28bbce848c8036614cd (HEAD -> oxce-plus, origin/oxce-plus, origin/HEAD)
Date:   Thu Nov 26 17:00:37 2020 +0100

    Derp

diff --git a/src/Battlescape/DebriefingState.cpp b/src/Battlescape/DebriefingState.cpp
index 0a40bf49a..61a0499b5 100644
--- a/src/Battlescape/DebriefingState.cpp
+++ b/src/Battlescape/DebriefingState.cpp
@@ -2554,7 +2554,10 @@ void DebriefingState::recoverAlien(BattleUnit *from, Base *base)
                ss << "; Status = " << from->getStatus();
                ss << "; Faction = " << from->getFaction();
                ss << "; Orig. faction = " << from->getOriginalFaction();
-               ss << "; Spawn unit = [" << from->getSpawnUnit()->getType() << "]";
+               if (from->getSpawnUnit())
+               {
+                       ss << "; Spawn unit = [" << from->getSpawnUnit()->getType() << "]";
+               }
                ss << "; isSurrendering = " << from->isSurrendering();
                throw Exception(ss.str());
        }

Earlier  this morning I copied my OXCE directories to a different micro SD card containing an older raspberry pi OS, tried the saved Battlescape game and the result was the same --black map.

I also tried the game on one of the older board specifically RPi 2+ with the same result.

I have a two PCs, however both have hardware problems. My reliable AMD64 PC while it works fine for general purpose use, is showing its age and breaks down if I attempt to do heavy lifting like compiling etc and a lot of files are corrupted. So I do not have a different machine to test the game on.
« Last Edit: February 08, 2022, 03:46:56 pm by Meridian »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bugs (?) with my saved games
« Reply #11 on: December 02, 2020, 03:20:04 pm »
In game options there is switch that make that only files you need are loaded, its is way to reduce memory overhead in very big mods (that if load all assets could use over 1GiB of memory).

https://openxcom.org/forum/index.php/topic,3287.msg104264.html#msg104264

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #12 on: December 02, 2020, 03:39:15 pm »
In game options there is switch that make that only files you need are loaded, its is way to reduce memory overhead in very big mods (that if load all assets could use over 1GiB of memory).

https://openxcom.org/forum/index.php/topic,3287.msg104264.html#msg104264

I figured it as much -I went to look at the config files this morning and have already set 'lazyLoadResources: false'. Didn't help as the black map still remained.

I'm going to take a look at my old AMD64 machine, just to check if it's stable enough to handle a few things before attempting a heavy workout on it. In meantime later tonight I'll probably try a new git pull & compiling of a fresh OXC and also OXCE on my RPi 3 B+ board.

Regards,
Heybeardy.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bugs (?) with my saved games
« Reply #13 on: December 02, 2020, 08:41:06 pm »
Can you enable path preview and when you load save show what it is showing? try imaging that whole map is still there and order unit to move.
Could you show screen shots of this paths that will be show?

Offline Heybeardy

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Bugs (?) with my saved games
« Reply #14 on: December 02, 2020, 11:41:12 pm »
Can you enable path preview and when you load save show what it is showing? try imaging that whole map is still there and order unit to move.
Could you show screen shots of this paths that will be show?

I assumed that this is what you mean?



I have attached a minute of recording of this stuff on my desktop - video shows unit moving & AI reaction shooting.