Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

KirbonatedBeverage

Uploaded by

KirbonatedBeverage

Virus scan

Safe to use

Tags for this mod

166 comments

  1. smr1957
    smr1957
    • premium
    • 46 kudos
    Sticky
    A question, KirbonatedBeverage.  If the problem with the original script is as you stated, wouldn't this occur in any and all games in which that script was used?  Simply put, I have been using the original version 2.0.0 made by Tarlazo (the one that he removed and which was subsequently replaced by the re-upload by fairkauri), and in all the time I have used it, have never encountered what you describe (and have just now checked the saves in Fallrim Tools and do not have what is shown in your screenshot on any of the ones I checked).  Yet, if this was an issue inherent in the original script by tarlazo, then I should have this issue - isn't that correct?

    I am wondering (and this is something we often see when troubleshooting games for people in the Steam forums), if, in fact, it is possibly some other mod which is causing the results that you have shown, and not the script by tarlazo?  And, if your testing was done on a completely vanilla game so as to ensure that nothing else could be causing this? Because, if it is the tarlazo script at fault, then, as I stated, these issues should appear in my game, or in anyone else's game who has tarlazo's script.

    Anyway, thanks for your checking into this issue - anything that advances our knowledge of the game and how it works is greatly appreciated!
    1. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      Did you try looking at your save immediately after killing a dragon? In my experience skse eventually cleans up the stacks given a long enough period of time.

      The issues should appear in any game using the script, based on my knowledge. The script shouldn't be able to be read by the game because of the programming error.

      Not only shodiffern issues appear in every savegame, the fix can't even work to begin with the way it's written.

      they assign onUpdateGameTime as a function, which is invalid, as described in the post, but even if it weren't invalid, the script would never fire because they never invoke the function anywhere in the script.

      In short, the possibilities are:
      1) you have some mod overwriting dragonactorscript besides tarlazo's fix
      2) You have some mod that changes dragons to use some other script instead of dragonactorscript
      3) You have been experiencing the issue, but you aren't using enough script mods to notice the symptoms (this also makes it easier for the stacks to get cleared out)
      4) the version of the fix in the reupload is somehow different to version that I compared to (version 2.0.1 obtained from Tarlazo's original nexus page, before it was deleted)

      As much as I would love to be wrong here, I fail to see any way that tarlazo's script could possibly be functional
    2. smr1957
      smr1957
      • premium
      • 46 kudos
      Yes, that was the very first save I checked - I am extremely thorough about these things, and would not have posted if there was any doubt whatsoever.  Also, if you check my profile here, and my history on Steam forums, you will see I am one of the foremost authorities as far as Skyrim is concerned (as to my build, you can see an example of it - though smaller - but it is basically the same, being the build my current one is built upon it - linked on my profile page on Steam). And I do not have any mods which add dragons or modify this script. The questions you asked are exactly the questions we  - the individuals who regularly help in the forums - have been discussing as regards your fix.  In fact, one of the people there who is a programmer has also stated that he does not see what you describe as being the cause of the issue. This is a partial quote:
      "I don't see any harm in the code change, [...] events may trigger functions, and functions may trigger events. But MA's explanation that it causes stack overflow doesn't make sense at all...."
      See: https://steamcommunity.com/app/489830/discussions/0/154643795211522292/?tscn=1631535113#c3038230013036827733

      And I have checked and compared all three scripts - the version I am using, the re-upload, and yours.  As I stated, I am extremely thorough - I could not run the builds, nor give the help on the forums I do, if I were not.

      I have to ask again, though - even at the risk of seemingly being impertinent (which is not my intention at all - I have the utmost respect for people who attempt to make the game better through their work in modding it), did you test this on a purely vanilla game?  
    3. smr1957
      smr1957
      • premium
      • 46 kudos
      Also, I have another question.  You state that this is a replacement for the re-upload of tarlazo's mod.  However, here, in your point 4, you state the following when asking me about my experience:
      "4) the version of the fix in the reupload is somehow different to version that I compared to (version 2.0.1 obtained from Tarlazo's original nexus page, before it was deleted)"

      As I had stated, I was using tarlazo's version that he had removed - and not the reuploaded version - (though it is version 2.0.0, and not the 2.0.1 that you state you had). I compared all three versions tarlazo's, the reupload, and yours.  Yet, if you had checked the reupload, you would know it is essentially the same - yet here you state that there may be a difference - which leaves me to wonder if you had checked the reupload?  Which, with all due respect, makes me wonder about other things - such as how exactly you tested this.

      In my original playthrough many years ago, before I had ever added any mods in (amazing as that may seem compared to now - LOL!), I did experience the dragon stalking bug once.  Now, while a negative does not necessarily prove anything, since I started using the fix when it was first released years ago, in the thousands of hours since, I have never suffered the bug, nor have I ever experienced the lag you are referring to - not in my script heavy 2233 mod build having 1638 plugins, nor in the the script heavy one before it having 1535 mods and 1103 plugins, nor in any of the other extreme builds I have run - all of which are and were totally stable and CTD free.  Nor have any of the others who I have spoken to encountered this, nor have we seen this issue in the forums as pertains to tarlazo's version of the script.

      I do not wish to sound harsh or argumentative, so I certainly apologize if it seems that I may appear so, but we do (all too often), in the Steam  forums, see errors where people wrongly attribute certain things to a certain mod when, in fact, the problem actually lies elsewhere - one such frequent incident being people wrongly attributing bugs as being caused by the Unofficial Patch, when, in fact, it is caused by another mod and due to the fact that they did not test on a vanilla game.  What we do in the forums, those of us who are frequent helpers, is to try and ensure that information is 100% accurate, and to determine if what is being stated as the problem, actually is the problem - and not something else.
    4. Blackspine18859
      Blackspine18859
      • member
      • 27 kudos
      Hey SMR1957. This is all very technical and interesting, and I appreciate the in-depth analysis of the issue. But as a layperson, I would just like to know whether or not this mod actually fixes the potential problem and whether or not it is safe to use in my game.

      Thanks :)
    5. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      You are absolutely right, and now I feel like a complete buffoon.

      I jumped the gun significantly when I made the original claims in the mod description, and for that I deeply apologize.  Further testing has revealed that the stack overflow doesn't appear to occur in an otherwise unmodified game. I will be updating the mod description and stickying this post.

      All that said, tarlazo's script was still broken. Even if it isn't causing a stack overflow, it's still not valid to call OnUpdateGameTime() as a function. The way its written, the part of the code that is meant to prevent dragon stalking will never actually run in tarlazo's code, since the function they defines as "OnUpdateGameTime()" is never called in the script.

      I am still investigating the cause of this stack overflow, because it has been driving me crazy. Changing this code DOES fix the issue in my game, which leads me to believe that it is somehow involved, even if it is not necessarily the root cause.
    6. smr1957
      smr1957
      • premium
      • 46 kudos
      Well, as stated in this post on the Steam SSE forum thread - https://steamcommunity.com/app/489830/discussions/0/154643795211522292/?tscn=1631535113#c3038230013036827733 :
      "I don't see any harm in the code change..."
      So, it may be, Blackspipne, but I am not convinced, nor are others, that there actually is a problem caused by tarlazo's mod and that this is not an issue caused by some other conflict - but I myself have not tested this mod and so cannot personally recommend it - especially since, as far as I can determine, the alternate fix does work.  Others will, no doubt, be able to state if it works in their game - I personally, just cannot comment as to that.
      Let there be no doubt about it - I am not criticizing KirbonatedBeverage's work so much as myself and others are wondering if what is being shown is really caused by a scripting error in tarlazo's original work, as re-uploaded by fairkauri, or if the issue is caused by something else.  So far, the consensus is that this issue is caused by something else.

      I apologize if that is not clear enough, but that is all I can say barring any further information.
    7. smr1957
      smr1957
      • premium
      • 46 kudos
      Thanks for that response, KirbonatedBeverage.  And no, you should not feel like a buffoon - far from it!  These discussions are good to have, and give greater insight into issues with the game.  A lot of work goes into these things, and any and all feedback is useful - and we all learn something when we read the discussions.  And, after all, that should be the main point of discussions like this, to learn and understand things better.  It may be that there are issues with the original script - as I said, my not having a problem does not prove that one does not exist - which is why it is so important for others to post their own experiences and what they have observed.  If your mod fixes an actual issue, then that is fantastic - just want to be sure what the issue is and what the actual cause may be.

      And, thank you for being so patient with reading my posts - I can be long winded at times, so patience is definitely a virtue!

      And, a kudos to you for taking the time to do all this!  Just added one!
    8. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      I can't find any evidence in any of the papyrus documentation that events can be called as functions, despite what that post claims. I'd happily take this mod down completely if I'm proven wrong. But I've never seen any base game scripts call OnUpdateGameTime() as a function, so I'm highly skeptical.

      On why I feel like a buffoon, I feel like I should know better since I made sure to test multiple load orders when I created Hand to Hand Rebalanced, but did not do so here. I'm metaphorically slapping myself for making a mistake that I so often critique others for making.
    9. NocturnalNerd
      NocturnalNerd
      • supporter
      • 9 kudos
      I dont have any knowledge about coding. But in case it helps, I check my saves every half hour (or after a really hard fight that I would not want to do again) because some past trauma with stacks, I started my current game (2300+ saves with more than two months old) and at the beginning I was using Tarlazo version, then, the Re-upload, now this one. And I have never seen any stacks. I do use Ultimate Dragons as a possible mod that can maybe fix or replace this issue. 
      I am saying this because the author mentioned that SKSE cleans the stacks eventually (and I always save after killing a dragon because I have the difficulty of those encounters very high) and if this was the case, I am sure I will have seen the problem at some point. Also, because smr asked for personal experiences regarding this ¿issue?.

      Thanks to you two for engaging in productive discussions. Kudos. 
    10. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      It's likely that you aren't experiencing the issue. The script error only seems to be fatal in conjunction with specific mods, because, while I was easily able to replicate the bug in my personal load order, I could not do so in an otherwise vanilla game. Unfortunately, since my load order is 577 mods strong, this makes it difficult to narrow down a root cause.

      While I have some suspicions about the cause, I don't feel comfortable sharing them because my previous suspicions turned out to be incorrect, at least partially, if not wholesale. Once I can concretely prove a cause, and replicate the stack overflow in multiple load orders, I'll update the mod page with the information.
    11. KainThePheonix
      KainThePheonix
      • premium
      • 52 kudos
      It would be good to see a list of mods that might possibly trigger this smr1957 and KirbonatedBeverage. It won't be a slam against those mod authors but it would be nice to see some possible culprits in case it is a combination of mods causing the original issue.
    12. MrNeverLost
      MrNeverLost
      • premium
      • 316 kudos
      Events and functions literally compile to the same thing. For example, these are identical in a compiled .pex file:

      event OnInit()
      endEvent

      function OnInit()
      endFunction

      It's just a way of making the purpose of a function more clear to the reader. This fact makes this fixed fixed version redundant. However, I can agree with your sentiment that there's a lack of documentation surrounding this.
    13. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      Thank you for letting me know! I'd never seen that in any of the documentation, So I'll keep that in mind going forward. I'm still going to leave this mod up, because it isn't causing harm to anyone's game.
      When I originally read through the documentation, my interpretation was that while Events and Functions are similar in construction, the compiler treated them differently. Upon re-reading said, I can now see how they are treated the same by the compiler.
    14. tattwood
      tattwood
      • member
      • 107 kudos
      I suppose there is one definite way to check whether the "function" and "event" result in the same code, and that is to compile 2 versions of the script, one containing "event" and the other containing "function", and then perform a binary file compare on the 2 pex files. For example, the "WinMerge" program has a binary compare feature (in general, its also a very useful program to compare the contents of directory heirarchies and their files, and spot differences).
      https://winmerge.org/
      If both pex files result in the same code, then you know the papyrus compiler will treat "function" and "event" in the same way. This method could also be used for other things, to understand whether changes to a script's syntax results in the same or different code.
  2. LJB
    LJB
    • member
    • 0 kudos
    These fixes (and more) are included in Dragonactorscript infinite loop fix.
    1. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      Any mod that specifically targets dragonactorscript is not going to fix the loop, as I have learned since making this project. The problem that causes this glitch appears to effect all scripts that are attached to actors, not just dragonactorscript. I have seen the exact same loop happen with Wispmothers, for example.

      The problem appears to me to be an engine problem related to how actor scripts are loaded. It seems that the code that loads actor scripts checks for a script instance for the target actor on every frame, and if it doesn't find one, it attempts to load the script. The problem with this is that it doesn't check suspended script stacks, so if the game can't load the script immediately due to high script load, the game will generate a new actor script instance on every frame until one successfully load, typically resulting in hundreds of generated script instances. Most of the time, actors with scripts attached to them are in interior cells, where your active script count is dramatically lower, so you don't notice the issue, but dragons and wispmothers can be found in exteriors, and dragons can be found in very busy areas, so most people only notice the issue with dragons. The wispmother loop is worse though, since it consistently causes the game to crash after a few seconds.
    2. LJB
      LJB
      • member
      • 0 kudos
      Fair enough, Wispmothers are also evil. I only meant to say that Blackread claims these script edits are all included in the aforementioned mod (which has other features as well).
  3. Mur4s4me
    Mur4s4me
    • premium
    • 707 kudos
    Is the mod folder correct? I thought there shouldn't be another folder after Source, but you've put a "Fixed Fixed Dragon Stalking Fix" folder in there with the source script. I'm not familiar with how the scripts folder is handled, so any insight will be useful to me for my own use!

    Thanks for this mod
    1. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      The source folder isn't actually read by the game, the game only reads the precompiled .pex files. I created a folder inside source so that I could preserve the original source scripts in my install (just to have as a reference). I included my PSC files with the mod just in case people wanted to look over my code (which turned out to be a good idea since some more experienced modders were able to point out why my edit was technically unnecessary)
    2. Mur4s4me
      Mur4s4me
      • premium
      • 707 kudos
      Oooh I see! Thanks for the informative reply
  4. mattski123
    mattski123
    • supporter
    • 88 kudos
    Hey, I'm still getting dragon stalking bug. Should we still use the Dragon Stalking Fix or Fixed Dragon Stalking Fix (Re-Upload)?
    1. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      Fixed Dragon Stalking Fix and my mod are functionally identical, so if this mod doesn't fix it, that one won't either

      Disclaimer: Everything below is all conjecture, and entirely driven from my personal experience. I don't know how the engine handles scripts and am basing this purely on observation. Everything I say here could end up being false.

      Honestly there doesn't seem to be a good actual fix for the Dragon Stalking bug, as I'm beginning to suspect that the true cause has little to do with the dragon scripts themselves and more to do with how the game handles excessive active script counts. The actual "Dragon Stalking" seems to be related to the behavior that allows dragons to follow you in and out of cities (since those cities are technically completely separate worldspaces from the actual skyrim exterior. I think that in games where there are a lot of active scripts, the dragon script can get incorrectly suspended, leaving the dragon in a broken state. It should also be noted that in every save game where the dragon stalking glitch occurs, there are hundreds, if not thousands, of suspended dragon script stacks.

      The problem seems to be that the game continually queues up the associated script for a loaded actor until it loads successfully, gradually overflowing the stack buffer. I have noticed similar stack overflow issues with other types of actorscripts, such as the scripts for Wispmothers. This means that the only real solution is to not use mods that make heavy use of the papyrus quest scripts. But even that probably won't work as the vanilla civil war quests are script heavy enough to potentially fill the active script count. To truly fix this issue we would probably need an SKSE mod that alters how the game loads papyrus scripts, likely by arbitrarily increasing the active script thread limit.
    2. mattski123
      mattski123
      • supporter
      • 88 kudos
      How about the original Dragon Stalking Fix? Would that be good to try out?

      Good read! I reckon get in touch with Fudgyduff, Meh321, powerofthreeMaskedRPGFan, maxsu2017 and/or Doodlezoid. These are the guys who I've found are usually really good at this Jazz. KernelEgg? is also good as well. He did Scrambled Bugs. Chat to these guys about this problem, they're kings as SKSE.
  5. BingChillin97
    BingChillin97
    • member
    • 1 kudos
    Reading the above conversation has led me to understand that the "dragon stalking" bug is not an inherent issue with the base game, but rather caused by a specific combination of mod-generated changes to the game...

    I would really appreciate a list of potential culprits if you ever end up finding them, and thank you for your work.
    1. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      I'm beginning to suspect it is an issue with the base game, but actually has nothing to with the dragonactorscript.

      To clarify, the dragon stalking is related to a function in the dragonactorscript, specifically the function that allows dragons to follow you in and out of cities. The thing is, I don't think the script getting stuck and overflowing the stack buffer has anything to do with the scripts themselves.

      The one constant with the dragon stalking bug is that the more heavily modded your game is, the more prevalent the mod seems to become. Specifically, the more mods you have that load Papyrus quest scripts into the game, the more likely you are to get the bug.

      Another fact I've noticed is that these buffer overflows are not limited to dragonscripts, rather they occur with any script that is loaded alongside an actor (such as Wispmothers). This implies that the cause is related to how the game loads actor scripts. I every frame an actor is active, the game checks to see if it's script is loaded. If the script is not loaded, it attempts to load the script. The problem is that it only seems to check the active script threads, not the script buffer. This means that if there are too many active papyrus scripts loaded, the game will continue queue up script instances on every frame until one of them loads.

      TLDR; I think it's an engine issue related to incorrect handling of the script stack buffer.
  6. Senturos
    Senturos
    • premium
    • 118 kudos
    God i beg this works. Every second dragon just fucks up my save.
    No it did not. Killed some Dragon 2296 DragonActorscrips stacked up
  7. NewThalos
    NewThalos
    • premium
    • 29 kudos
    Any benefit to using this in VR? 
    Can it even work in Skyrim VR?  :)
  8. linyuheng2000
    linyuheng2000
    • premium
    • 4 kudos
    How many instance related to the dragonactorscript is consider "overflow"? I currently have 41 instance related to it and after killing a dragon my newest save still have 41. Is this normal? I don't have any other mod related to dragon other then this one and the one which reduce the dragon random encounter chance. 
    Also, I just killed Sahloknir with delphine, after I had the conversation with her and walked away just a few steps, I turned back and the corpse of the dragon is gone. Is this normal? I set my timescale to 10 and it take me almost 3 minute to finish conversation with her(I didn't skep the dialog). If the dragon corpse disappear so fast, if I stay there more then 3 minute, would the corpse just disappear right in front of me?
    1. KirbonatedBeverage
      KirbonatedBeverage
      • premium
      • 65 kudos
      41 is probably fine. It's overflow when it overflows into the stack buffer. If you're stack buffer is empty than your fine
  9. Frazzlesnap
    Frazzlesnap
    • premium
    • 9 kudos
    This worked for me. I'd been using the Fixed Dragon Stalking Fix, and I had accumulated over 400000 instances of DragonActorScript in between using ReSaver to cull the suspended stacks. I was getting pretty tired of having to do it. I am a very happy orange cat!
    1. NordKitten
      NordKitten
      • premium
      • 37 kudos
      same thing happened to me, I have been on a week long quest whenever I had the time to save my old game and I tried everything being convinced it was due to a mod update / me removing unwanted mods because do as I say not as I do, you know, being a hypocrite and all that jazz. but no, I just needed to replace the mod I was using to stop dragons from stalking me.
      although a good point is that the mod author does say this is not a fix for the stack overflow so keep an eye out for its possible return
  10. adelinadragonborn
    adelinadragonborn
    • member
    • 22 kudos
    Does not work for me, during my adventures in Solstheim got this bug several times in a row...
  11. deleted121187878
    deleted121187878
    • account closed
    • 1 kudos
    It worked in a few of my saves! And in other few it worked Tarlazo's.
    So, well, thank you for your effort and for sharing your deep programming knowledge :)