Jump to content

How to fix loop in code.


Miriandandes

Recommended Posts

I've got a script that's constantly looping in the background of my main character's save files.

I've done my research, and have found that it's simply bad coding, which leads to a horrible loop for eternity.

I've also made my own fix to get rid of the quest that's causing it, but the loop will not go away in my main character's save files.

The easiest solution would me to make a new character, but I'm not going to do that, I want to fix the looping.

 

An example of the loop:

 

[02/10/2013 - 04:27:19PM] Error: Cannot call IsDisabled() on a None object, aborting function call
stack:
[alias Sigdis on quest dunGeirmundQST (000E738F)].dunGeirmundsBossBattle.OnDeath() - "<savegame>" Line ?
[02/10/2013 - 04:27:19PM] WARNING: Assigning None to a non-object variable named "::temp25"
stack:
[alias Sigdis on quest dunGeirmundQST (000E738F)].dunGeirmundsBossBattle.OnDeath() - "<savegame>" Line ?
[02/10/2013 - 04:27:20PM] Error: Cannot call IsDisabled() on a None object, aborting function call
stack:
[alias Sigdis on quest dunGeirmundQST (000E738F)].dunGeirmundsBossBattle.OnDeath() - "<savegame>" Line ?
[02/10/2013 - 04:27:20PM] WARNING: Assigning None to a non-object variable named "::temp25"
stack:
[alias Sigdis on quest dunGeirmundQST (000E738F)].dunGeirmundsBossBattle.OnDeath() - "<savegame>" Line ?

 

As you can tell, this thing loops every second, which hinders performance, and appears to be the only thing crashing me now, after many hours of fixing and troubleshooting my plethora of mods.

 

I've also found 2 possible fixes via scripts, but neither of them explain how to actually use them:

 

;Stop the dungeon quest. While (!Duplicate1Actor.IsDisabled() || !Duplicate2Actor.IsDisabled()) Utility.Wait(1) EndWhile dunGeirmundsQST.SetStage(10)

 

And:

 

Scriptname _CHESKO_GeirmundFixQuest extends Quest {Fixes bad while loop in event GeirmundsBossBattle.pex goes off the rails.}import debugdunGeirmundsBossBattle property myScript autoActor property myFixActor autoEvent OnInit();Populate the propertiesmyScript.Duplicate1Actor = myFixActormyScript.Duplicate2Actor = myFixActor;Notify the userif myScript.Duplicate1Actor && myScript.Duplicate2Actormessagebox("Mythgaard - The problem should be fixed. Save your game, exit, and reload. Then exit and observe your logs. The errors should be gone.")elsemessagebox("Mythgaard - There was a problem. I couldn't repopulate the actors with my dummy for some reason.")endifendEvent

 

 

Anyone able to help?

 

Edit:

While trying to fix this, I gave myself another spammy instance in the log:

 

  Quote
Tried all of that' date=' and I'm still getting it.

 

As a bonus, I'm now getting this spammed in the log:

 

[02/11/2013 - 12:56:58AM] WARNING: Assigning None to a non-object variable named "::temp8"
stack:
[None].BYOHHouseTrophyBaseScript.OnUpdate() - "BYOHHouseTrophyBaseScript.psc" Line 19
[02/11/2013 - 12:56:58AM] [bYOHHouseTrophyBaseScript <None>] OnUpdate0.000000
[02/11/2013 - 12:56:58AM] Error: Unable to call getDistance - no native object bound to the script object, or object is of incorrect type
stack:
[None].BYOHHouseTrophyBaseScript.getDistance() - "<native>" Line ?
[None].BYOHHouseTrophyBaseScript.OnUpdate() - "BYOHHouseTrophyBaseScript.psc" Line 27

 

 

Note: The frequency of the previous one has gone down noticeably, but this one is pretty much filling the gaps.

I don't have, and never have had, that mod.

Did some quick research, and apparently that's attributed to "build your own house".[/quote']

Link to comment
Share on other sites

  On 2/11/2013 at 12:37 AM, Lunytic said:

Uninstall the offending mod, open the save, resave, reinstall the mod?

It's not a mod, that's a base script in the game. I've read that the unofficial skyrim patch might be a culprit, and I've tried that, as well as disabling everything.

The loop remains, and is hardwired into the save files, which is why I need to fix it.

Link to comment
Share on other sites

[02/10/2013 - 04:27:19PM] WARNING: Assigning None to a non-object variable named "::temp25"
stack:
[alias Sigdis on quest dunGeirmundQST (000E738F)].dunGeirmundsBossBattle.OnDeath() - "<savegame>" Line ?
[02/10/2013 - 04:27:20PM] Error: Cannot call IsDisabled() on a None object, aborting function call
stack:
[alias Sigdis on quest dunGeirmundQST (000E738F)].dunGeirmundsBossBattle.OnDeath() - "<savegame>" Line ?

The above is the proper way to view the error. The first line indicates the time & date followed by the type of error. Then the stack list follows which is to be read from the bottom up.

 

You have a dual warning/error both are related. First whatever was once assigned to the alias named Sigdis on the dunGeirmundQST script is no longer assigned. This causes the warning. Then because the alias was filled with None the IsDisabled() function call fails.

 

That in and of itself is harmless, the issue tho is that the while loop was never exited and thus the above warning/error combo constantly repeats.

 

The USKP has some additional checks in place for this event which should prevent the while loop from not finishing. However, it may not be capable of correcting the loop after it has already started and the quest long since finished. If you have not, you could try the USKP and see if it does help. Tho if I read correctly you have already tried the USKP and it failed to solve the existing loop issue.

 

hmm....

 

You might be able to with the USKP active use the console to reset said quest and do it over thus hopefully clearing the lingering "missing data" from your save. If you do try that, you might want to backup your save file(s) in case something worse goes wrong.

Link to comment
Share on other sites

Tried all of that, and I'm still getting it.

 

As a bonus, I'm now getting this spammed in the log:

 

[02/11/2013 - 12:56:58AM] WARNING: Assigning None to a non-object variable named "::temp8"
stack:
[None].BYOHHouseTrophyBaseScript.OnUpdate() - "BYOHHouseTrophyBaseScript.psc" Line 19
[02/11/2013 - 12:56:58AM] [bYOHHouseTrophyBaseScript <None>] OnUpdate0.000000
[02/11/2013 - 12:56:58AM] Error: Unable to call getDistance - no native object bound to the script object, or object is of incorrect type
stack:
[None].BYOHHouseTrophyBaseScript.getDistance() - "<native>" Line ?
[None].BYOHHouseTrophyBaseScript.OnUpdate() - "BYOHHouseTrophyBaseScript.psc" Line 27

 

 

Note: The frequency of the previous one has gone down noticeably, but this one is pretty much filling the gaps.

I don't have, and never have had, that mod.

Did some quick research, and apparently that's attributed to "build your own house".

Link to comment
Share on other sites

Bump for fix.

 

Apparently this new bug screws up Hearthfire stuff. I cannot build a new house, even though I disabled, saved, and then re-enabled hearthfire.

Each one, for some damn reason, builds in the Falkreath spot. This is the one I initially used, and wanted to get a new one to ditch that pointless trophy room.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...