Chaosforge Forum

DoomRL => Bug Reports => Topic started by: Zarin on March 28, 2007, 08:27

Title: Game saved after death, restarts with zero/negative life
Post by: Zarin on March 28, 2007, 08:27
Hello,
my installation went into a crazy mode where each death is followed by a crash, the game is saved, and then restarted with a negative life.  For some reason, when I check properties of DoomRL installation directory I see a gray check in "read only" box, but even when I uncheck it and apply change (to all files and subfolders, mind you) the same crash happens again next time.
<Edit>  This is the latest release - 0.9.8.5, Windows, with sound. </Edit>

This bug prevented me from reaching Lieutenant rank - I did reach level 10 in Angel of Impatience challenge (who ever said it was MEDIUM?  AoB is easier than that, at least for me!) but the death did not register properly.

Here is the information printed out during my latest crash:

$0041D93A  TPLAYER__WRITEMEMORIAL,  line 1551 of dfplayer.pas
$0044A926  TBEING__KILL,  line 891 of dfbeing.pas
$0044C38C  TBEING__APPLYDAMAGE,  line 1113 of dfbeing.pas
$0044EBBA  TAFFECTS__RUN,  line 155 of dfaffect.pas
$0044E8E3  TAFFECTS__TIME,  line 125 of dfaffect.pas
$004494F1  TBEING__ACTION,  line 737 of dfbeing.pas
$004495C8  TBEING__CALL,  line 744 of dfbeing.pas
$0043E029  TLEVEL__TICK,  line 544 of dflevel.pas
$00403C82  TDOOM__RUN,  line 266 of doombase.pas
$00401097  main,  line 21 of doomrl.pas

Hope that helps,
Zarin.
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Kornel Kisielewicz on March 28, 2007, 11:40
Delete your savefile, remove readonly and try again.
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Zarin on March 28, 2007, 12:10
Didn't help - I deleted save, removed readonly flag (tried it several times, even with chmod 777 * */* . from cygwin) to no avail.  So it is not readonly - or at least not just that.

Besides, by using ls -l I found that all files have -rwx------ permissions, giving access to owner only - and I'm their owner.  In fact, the only two files which changed permissions after I ran chmod were player.dat and score.dat - I guess those two are modified each time I play :).

If you find a quick workaround please post it - I really want to become Lieutenant.

By the way, will there be any problem if I save my player.dat, remove and reinstall the game and then copy it over the new (empty) one?

Regards,
    Zarin.
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Zarin on March 28, 2007, 12:43
An additional information which I somehow skipped the first time.

Before all those line numbers and file names, there was the following:
An unhandled exception occurred at $0041D93A : ERamgeError : Range check error

I hope you kept symbol maps for the latest release :)

Hope that helps,
    Zarin.
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Kornel Kisielewicz on March 28, 2007, 12:58
Please send me your player.dat. I have an itch that the problem is there ;]
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Styro on March 28, 2007, 18:28
This is the same problem that happens to me. I can play another game by deleting the save, but it crashes at the end of the next game I play.
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Kornel Kisielewicz on March 29, 2007, 03:32
Styro, can you send me your player dat too?
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Kornel Kisielewicz on April 03, 2007, 09:47
Duh! Fixed! The problem was that the Killed characters went over 255, and they were handled by a function that accepted only bytes [0..255] range. You guys can either delete score.dat, or wait for the next beta/release. :D
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Zarin on April 03, 2007, 10:01
Great!  Only this morning I thought "I played so many characters that died young (only the first 6 were "too young to die", though :) and that quantity might have gone too far".  The number 256(=28) hasn't occurred to me yet, but I was close to realizing it :)
Title: Re: Game saved after death, restarts with zero/negative life
Post by: Malek Deneith on April 03, 2007, 10:34
Hmmm... that means I've still got 79 character left to play before next beta... must choose wisely not to waste those xD
Title: Re: Game saved after death, restarts with zero/negative life
Post by: DaEezT on April 03, 2007, 12:25
Hmmm... that means I've still got 79 character left to play before next beta... must choose wisely not to waste those xD
haha, I was just thinking along the same lines :p
My last mortem says:

Before him 207 brave souls have ventured into Phobos