Difference between revisions of "User:DavidJCobb/Stack dumping"
Corrections.
imported>DavidJCobb m (→Overview) |
imported>DavidJCobb (Corrections.) |
||
Line 1: | Line 1: | ||
'''Stack dumping''' is a Papyrus | '''Stack dumping''' is a Papyrus warning that indicates that the script engine has been given too many tasks to run at once. | ||
{{InDepth|Previously, it was thought that stack dumping indicated the ''termination'' of stacks, i.e. the game engine randomly throwing out paused script tasks. However, Bethesda's own description of the phenomenon in the Fallout 4 CK wiki suggests that this is merely a warning system.}} | |||
== Overview == | == Overview == | ||
Line 9: | Line 11: | ||
* Some events' handlers cannot run concurrently with themselves. If the event occurs several times in a short period, only one call to its event handler will run immediately; the other calls will exist as suspended stacks. | * Some events' handlers cannot run concurrently with themselves. If the event occurs several times in a short period, only one call to its event handler will run immediately; the other calls will exist as suspended stacks. | ||
If too many suspended stacks accumulate, | If too many suspended stacks accumulate, information about those stacks will be printed to the Papyrus logs, prefixed by this message: | ||
<pre>Suspended stack count is over our warning threshold, dumping stacks:</pre> | <pre>Suspended stack count is over our warning threshold, dumping stacks:</pre> | ||
Save corruption has been observed following messages of this kind, but the exact nature of those problems isn't known. According to Bethesda's description of this phenomenon in the Fallout 4 CK wiki, stack dumping is just a warning system, and no action is taken at that stage. Whether this error is harmless or not, it very often ''does'' indicate a problem with a mod trying to do too much processing at once. | |||
== Specific methods to minimize stack dumping == | == Specific methods to minimize stack dumping == | ||
Line 38: | Line 40: | ||
== Miscellaneous facts == | == Miscellaneous facts == | ||
* RegisterForSingleUpdate(''n'') does ''not'' create a stack and suspend it for ''n'' seconds. I have confirmed this experimentally. | * RegisterForSingleUpdate(''n'') does ''not'' create a stack and suspend it for ''n'' seconds. The stack is only created when it's time to run. I have confirmed this experimentally. | ||
== Code snippets == | == Code snippets == |