#96: Game crashes after loading saved games
------------------------------+---------------------------------------------
Reporter: bearda | Type: defect
Status: new | Priority: major
Milestone: | Component: Campaign
Version: svn/trunk | Keywords: save, crash, mac
Operating_system: Mac OS |
------------------------------+---------------------------------------------
Using the latest trunk code on a Mac OS X machine (10.5.3, G4 mac mini).
Loading a saved game results in a crash most of the time with the
following error on console:
error : [dirDiff] dirDiff: result out of range
error : [dirDiff] Assert in Warzone:
/Users/freddie/Documents/Programming/Warzone2.1/macosx/../src/move.c:252
(retval >=0 && retval <=180), last script event: 'N/A'
Assertion failed: (retval >=0 && retval <=180), function dirDiff, file
/Users/freddie/Documents/Programming/Warzone2.1/macosx/../src/move.c, line
252.
Abort trap
Further investigation suggests that the bumpDir element of many saved
droids has an invalid value (not 0-360), causing the assertion in move.c
to fail. Inserting checks when bumpDir is read from the filesystem to
make sure it falls in a valid range and resetting it to 0 if it doesn't
seems to avoid the assert fail but doesn't explain why the bad values are
being read in the first place.
--
Ticket URL: <http://developer.wz2100.net/ticket/96>
Warzone 2100 Trac <http://wz2100.net/>
The Warzone 2100 Resurrection Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev