Comments (8)
It could be that the config file has corrupted, which would cause a crash. The config file can be found in:
~/.local/share/blobwarsAttrition/config.json
That should be valid JSON. Try renaming it and restarting the game (which will effectively reset your configuration). If that works, it means your config was busted. Attach the file in a comment and I'll take a look (or you could see if you could fix it manually).
If that doesn't work, try running through gdb. This should show you a stacktrace of where the crash occurs.
gdb blobwarsAttrition
run
(upon crash) where
from blobwarsattrition.
yes, that file was empty - 0 bytes long. having deleted the empty file blobwarsAttrition starts.
however, trying to load a game gives
ERROR: Corrupt save file: /home/neil/.local/share/blobwarsAttrition/0/game.json
and it crashes out
looking at the files in ~/.local/share/blobwarsAttrition/0/
there are 9 files. beachApproach.json beachFront1.json boss1.json game.json greenlands1.json greenlands2.json greenlands3.json and greenlands4.json
beachFront1.json boss1.json game.json and greenlands5.json are all 0 bytes
should I just delete all the zero length files?
from blobwarsattrition.
You shouldn't have any zero length files in there, at all. Sounds like the game isn't saving correctly for some reason.
You could delete them, yes. But it will put the game into an inconsistent state where you'll find you end up with more keys than you should do; it will basically make your playthrough too easy.
Did you compile the game yourself? Or are you using the version from itch.io?
Edit: a bit more info - those files are used to store the level state, for the purpose of creating a persistent game world. Deleting them will basically reset the level as if it's being visited for the first time.
from blobwarsattrition.
ok, so it looks like it is safe to delete. my son is playing it and he quit out of a few levels (esc) because he got stuck (he needs more patience :-) ). I compiled it myself, using the source+data from itch.io
I created a package build script (for slackware) which is below. as you can see there are a couple of build patches and a cosmetic (default gore setting) patch included. It requires the source tar.gz file in the same ditrectory as the script (and also a slack-desc and README file, which I can post if you're interested)
#!/bin/sh
Slackware build script for blobwarsAttrition
Written by Tim Dickson [email protected]
(C) 2019
changelog
PRGNAM=blobwarsAttrition
VERSION=${VERSION:-1.2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.src.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L .
( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555
-o -perm 511 ) -exec chmod 755 {} ; -o
( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444
-o -perm 440 -o -perm 400 ) -exec chmod 644 {} ;
#patch file to fix build problem
sed -i "/nextp/d" src/game/credits.h
sed -i 's/*strtok_r/*strtok_rr/g' src/util/util.c
#patch to make default more kiddy friendly
sed -i 's/app.config.blood = 1/app.config.blood = 0/g' src/system/init.c
make CFLAGS="$SLKCFLAGS" DATA_DIR="/usr/share/games/$PRGNAM"
make install DESTDIR=$PKG DATA_DIR="/usr/share/games/$PRGNAM"
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cp CHANGELOG.raw LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION/
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n
from blobwarsattrition.
(appologies for the weird formatting github put on my pasted text)
from blobwarsattrition.
I'm not having any luck duplicating this error.
Something you could try: backup or delete the ~/.local/share/blobwarsAttrition directory and start a new game using:
blobwarsAttrition -debug
When playing, you'll see debug stuff on screen, but you can also press 0 on the keyboard to automatically complete a mission. Do this on a few stages and then check to see that the save files are being created properly. If they're all still 0 in size then we'll need to do more digging.
The saving is done by first creating temporary files and then renaming them, in order to try and keep things in sync. This is done here:
https://github.com/stephenjsweeney/blobwarsAttrition/blob/master/src/hub/postMission.c#L91
The main level saving is done here:
https://github.com/stephenjsweeney/blobwarsAttrition/blob/master/src/world/worldSaver.c#L30
Perhaps more debug and error checking will be needed?
from blobwarsattrition.
it seems to be saving ok. I tried completing a level in debug mode as well as "0" completing, and tried quitting the program (x) in corner, also tried kill -9 gamepid but no zero-length files. I'll have to see if my son can remember what he did when it "went wrong".
from blobwarsattrition.
apparently it happened after he died on grasslands5, or whengrasslands5 was completed. Unfortunately it's not much to go on. I'll close this, and if it re-occurs open a fresh issue hopefully with more info.
from blobwarsattrition.
Related Issues (20)
- Random crash when quitting the mission HOT 10
- Question about combos HOT 2
- Small Cosmetic Problems. HOT 2
- Crash "ERROR: No such lookup value 2, prefix=FACING_" HOT 7
- Best grenade combo is not saved to stats HOT 2
- Crash when starting a new game (not always) HOT 8
- Powerup stuck in wall HOT 10
- Compile error with gcc 8.1.1 HOT 1
- error: ‘fadeAmount’ may be used uninitialized in this function HOT 5
- Using `strncpy` to copy overlapping strings. HOT 7
- Battery trophy description is wrong HOT 1
- make fails with following error HOT 9
- shortage of yellow key cards HOT 4
- Compilation problem HOT 3
- Several crashes HOT 7
- Game loads wrong save slot HOT 3
- Wrong items are activated in main menu HOT 3
- "make install" fails because "icons/blobwarsAttrition.desktop" does not exist HOT 2
- Unable to progress, possibly due to a crash on level Greenlands 3 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blobwarsattrition.