Jump to content

1 Screenshot

About This File

Summary:

 This is a python script that checks for stack dumps in papyrus logs.

 

Background:

If too many papyrus scripts exist in memory (the papyrus engine stack) all at once, the engine will dump some of its stack to garbage to prevent a stack overflow. Those dumped scripts are not retrieved nor revived, some will restart from scratch with all their state reset, but some will never restart on their own. Script dependencies can break, threads can break, state is lost and thus; Mods can break.

 

Once you get a single stack dump your save is broken. Maybe you can save clean the affected mods from your save to reset them with a save cleaner, but you have to clean every affected mod those scripts are attached to, and you lose settings/state/quests and everything saved to that mod anyway. I'm speaking theoretically, as I have never successfully fixed a save this way myself without realizing it wasn't worth it and stopping early.

 

The claim above that stack dumps can corrupt saves has been challenged in the support thread. See their counter argument post here:

 

Stack dumps are silent too, sometimes you get a brief pause as the game locks for maybe a full second as it dumps memory, but there is no other alert or notification to a user that a dump occurred. You just start getting really weird and specific bugs that would never happen otherwise, and are therefor impossible to find/fix for mod authors and yourself.

 

So I built this script to detect when a dump happens after every night of playing Skyrim. I save frequently enough that I can just delete any save I make after a crash dump to keep my save intact, and then I look at the stack dump time and scripts dumped to help me figure out what caused it to avoid it in the future.

 

I made this years ago, but didn't bother uploading it anywhere, and haven't seen another similar script or program anywhere, which is weird considering its a problem I've seen many users have. If something like this but better already exists feel free to tell me or post it in the support thread.

 

Instructions:

Move the script file to your skyrim logs folder, typically:

C:/Users/*your user name*/Documents/My Games/Skyrim/Logs/Script/ <- there should be papyrus logs here

From there, assuming you have python installed, you can just double click the script and it should search all the logs in that folder for stack dumps and print to a small text window. That's it.

 

Explaining the details printed about each stack dump:

The file is listed, the line count so you know how big the file at a glance.

Each file can contain multiple dumps, counted here

The line in the file where the dump starts, making it easier to find/search if you want to look at the actual file later

Time is printed per dump as it was printed in the file, most likely uses the same clock as your operating system. This can help you figure out when the dump occurred if the dump contents aren't enough info.

-----------------------------------------------------------

Then the scripts that were dumped from the stack are listed in decending order of frequency.

- the left number is the count of how many scripts with the following name were found, if its 10 then there were 10 scripts like it in the dump with the same name.

- if a dash is shown instead, that means the script next to the dash is part of a mini stack with the script above it, showing you what scripts called which subscripts.

the hex of the object the script is attached to is printed next, if its 0x0000014, that's the player, the script was attached to the player's actor, otherwise the hex will often tell you which mod a quest (the script is attached to) belongs to. The first two characters are in base 16 the load order for that mod.

then finally the name of the script and the functions being run, on the far right are shown

 

 

Maybe one day I'm modify this so that it reads the main papyrus script in realtime and will notify you while you play the game, but for now it works well enough for me. Once I started using it, and reverted to an early save before the first stack dump, I can just check every night and that's frequent enough to stop it being an issue.

 

Permissions:

Unlicensed open source, its a really basic script do what you want with its code

 

Thanks to:

@bicobus for pointing out some of the awful things I do when I'm in a hurry to bang out a quick script so I could fix them


What's New in Version 4.0.0

Released

  • 4.0:  Realized the regex was giving false positive scripts with multiple frames, modified to display all frames per script
  • 3.0:  Changed the parser from *.psc to [HEX].class.function() search and format changes
  • 2.0:  Suggested format changes made by Bicobus
  • 1.0:  First release in Deviously Enslaved Continued's support thread

Other Files from Verstort


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use