Jump to content

Recommended Posts

[04/10/2014 - 07:19:03PM] error: Cannot check if the reference has a named node because it has no 3D
stack:
    [ (FF002DA4)].ObjectReference.HasNode() - "<native>" Line ?
    [ (FF002DA9)].critterMoth.WarpToNewPlant() - "CritterMoth.psc" Line ?
    [ (FF002DA9)].critterMoth.OnStart() - "CritterMoth.psc" Line ?
    [ (FF002DA9)].critterMoth.OnUpdate() - "Critter.psc" Line ?

This one is particularly galling! The butterfly/moth has just been created, so you are nearby, no more than 1 cell away.

state KickOffOnStart Event OnUpdate() -- has CheckCellAttached(self) which is all it can do before Enable() in OnStart()

WarpToNewPlant() calls PickNextPlant()

Function WarpToNewPlant()
	; Find a plant reference, trying to pick a different one than the current one
	ObjectReference newPlant = PickNextPlant()
	
	if (newPlant != none)
		; Update the current plant to the new one
		currentPlant = newPlant
		
		; Pick random landing node
		; And start moving towards it
		string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3)
		if (newPlant.HasNode(landingMarkerName))

PickNextPlant() calls

		 && CheckCellAttached(newPlant) && CheckFor3D(newPlant))
			return newPlant; [USKP 2.0.1b]

So the 3D for the plant is lost sometime on the few lines between CheckFor3D(newPlant) and newPlant.HasNode(landingMarkerName) -- including 2 subroutine returns, which are known to be slow.

Your movement must be just fast enough to cause a previously nearby cell to detach and unload during those lines. After all, the plant doesn't have to be in the same cell as the spawner. The spawner could be at the far edge of the cell, with the plant in the next.

 

Or you could have gone inside a building or city, causing everything outside to detach and unload....

Share this post


Link to post
Share on other sites

All 3 are due to unexpected loss of 3D. All 3 have 3D checks -- the top one passes multiple 3D checks.

 

We're just going to have to live with the fact the game engine unloads 3D at unexplained times without warning.

I would be tempted to just leave it alone. It probably isn't ever going to be possible to eliminate every last one of these scenarios. The area shown (here) is usually pretty heavily populated with "moths" that have spawned at any given time, which is why I've sometimes used it for testing purposes. In comparison to the amount of spam being generated when the USKP was still at version 2.0.0, what I reported in post #199, is next to nothing.

 

In my opinion, the same goes with the "critterfish" error; that hatchery pond (near Windstad Manor) is highly populated. I wouldn't be surprised if the game engine is simply getting overwhelmed and then papyrus decides to spit out an error that makes very little logical sense just for the heck of it.

Share this post


Link to post
Share on other sites

I wouldn't be surprised if the game engine is simply getting overwhelmed and papyrus decides to spit out an error that makes very little logical sense just for the heck of it.

I agree. I'm reminded of the fact that during Touring Carriage rides, the follower sitting next to you can unload 3D. Once, my horse unloaded -- and the horse's pathing script kept working, pulling the carriage merrily on its way to the end.

 

Worse, the driver sitting in front of you can receive OnCellDetach() events. That also should be impossible. The game engine just goes crazy sometimes.

Share this post


Link to post
Share on other sites

 This is from a DPS - had a few odd critter-related stacks, but they all go away by the next save/DPS. This one, however, is much bigger than the norm.

I'll reply back later when I know if it's disappeared or not. More FYI than anything else ;)

[04/12/2014 - 06:24:39PM] Dumping stack 4936091:
[04/12/2014 - 06:24:39PM]     Frame count: 6 (Page count: 6)
[04/12/2014 - 06:24:39PM]     State: Waiting on latent function (Freeze state: Freezing)
[04/12/2014 - 06:24:39PM]     Type: Normal
[04/12/2014 - 06:24:39PM]     Return register: False
[04/12/2014 - 06:24:39PM]     Has stack callback: No
[04/12/2014 - 06:24:39PM]     Stack trace:
[04/12/2014 - 06:24:39PM]         <unknown self>.utility.Wait() - "<native>" Line ?
[04/12/2014 - 06:24:39PM]             IP: 0
[04/12/2014 - 06:24:39PM]             [param1]: 0.016670
[04/12/2014 - 06:24:39PM]         [ (FF0010F7)].critterMoth.CheckFor3D() - "Critter.psc" Line 1099
[04/12/2014 - 06:24:39PM]             IP: 320    Instruction: 12    Line: 1099
[04/12/2014 - 06:24:39PM]             [AnyItemRef]: [ObjectReference < (FF0011B8)>]
[04/12/2014 - 06:24:39PM]             [::temp75]: True
[04/12/2014 - 06:24:39PM]             [delay]: 0.016670
[04/12/2014 - 06:24:39PM]             [counter]: 8
[04/12/2014 - 06:24:39PM]             [::temp76]: True
[04/12/2014 - 06:24:39PM]             [::temp77]: 8
[04/12/2014 - 06:24:39PM]             [::nonevar]: None
[04/12/2014 - 06:24:39PM]             [::temp78]: 0.000000
[04/12/2014 - 06:24:39PM]         [ (FF0010F7)].critterMoth.BellShapeTranslateToRefAtSpeed() - "Critter.psc" Line 775
[04/12/2014 - 06:24:39PM]             IP: 754    Instruction: 18    Line: 775
[04/12/2014 - 06:24:39PM]             [arTarget]: [ObjectReference < (000CADCC)>]
[04/12/2014 - 06:24:39PM]             [afBellHeight]: 150.000000
[04/12/2014 - 06:24:39PM]             [afSpeed]: 88.567184
[04/12/2014 - 06:24:39PM]             [afMaxRotationSpeed]: 90.000000
[04/12/2014 - 06:24:39PM]             [::temp52]: 4
[04/12/2014 - 06:24:39PM]             [::nonevar]: None
[04/12/2014 - 06:24:39PM]             [::temp53]: -11786.107422
[04/12/2014 - 06:24:39PM]             [::temp54]: False
[04/12/2014 - 06:24:39PM]             [fFirstWaypointX]: 0.000000
[04/12/2014 - 06:24:39PM]             [fFirstWaypointY]: 0.000000
[04/12/2014 - 06:24:39PM]             [fFirstWaypointZ]: 0.000000
[04/12/2014 - 06:24:39PM]             [::temp55]: 0.000000
[04/12/2014 - 06:24:39PM]             [::temp56]: 0.000000
[04/12/2014 - 06:24:39PM]         [ (FF0010F7)].critterMoth.BellShapeTranslateToRefAtSpeedAndGotoState() - "Critter.psc" Line 833
[04/12/2014 - 06:24:39PM]             IP: 21    Instruction: 1    Line: 833
[04/12/2014 - 06:24:39PM]             [arTarget]: [ObjectReference < (000CADCC)>]
[04/12/2014 - 06:24:39PM]             [afBellHeight]: 150.000000
[04/12/2014 - 06:24:39PM]             [afSpeed]: 88.567184
[04/12/2014 - 06:24:39PM]             [afMaxRotationSpeed]: 90.000000
[04/12/2014 - 06:24:39PM]             [arTargetState]: "AtPlant"
[04/12/2014 - 06:24:39PM]             [::nonevar]: None
[04/12/2014 - 06:24:39PM]         [ (FF0010F7)].critterMoth.GoToNewPlant() - "critterMoth.psc" Line 291
[04/12/2014 - 06:24:39PM]             IP: 947    Instruction: 22    Line: 291
[04/12/2014 - 06:24:39PM]             [afSpeed]: 88.567184
[04/12/2014 - 06:24:39PM]             [::temp30]: None
[04/12/2014 - 06:24:39PM]             [::temp31]: True
[04/12/2014 - 06:24:39PM]             [newPlant]: [ObjectReference < (000CADCC)>]
[04/12/2014 - 06:24:39PM]             [::temp32]: 1
[04/12/2014 - 06:24:39PM]             [::temp33]: "LandingSmall01"
[04/12/2014 - 06:24:39PM]             [::temp34]: False
[04/12/2014 - 06:24:39PM]             [landingMarkerName]: "LandingSmall01"
[04/12/2014 - 06:24:39PM]             [::nonevar]: None
[04/12/2014 - 06:24:39PM]             [::temp35]: False
[04/12/2014 - 06:24:39PM]             [firstMarkerName]: "LandingSmall01"
[04/12/2014 - 06:24:39PM]         [ (FF0010F7)].critterMoth.OnUpdate() - "critterMoth.psc" Line 130
[04/12/2014 - 06:24:39PM]             IP: 847    Instruction: 23    Line: 130
[04/12/2014 - 06:24:39PM]             [::temp5]: True
[04/12/2014 - 06:24:39PM]             [::temp6]: False
[04/12/2014 - 06:24:39PM]             [::nonevar]: None
[04/12/2014 - 06:24:39PM]             [::temp7]: True
[04/12/2014 - 06:24:39PM]             [::temp8]: None
[04/12/2014 - 06:24:39PM]             [::temp9]: False
[04/12/2014 - 06:24:39PM]             [fspeed]: 88.567184
[04/12/2014 - 06:24:39PM]             [::temp10]: 88.567184
[04/12/2014 - 06:24:39PM]             [::temp11]: 150.000000
[04/12/2014 - 06:24:39PM]             [::temp12]: None

Share this post


Link to post
Share on other sites

 This is from a DPS - had a few odd critter-related stacks, but they all go away by the next save/DPS. This one, however, is much bigger than the norm.

[04/12/2014 - 06:24:39PM] Dumping stack 4936091:
[04/12/2014 - 06:24:39PM]     Frame count: 6 (Page count: 6)
[04/12/2014 - 06:24:39PM]     State: Waiting on latent function (Freeze state: Freezing)
[04/12/2014 - 06:24:39PM]     Type: Normal
[04/12/2014 - 06:24:39PM]     Return register: False
[04/12/2014 - 06:24:39PM]     Has stack callback: No
[04/12/2014 - 06:24:39PM]     Stack trace:
[04/12/2014 - 06:24:39PM]         <unknown self>.utility.Wait() - "<native>" Line ?
[04/12/2014 - 06:24:39PM]             IP: 0
[04/12/2014 - 06:24:39PM]             [param1]: 0.016670
[04/12/2014 - 06:24:39PM]         [ (FF0010F7)].critterMoth.CheckFor3D() - "Critter.psc" Line 1099
[04/12/2014 - 06:24:39PM]             IP: 320    Instruction: 12    Line: 1099
[04/12/2014 - 06:24:39PM]             [AnyItemRef]: [ObjectReference < (FF0011B8)>]
[04/12/2014 - 06:24:39PM]             [::temp75]: True
[04/12/2014 - 06:24:39PM]             [delay]: 0.016670
[04/12/2014 - 06:24:39PM]             [counter]: 8
[04/12/2014 - 06:24:39PM]             [::temp76]: True
[04/12/2014 - 06:24:39PM]             [::temp77]: 8
[04/12/2014 - 06:24:39PM]             [::nonevar]: None
[04/12/2014 - 06:24:39PM]             [::temp78]: 0.000000

Yes,  that's the current USKP 2.0.3, and it spends a fair amount of time checking and re-checking for 3D! You caught that one in try 1 of 8, waiting 1 frame (1/60 seconds). Looks good to me.

Share this post


Link to post
Share on other sites

Cool. Being an unusually large stack I thought it worth posting just in case it was something unexpected.

Oh, I wouldn't have thought that very large. Maybe a lot of temp variables? The papyrus compiler isn't very efficient, makes too many temps, and doesn't re-use them very well either.

 

Including the native wait call, that's only 6 functions deep. Other places in the same code are much deeper. Indeed, a few lines before was 1 call deeper, and another few lines farther along there will be another 2 calls deeper.... :)

 

But that's after I spent a fair amount of time optimizing. Function calls are slow. Cross-script function calls are abysmally slower, and I've eliminated nearly all of them! :)

Share this post


Link to post
Share on other sites

Most are quite short in comparison - like the section you quoted, but that is just the 1st section. Look back in my spoiler - the whole thing is just one stack dump. There's 4 more sections under that which are part of the same stack (4936091). That's what I meant by large - many sections within a single stack dump. There were other, independent, stack dumps in the log - I only posted the one.

Share this post


Link to post
Share on other sites

That means they're normal stack traces then. At any given time you're going to find various things on the DPS dump. That's normal. It's only worth mentioning stuff if you've got a persistently stuck script somewhere you know it shouldn't still be running. Like the old dust drop random scripts, the broken sun scripts for Auriel's Bow, or the bending platforms in Apocrypha that were getting stuck long after leaving the area.

 

Being outdoors I'd say critter scripts should be expected to show up in a stack dump. If they didn't I'd be worried unless it's known there are none in a particular spot.

Share this post


Link to post
Share on other sites

I have 2 "stuck" stacks - unrelated to critters - which I don't recall seeing in any previous games. One relates to a Falmer trap in Mzulft and the other a Seeker. If you want to take a look I'll post them in a new thread rather than clutter this one. They don't appear to causing any problems.

Share this post


Link to post
Share on other sites

There appear to be some folks on Nexus who are reporting that the spawners are not working properly in 2.0.3. Claiming no insects are spawning in the usual places.

 

I've checked on my own testbed and found no issues but that testbed is using the scripts that are going into 2.0.4. Fresh game, using LAL straight out of Riverwood. Plenty of critters popping up right away.

 

It's not very many people yet but shit like this can snowball quickly with people coming out of nowhere claiming the same thing, even if it's not true. Dunno what might need to get looked into on this to see if something is wrong.

Share this post


Link to post
Share on other sites

You know I keep copies of nearly everything. critterSpawn.psc hasn't changed since 2.0.1. Critter.psc state KickOffOnStart Event OnUpdate() also hasn't changed since 2.0.1. If there's a problem, there's probably a log entry.

 

What locations? What kind of critters?

Share this post


Link to post
Share on other sites

I've already asked people to provide more specifics considering I'm not seeing any trouble from these myself. Neither is Pete on the 203 scripts.

Share this post


Link to post
Share on other sites

I also see critter just fine, and more than ever with the latest fix by daydreamer.

If the issue manifested for them only recently, try to ask whether they have any criter related mods, flora respawn fix and/or cleaned their save with one of the recent save cleaners

Share this post


Link to post
Share on other sites

I run with flora respawn fix (VMAD version). No overlap. The critters that need plants don't care whether they are in bloom.

 

There is a problem with plant selection: sometimes the part of the plant selected for landing is inside a stone wall, or otherwise not in the visible cell. The long if test is supposed to detect that the plant is visible:

newPlant = Game.FindRandomReferenceOfAnyTypeInList(PlantTypes, fSpawnerX, fSpawnerY, fSpawnerZ, fLeashLength)

; Check whether the new plant is valid (different from current)
; and 3D check because critters can attempt to pick disabled Nirnroots [USKP 2.0.1]
; and not too close to an actor
if (newPlant != none && newPlant != currentPlant && !newPlant.IsDisabled() \
 && Game.FindClosestActorFromRef(newPlant, fActorDetectionDistance) == none \
 && CheckCellAttached(newPlant) && CheckFor3D(newPlant))
    return newPlant; [USKP 2.0.1b]
endIf

But the game engine isn't perfect and/or sometimes changes its mind on-the-fly about being in-cell or not. And the code is flexible about where on the plant it lands:

; Pick random landing node
; And start moving towards it
string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3)
if (newPlant.HasNode(landingMarkerName))
    BellShapeTranslateToRefNodeAtSpeedAndGotoState(CurrentPlant, landingMarkerName, fBellShapePathHeight, afSpeed, fMaxRotationSpeed, "AtPlant")
else
;             traceConditional(self + " could not find landing marker " + landingMarkerName + " on plant " + newPlant, bCritterDebug)
    string firstMarkerName = LandingMarkerPrefix + 1
    if (newPlant.HasNode(firstMarkerName))
        BellShapeTranslateToRefNodeAtSpeedAndGotoState(CurrentPlant, firstMarkerName, fBellShapePathHeight, afSpeed, fMaxRotationSpeed, "AtPlant")
    else
;                 traceConditional(self + " could not find landing marker " + firstMarkerName + " on plant " + newPlant, bCritterDebug)
        BellShapeTranslateToRefAtSpeedAndGotoState(CurrentPlant, fBellShapePathHeight, afSpeed, fMaxRotationSpeed, "AtPlant")
    endIf        
endIf

Nothing much more that we can do.

Share this post


Link to post
Share on other sites

Probably nothing can be done with this (NULL form) - just mentioning it so you know it's happened.

[04/28/2014 - 01:12:04PM] error: Unable to call RegisterForSingleUpdateGameTime - no native object bound to the script object, or object is of incorrect type
stack:
    [<NULL form> (FF000D5D)].critterdragonfly.RegisterForSingleUpdateGameTime() - "<native>" Line ?
    [<NULL form> (FF000D5D)].critterdragonfly.OnCellDetach() - "Critter.psc" Line 260

Share this post


Link to post
Share on other sites

Critters don't ever despawn when killed by the player. For example, this can be accomplished by using a weapon, casting a destruction spell, or using a shout on them. This bug occurs with all critters including moths, dragonflies, and fish (hawks were apparently already fixed though). Unless these dead critters are picked up by the player when killed, they will consequently also fail to respawn under these circumstances.

(tracker bug #15919)

 

Arthmoor thinks that it should be possible to flag them as "dead" somehow and then tag them to despawn when the player leaves the area.

Share this post


Link to post
Share on other sites
Arthmoor thinks that it should be possible to flag them as "dead" somehow and then tag them to despawn when the player leaves the area.

What exactly do you mean by "despawn"?

 

They seem to be cleaned up and removed from the game.

 

They are in fact already flagged as dead on being hit:

Function DisableAndDelete(bool abFadeOut = true)
    bKilled = true    ; BUGFIX BY STEVE40+USKP

Share this post


Link to post
Share on other sites

I haven't checked on it myself yet but perhaps the value which "kills" them isn't set when they're knocked out by weapons, spells, shouts, etc? Maybe something in the logic of all this isn't getting called right when the "dead" ones drop?

 

I don't know, but thanks for taking a look at it.

Share this post


Link to post
Share on other sites

...perhaps the value which "kills" them isn't set when they're knocked out by weapons, spells, shouts, etc? Maybe something in the logic of all this isn't getting called right when the "dead" ones drop?

FUNCTION Die()
    if bKilled == false
    ;!    bKilled = true; now in disableAndDelete [USKP 2.0.1]
        disableAndDelete(false)

...
 
EVENT onActivate(objectReference actronaut)
    if (bKilled == false)
    ;!    bKilled = true; now in disableAndDelete [USKP 2.0.1]
        disableAndDelete(false) ; Nuke the critter as early as possible so the player knows something happened
 
...
 
EVENT onHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
;     debug.trace(self + " got hit by " + akAggressor)
    Die()
endEVENT

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
;     debug.trace(self + " got hit by magic of " + akCaster)
    Die()
EndEvent

Most of that is vanilla. Are there any other events not covered by vanilla that should be included?

 

 

 

What exactly do you mean by "despawn"?

Again, what is the "despawn" problem?

 

After all, the Die() function leaves behind loot. NOTE: loot is not a critter, but can be a "FakeCorpse".

Share this post


Link to post
Share on other sites

"Despawn" as in clean up. Maybe that's the confusion then. If "death" is dropping loot which is a different object then those will clean up after normal cell resets.

Share this post


Link to post
Share on other sites

Having heard nothing more after a week, have updated the bug report.

 

Also mentioned there about not respawning -- that's not likely either, as there's code for telling the spawner that we've died.

    ; Notify spawner
    if Spawner && notDisabled
        Spawner.OnCritterDied()
    endIf
    ; USKP fix persistent reference, don't repeatedly decrement
    Spawner = none

Share this post


Link to post
Share on other sites

I've done some more testing regarding the issues mentioned above about critters not despawning (not cleaning up) and respawning.

 

I went to the pond below Left Hand Mine (near Markarth) and used a ice storm spell to kill a bunch of dragonflies and fish. I fast-traveled away and waited in Solitude for more than 10 days and the dead critters are still around. It appears (at least from what I can tell) that new ones do respawn in their place though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Support us on Patreon!

×
×
  • Create New...