mnalis / ironseed_fpc

Iron Seed is a science-fiction DOS game from 1994, which was both developed and published by Channel 7. Gameplay is real-time, featuring trading, diplomacy, and strategy. This version has been changed to make it possible to compile it with the freepascal compiler under Linux.
GNU General Public License v3.0
17 stars 0 forks source link

crash when fighting drones (without activating shield I do not have) #54

Closed mnalis closed 4 years ago

mnalis commented 4 years ago

maybe related to: https://github.com/mnalis/ironseed_fpc/issues/39

new game, install dirk, timewarp, launch drones, close up on them to 100kkm so they can start firing on me... fight and let them attack me for some time... it seems to go OK without any debug messages added in ca06d16169c30f9c82ba0b8c2c7b1957b4c1adfe, but then it crashes with:

make: Nothing to be done for 'debug_sdl1'.
An unhandled exception occurred at $00000000004A4A8E:
EAccessViolation: Access violation
$00000000004A4A8E line 536 of combat.pas
$000000000044BBAE line 1419 of journey.pas
$000000000044BCAB line 1435 of journey.pas
$000000000042C196 line 385 of starter.pas
217
mnalis commented 4 years ago

combat.pas:536 seems to be screen[i,x+132]:=screen[i,x+132] xor 6; in displaymap() I might have been much zoomed in at the moment IIRC?

mnalis commented 4 years ago

Very hard to reproduce, but it was possible that y could be as low as -4, which would cause out-of-bounds and crash...