Chaosforge Forum

  • April 27, 2024, 05:08
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: [0.9.9.6G Win] Access Violation on picking up Light Amp / Continue  (Read 2878 times)

Oogieboogie

  • Private
  • *
  • Offline Offline
  • Posts: 3
  • Lost Soul
    • View Profile

Encountered an access violation as I picked up a Light-Amp Goggles item.  Upon reopening and continuing the game a couple days later, it appeared to be working correctly.  However as soon as I would open a door the game crashed with a similar error in vvision.pas.  This occurred twice and now when I try to continue the game crashes before the map comes up.

This made the game unplayable and I had to manually remove the "save" file from game directory in order to start a new game.  I backed it up in case it is needed.

Here is error.log for the 5 runs:
Spoiler (click to show/hide)

Here is the current log.txt:
Spoiler (click to show/hide)
Logged

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile

If you have the save file available, could you post it please?  I think I know the immediate cause of the crash, but the save file could help determine how the game got into such a state.
Logged

Oogieboogie

  • Private
  • *
  • Offline Offline
  • Posts: 3
  • Lost Soul
    • View Profile

I've attached the save file.
Logged

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile

Somehow, the VisionBaseValue in your game got set to 15.  (This is normally supposed to be 8.)  When you picked up the goggles, your vision range got too high for the game to handle, causing the crash.

I've added a safeguard to make sure that a high vision range will not crash to game (though it still isn't supported -- sorry modders).

VisionBaseValue isn't supposed to ever change.  However, it is stored in the save game.  It appears to be possible that trying to load an invalid or corrupt save game file could set VisionBaseValue to a garbage value that would not get reset unless you quit the game or loaded a valid save.  To avoid the possibility of such a thing occurring in the future, I've removed this value from the save game.  (If it needs to be added back, we can be more careful about ensuring it is set properly when starting a new game.)

Thanks for the assistance!
Logged

yaflhdztioxo

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 298
  • Lost Sole
    • View Profile

For the record I have run into this too, exactly once.  I ignored it at the time since I was running my own mods on an SVN build and I figured one or the other was somehow responsible.  I did not notice an abnormal vision radius.

There could be a subtle overflow somewhere corrupting values, but tracking it down will be tricky with so little to go on.
Logged

Oogieboogie

  • Private
  • *
  • Offline Offline
  • Posts: 3
  • Lost Soul
    • View Profile

Thanks for the followup, glad I could help.

This makes some sense.  I had installed the new 0.996 over an old version prior to playing this game.  There was a saved game at the time, so when I hit continue it deleted the outdated save with the "corrupted game" message. 

I can't remember for certain if this was my first game after this occurred but that could definitely be the cause.
Logged
Pages: [1]