Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Savegame bug / pathfinder issue? (Likely related to Ticket #127) #177

Closed
wzdev-ci opened this issue Dec 3, 2008 · 11 comments
Closed

Savegame bug / pathfinder issue? (Likely related to Ticket #127) #177

wzdev-ci opened this issue Dec 3, 2008 · 11 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Dec 3, 2008

resolution_fixed type_bug | by mathew.eis@...


Hello,

Attached is a savegame from version 2.1 RC1 that can repeatably crash both RC1 and RC2 - the non debug versions. I'm running Mac OS X 10.4.11 on a Powerbook G4 1.25 Ghz

The easiest way to repeat it is to go to the lower left region of the map as soon as the game loads, select the large group of units there, and send them for recycling.

I believe the bug is related to the path finder (? - sorry, I'm not very familiar with the source code yet), because it can also be repeated by requesting that the units move to any area very far from where they are currently stationed, however, if you request that they only move small distances at a time, it does not crash.

In the Console, I get the following:
error : [dirDiff] Assert in Warzone: /Users/freddie/Documents/Programming/2.1_rc2/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/2.1_rc2/macosx/../src/move.c, line 252.

I hope that helps...


Issue migrated from trac:177 at 2022-04-15 17:49:49 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 3, 2008

mathew.eis@... uploaded file Crash.zip (80.3 KiB)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 3, 2008

mathew.eis@... commented


A little more looking thinks it's also related to #96

The difference with this one is you can run the game fine until you request the units specified to move long distances.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 3, 2008

mathew.eis@... commented


Er, my bad, it's the units that are in the LOWER RIGHT part of the map, not lower left.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 4, 2008

Giel changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

mathew.eis@... commented


More speculation on my part here...

As similar to #127, it appears to be an endian issue, however this time I've found an offending variable in sMove->bumpDir

It looks like it is loaded properly (along with most of the rest of the droid's data) into psSaveDroid->sMove as it is read from the file, but the endian-ness is swapped at some point during or after it is copied into psDroid->sMove. I'm still trying to figure out exactly where this takes place... For example, the correct value (279 or 0x0117) is loaded into psSaveDroid, but then later in psDroid, it becomes 5889 or 0x1701.

Everything runs fine because the direction is right, until the bug is then "activated" at some point later by requesting the droid to move a long distance, and it checks something against bumpDir, which is outside of the range.

... still learning the source code, so sorry if any of this is wrong.

@wzdev-ci
Copy link
Contributor Author

Giel changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Giel changed resolution from `` to duplicate

@wzdev-ci
Copy link
Contributor Author

Giel commented


Closing, as this is a duplicate of #96.

@wzdev-ci
Copy link
Contributor Author

Giel changed resolution from duplicate to fixed

@wzdev-ci
Copy link
Contributor Author

Giel commented


(In [6512]) * Do not perform endian swapping twice when loading, as it'll undo the first swap

  • Make saving and loading of move controls symmetric

This should fix #96, #127 and #177

@wzdev-ci
Copy link
Contributor Author

Giel commented


(In [6513]) Merged revision [6512] into the 2.1 branch via svnmerge from trunk

........
[6512] | muggenhor | 2008-12-28 15:31:54 +0100 (zo, 28 dec 2008) | 5 lines

  • Do not perform endian swapping twice when loading, as it'll undo the first swap
  • Make saving and loading of move controls symmetric

This should fix #96, #127 and #177
........

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant