Talk:RequestSave - Game

Active discussions

This Papyrus function doesn't appear to be stableEdit

Story time!

So I built a mod, released it, and then found out that when it's enabled, Skyrim will crash when any script calls Game.RequestSave(). Skyrim crashes in the middle of a requested save, but user-initiated saves (through the menus or debug console) work perfectly. I decided to look into the matter. I started by disabling all of my quests, deleting a test cell, and modifying all scripts so that their OnInit functions returned immediately; the idea was to check whether the crash was due to something my ESP did or something it contained. Well, the game still crashed, which meant it must've been something the ESP contained. This was an ESP created with the Creation Kit and TES5Edit, so I decided to test the possibility that TES5Edit damaged something.

(Let me real quick note that my testing procedure consisted of starting a new game, with Alternate Start installed, and then immediately exiting character creation (at which point that mod requests a save). This is exactly as valid a test as playing through the Helgen intro, but far less of a waste of time.)

I started rebuilding the mod entirely from scratch in the Creation Kit, piece by piece, testing it after every few form types. I didn't get crashes until after I recreated the global variables and the MCM quest. Removing the MCM script from the MCM quest didn't solve the crashes. Here's the thing: totally removing the quest and all globals didn't fix it either, even though adding them is what caused the crash in the first place. I double-checked in the Creation Kit and in TES5Edit: that data is straight-up gone and I'm still getting the crashes that started after I added it.

This Papyrus API isn't stable. Maybe the API is broken and it chokes on something it shouldn't, or maybe the Creation Kit and TES5Edit are broken and they don't properly remove some types of data. Either way, RequestSave is not reliable at all. DavidJCobb (talk) 2016-04-11T22:21:46 (EDT)

UPDATE:
  • RequestAutoSave does not crash if triggered via an activator or a trigger volume, after having COC'd from the main menu.
  • If I replace Helgen's RequestSave call with a RequestAutoSave call, we still crash.
  • If I patch the executable to turn RequestSave into an alias for RequestAutoSave, the game still crashes. I literally only have to change one byte to do this, so no, I'm not patching it wrong.
  • If I patch the executable to turn RequestSave into a no-op, the game stops crashing. RequestSave and RequestAutoSave share an underlying queue mechanism and clearly that mechanism is defective.
  • The crash occurs during the process of saving. An incomplete save file is generated. Within this save file, GlobalData entries are saved properly up to and including GlobalData type 0x72. Everything after that is corrupted garbage.
Tests to run:
  • Call RequestSave from an activator or a trigger volume.
Notes:
  • Known crashes involve these Papyrus functions being called from a quest fragment. Wonder if that's relevant.
DavidJCobb (talk) 2016-04-12T18:28:57 (EDT)
Oblivion had this problem as well, with auto saves...--Terra Nova2 (talk) 2016-04-17T11:50:10 (EDT)
Return to "RequestSave - Game" page.