Gotchas: Troubleshooting

Post » Sat May 28, 2011 9:33 pm

Gotchas: TroubleshootingOne command for that script posted above: GetActionRef One command for that script posted above: GetActionRef
One command for that script posted above: GetActionRef

It would be GetActionRef if you want to set it to the one activating the container. This would imho be more "immersive" - you would get the water directly, instead of a "chest menu" ;).
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am

Post » Sat May 28, 2011 11:54 pm

I have one question about 'placeatme' that I always wanted to ask. How bad is it really? The Wiki says I can use it a couple of times. Is there an average that a new reference created this way adds to the savegame filesize? How many placeatmes does it need to get a 10mb+ savegame? Hundreds? Thousands? Thing is I'm making a trap that needs creatures to be created on the fly, similar to a summon spell. I could set the creatures inside a dummy cell and use moveto, but since I only want to use it a couple of times for a couple of creatures I'd rather use placeatme if possible. Would be much less work and if, let's say, ten creatures make a difference of one kilobyte only I'd use it.
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Post » Sat May 28, 2011 10:20 am

... Don't have a script target actor (script not on the actor script himself, but from an outside script. Also a specific non dynamic reference) lying around dead if he's not a "Quest Item". When too many corpses are produced, the engine could clear him and therefore cause CTD on the next save.


I wonder if similar CTD problems could happen with persistent actor refs after a cell buffer purge?

In other words, if you're using token-based scripts like RenGuardOverhaul, Deadly Reflex, Extra Wounding, etc. and then have Streamline or something else purging cell buffer -- then if one of the actors tracked by these scripts happens to be a persistent ref, then your CTD chances greatly increase? If so, this might be the source of a lot of CTD frustration, but it's a pretty big if.
User avatar
Nitol Ahmed
 
Posts: 3321
Joined: Thu May 03, 2007 7:35 am

Post » Sat May 28, 2011 5:51 pm

Thing is I'm making a trap that needs creatures to be created on the fly, similar to a summon spell.
I made some extensive testings about that some time ago: Creatures placed with placeatme get cleaned up when they're dead and do not cause savegame bloating, unless they're "Quest Items".

My tests were: Creating a bunch of creatures in a cell. Kill them. Get a FormID from one of them.

Leave the room, wait respawntime, go back -> room cleared. Furthermore player.moveto FormID works until the cell is cleared, but then not anymore -> which means the thing is purged from the save.

Also for the testing described in the above linked thread I created some thousands of mudcrabs. Savegame size went up to 15+ MB, but after cell reset was down to 5 MB.

Nevertheless placeatme should not be used when MoveTo is possible! Cell reset is a strange thing sometimes. Also if they're not killed, they stick around forever...

I wonder if similar CTD problems could happen with persistent actor refs after a cell buffer purge?

In other words, if you're using token-based scripts like RenGuardOverhaul, Deadly Reflex, Extra Wounding, etc. and then have Streamline or something else purging cell buffer -- then if one of the actors tracked by these scripts happens to be a persistent ref, then your CTD chances greatly increase? If so, this might be the source of a lot of CTD frustration, but it's a pretty big if.
Hm. A directly scripted actor shouldn't be a problem (there are many out there, like Shambles or other things). Totally independent scripts like in my gotcha do cause problems. How about these "local" token scripts? I don't know, and I don't even have an idea how to test it *. Although what I experienced was a CTD on save, not a "normal" CTD.

* = Hm, maybe I have an idea for testing. Maybe kill a "tokened" guard, do the mud crab trick to go over the maximum corpse number value and see what happens? Although I doubt that this will cause issues. My "gotcha" was a specific static reference, which was suddenly gone, not a dynamic "set me to getcontainer / getself / getactionref / placeatme / createfullactorcopy" thing usually used in scripts :blink:.
User avatar
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Sat May 28, 2011 6:49 pm

That will not work for what I am doing.
The water is stolen property. The bucket is assigned to the well owner.

I tested this already (the last one I posted with the activate command) it works the way I want it to.
And with the special sound effects I assigned to the bucket it is very immersive as well.

I just do not understand why the first way would svck up the FR.

But in the end it may not, it may be something else (most likely it was)
So I will test this as I mentioned before by putting the suspect script in its own mod and turning off all my other mods for the test.

It would be GetActionRef if you want to set it to the one activating the container. This would imho be more "immersive" - you would get the water directly, instead of a "chest menu" ;).

User avatar
adame
 
Posts: 3454
Joined: Wed Aug 29, 2007 2:57 am

Post » Sat May 28, 2011 10:43 pm

I have one question about 'placeatme' that I always wanted to ask. How bad is it really? The Wiki says I can use it a couple of times. Is there an average that a new reference created this way adds to the savegame filesize? How many placeatmes does it need to get a 10mb+ savegame? Hundreds? Thousands? Thing is I'm making a trap that needs creatures to be created on the fly, similar to a summon spell. I could set the creatures inside a dummy cell and use moveto, but since I only want to use it a couple of times for a couple of creatures I'd rather use placeatme if possible. Would be much less work and if, let's say, ten creatures make a difference of one kilobyte only I'd use it.


Not sure exactly, but here's an anecdotal answer: I don't think it's very bad except in very extreme cases. When I had severe savegame bloat from the Reznod Mannequin item duplication bug, the bloat was drastic: 26Mb savegame. However, I think most of this bloat came from duplicate "created" items (something I enchanted and then placed on the mannequin). Somehow I got 56,285 created weapons, 97,250 book refs, and 120,000 object refs in my savegame that didn't point to any mod.

Removing mods like the old Get Wet (which used tons of placeatme activators) helped reduce my file size a bit, but it was insignificant compared to the duplicate items.

Also, I think that placeatme is fairly safe for actors that can be killed since the corpses get cleaned up after respawn, right? EDIT: what bg said! :)

You should be able to easily test whether it has much effect by using Wrye Bash to compare savegame stats before and after you go through the trap. Here's what the report looks like for mine:

http://devnull.sweetdanger.com/mods/character_stats_bash_aaryth.txt
User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm

Post » Sat May 28, 2011 8:37 am

I made some extensive testings about that some time ago: Creatures placed with placeatme get cleaned up when they're dead and do not cause savegame bloating, unless they're "Quest Items".

[...]


Thanks, that's good to know. The trap works in a way that the creatures always get killed (or the player). And I'm only using it in two locations, so even if the player loots the dungeon ten times and always triggers the traps the placeatmes won't create more then twenty creatures.

[...]

You should be able to easily test whether it has much effect by using Wrye Bash to compare savegame stats before and after you go through the trap.


Thanks, but I guess for the small number of creatures I'm placing it won't make a noticeable difference when I look at your stats.

Placeatme, I'm coming! :P
User avatar
Dezzeh
 
Posts: 3414
Joined: Sat Jun 16, 2007 2:49 am

Post » Sat May 28, 2011 11:30 am

Hm. A directly scripted actor shouldn't be a problem (there are many out there, like Shambles or other things).


Right. Every creature and NPC in MMM and OOO have scripts on them, so we know that's not an issue on its own.

Totally independent scripts like in my gotcha do cause problems. How about these "local" token scripts? I don't know, and I don't even have an idea how to test it *. Although what I experienced was a CTD on save, not a "normal" CTD.

* = Hm, maybe I have an idea for testing. Maybe kill a "tokened" guard, do the mud crab trick to go over the maximum corpse number value and see what happens? Although I doubt that this will cause issues. My "gotcha" was a specific static reference, which was suddenly gone, not a dynamic "set me to getcontainer / getself / getactionref / placeatme / createfullactorcopy" thing usually used in scripts :blink:.


Exactly. So, the question then is whether "dynamic" references (getcontainer / getself / getactionref) are any less problematic in situations like this. In other words, does the problem come from having a hardcoded reference to the actor in the script or from the fact that the reference itself is persistent.

Here's a http://www.gamesas.com/bgsforums/index.php?act=findpost&hl=&pid=12179896 of a similar situation.

Also, way back during the beta testing for OOO 1.3 we ran into some similar rare CTDs with Oscuro summons. The particular example I remember was if you killed one of the Oscuro "corrupted" summons using a shock spell or shock weapon, then a few seconds later you got a CTD. Something to do with the actor being disabled while the shock membrane shader was still playing on it. Sotobrastos managed to fix this before release, but sadly I don't remember all of the details anymore. :(
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Post » Sat May 28, 2011 11:19 am

I would say that dynamic references gotten with GetSelf and GetContainer aren't a problem. Cause should that reference be deleted/removed from the game, so would the token with the script on it.

Maybe GetActionRef could have a similar problem since the reference could disappear while the (activator) script is still running.
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Sat May 28, 2011 12:55 pm

I know this is really old, but I stumbled across this and wanted to clarify:

PlaceAtMe Bloating Savegames
I was most surprised to find no mention of this issue whatsoever in the high-profile tutorial http://cs.elderscrolls.com/constwiki/index.php/Casting_Spells_From_An_Activator, which apparently gives very bad advice by giving script examples that will leave garbage in your savegame. The problem is that disable doesn't remove the reference from your savegame. It's mentioned on the http://cs.elderscrolls.com/constwiki/index.php/Category:About_Modding_Etiquette, but this is a pretty weak warning:
The http://cs.elderscrolls.com/constwiki/index.php/PlaceAtMe page has a good warning and the http://cs.elderscrolls.com/constwiki/index.php/Talk:PlaceAtMe page has some additional details, but these issues are not mentioned in the places where people really look for answers (i.e., tutorials), so I'm not sure how effective this is.


At the time I wrote that tutorial, I was basically hacking out lots of proof of concept things. It wasn't my intent to give bad advice. I had actually asked one of the developers about PlaceAtMe, and he said that disable would remove the references, so I didn't think any more of it. I'm glad someone figured out what was going on and edited the article :)
User avatar
Emily abigail Villarreal
 
Posts: 3433
Joined: Mon Aug 27, 2007 9:38 am

Post » Sat May 28, 2011 11:37 pm

I know this is really old, but I stumbled across this and wanted to clarify:
At the time I wrote that tutorial, I was basically hacking out lots of proof of concept things. It wasn't my intent to give bad advice. I had actually asked one of the developers about PlaceAtMe, and he said that disable would remove the references, so I didn't think any more of it. I'm glad someone figured out what was going on and edited the article :)


Thanks for the note! Great to see you around!

This is one of the rare cases where early dev advice turned out to be incorrect, but nobody knew this back when you were writing the tutorial, so don't feel bad about it. It's an excellent tutorial with that changed. :tops:
User avatar
Taylah Illies
 
Posts: 3369
Joined: Fri Feb 09, 2007 7:13 am

Post » Sat May 28, 2011 9:18 am

...

Holy cow! Hey, how are ya? Great to see you, man!
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm

Post » Sat May 28, 2011 6:45 pm

Another gotcha which I've seen a couple of times now - I don't know if the gotchas discovered here are summarized somewhere, but if they are, this may be worth listing:

When doing any kind of summonable or portable Oblivion gate using MoveTo commands into the Oblivion realms will screw up the realms (they won't reset, so the next time you're going into that random realm again there will be no sigil stone). Using a proper door is necessary.

But it may be even worse: Some cases indicate that even when using a door, unless a specific command when closing is called, again the realm won't reset. Which command I don't know, maybe the door needs to get destroyed, maybe DisableLinkedPathPoints is necessary, or other strange stuff. Best bet is to emulate the standard gate behaviour as closely as possible.
User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Sat May 28, 2011 7:30 am

But it may be even worse: Some cases indicate that even when using a door, unless a specific command when closing is called, again the realm won't reset. Which command I don't know, maybe the door needs to get destroyed, maybe DisableLinkedPathPoints is necessary, or other strange stuff. Best bet is to emulate the standard gate behaviour as closely as possible.


Wait...
One gate links to one realm and if you do not call closecurrentobliviongate, of course, the realm doesn't reset. IIRC, you can even go out of the realm via the gate to resupply and can go back in again.
User avatar
I love YOu
 
Posts: 3505
Joined: Wed Aug 09, 2006 12:05 pm

Post » Sat May 28, 2011 5:22 pm

Wait...
One gate links to one realm and if you do not call closecurrentobliviongate, of course, the realm doesn't reset. IIRC, you can even go out of the realm via the gate to resupply and can go back in again.
http://www.gamesas.com/bgsforums/index.php?showtopic=843877&hl=. I've seen this problem a couple of times now - that realms get messed up like described when the Sigil Stone is taken (which calls CloseCurrentOblivionGate) - it seems that this is not enough to completely reset the realm.
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Sat May 28, 2011 9:40 am

Another gotcha which I've seen a couple of times now - I don't know if the gotchas discovered here are summarized somewhere, but if they are, this may be worth listing:

When doing any kind of summonable or portable Oblivion gate using MoveTo commands into the Oblivion realms will screw up the realms (they won't reset, so the next time you're going into that random realm again there will be no sigil stone). Using a proper door is necessary.

But it may be even worse: Some cases indicate that even when using a door, unless a specific command when closing is called, again the realm won't reset. Which command I don't know, maybe the door needs to get destroyed, maybe DisableLinkedPathPoints is necessary, or other strange stuff. Best bet is to emulate the standard gate behaviour as closely as possible.


Oy, nasty one there. Sounds like a good one to add to the list!
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Sat May 28, 2011 8:20 am

From the mouth of the http://www.gamesas.com/bgsforums/index.php?s=&showtopic=846900&view=findpost&p=12353957, Oblivion diviner and bringer of knowledge:
Update: I've just gone and undeleted 3,336 deletions. It's now undeniably confirmed that deletion of vanilla refs. is the major cause of crash-on-exit if a mod that loads after the mod that deleted the ref(s) tries to do anything with them. I now have to find what the deletions were for (ie the first one was a loaf of bread floating outside the playable area of Anvil Castle Great Hall... go figure) and flag them as disabled or move them or leave them be, depending. Obviously, I'm not going to do them all before I send out the hotfix, as that could take weeks. Most of them are underground rocks in Tamriel, underground wall units in Oblivion planes, and an inaccessible section of Fingerbowl Cave. I will restore the necessary ones in towns and interiors. So there will be some delay in getting the hotfix out (sorry) but it's best that I get this done and get rid of any chance that the UOP causes crashes on exit.

It should also now be known as "no no" in mods to ever delete any vanilla (Oblivion.esm) refs. Even the official DLC's do this, so if another mod loads after them and does anything with the refs. that they deleted, crash on exit.

User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am

Post » Sat May 28, 2011 5:26 pm

From the mouth of the http://www.gamesas.com/bgsforums/index.php?s=&showtopic=846900&view=findpost&p=12353957, Oblivion diviner and bringer of knowledge:


Wow, that svcks. :(

So many mods do this it's hard to imagine being able to avoid it completely. I hope it turns out to be only certain kinds of objects or refs that cause it.

Will be interesting to see what the best workaround is. I guess simply moving the object out of sight may be the best alternative, but that could leave a lot of unused objects hanging around and slowing down the game. Might be a choice of which evil is lesser.
User avatar
Andy durkan
 
Posts: 3459
Joined: Fri Aug 03, 2007 3:05 pm

Post » Sat May 28, 2011 7:33 pm

....I guess simply moving the object out of sight may be the best alternative, but that could leave a lot of unused objects hanging around and slowing down the game. Might be a choice of which evil is lesser.

Well and ofcourse using Initially Disabled to stop it from being rendered. :shrug:
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Sat May 28, 2011 7:23 pm

Yes, but then if other mods try to use those refs, would they still be disabled? I'm not certain how load ordering and precedence works for REFRs...
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Sat May 28, 2011 10:13 pm

Yes, but then if other mods try to use those refs, would they still be disabled? I'm not certain how load ordering and precedence works for REFRs...

Hmmm yes, but then again, if other mods are using those refs would they still need to be hidden/removed/disabled? :shrug:
User avatar
Sudah mati ini Keparat
 
Posts: 3605
Joined: Mon Jul 23, 2007 6:14 pm

Post » Sat May 28, 2011 11:57 am

Well and ofcourse using Initially Disabled to stop it from being rendered. :shrug:

Not the point for avoiding the bug, but I'm not sure that will work for games in-progress. Has anyone tried?
User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Sat May 28, 2011 6:11 pm

Not the point for avoiding the bug, but I'm not sure that will work for games in-progress. Has anyone tried?


Yes and it's fine. I made three test minimods. In the first, I set Initially Disabled on all objects in an outdoor cell. In the second, I deleted all of the objects. In the third, I set an enable parent to player (the only mass operation available from outside the Render window) just so they were all dirty.

With #1 active, objects were gone. With #1 and #3 active, objects were all back, including if game was saved with #3 inactive and it was then activated and game loaded. With all three active, objects were all back (well, seemed to be... see below) but.... crash on exit because #3's changes loaded after #2's deletions.

An initially disabled object ref. still has the full object ref. record; any change to the object by a later mod will override the entire record including the disabling.

One more test I have to do... I'll make a bad mesh that crashes Oblivion and place an object using it that's initially disabled to see if it precaches meshes for disabled objects.

Edit: While I was at it I was finally able to confirm something I had long suspected because I'd never heard complaints about it before then: the horridly long hangs and disk thrashing of the crash-on-exit was, so it seems, introduced by the 1.2.0416 patch due to the form ID cleanup code. I tried the #1/2/3 combination above on the 1.2.0214 .EXE and it takes less than a second for the error window to appear after quitting. Otherwise it's a good 10-15 seconds of an unrendered window and disk thrashing on 1.2.0416.

This sounds like something for Wrye or ElminsterAU or dev_akm to incorporate in their utilities. All that's required is to find deleted refs. drawn from Oblivion.esm ie with a 00 index, if they are found, import the entire record (deleted refs. are missing the data segment which is probably what causes crash on exit) from the ESM replacing the deletion record and set the Initially Disabled flag.

Edit2: It doesn't appear to affect all refs. I made two minimods. In #1 I deleted Weynon Priory House. In #2 I moved it up so it was floaty. If both were loaded it would not display the mesh until I disabled/re-enabled, but did not crash on exit with it displayed. With # 2 alone it appeared properly floaty.

Edit3: Made two minimods that deleted and moved a rock respectively. No crash on exit. Something tells me it's SpeedTree objects. I'll try one of them next.

Edit4: Nope, deleted and moved a shrub in two minimods and no crash on exit.

Edit5: Just to make sure, deleted and moved a tree, and still no crash on exit.

Edit6: No go with a harvestable flora (Dominica Redwort) either.

Can't continue the testing as I need to work on getting the UOP update done and out. But I did find one other good reason to never delete anything: in four of the cases (the single deletions of the priory, tree, shrub and flower) the object was present in-game when the deletion was overriden but it was invisible. It had to be PRIDded, disabled and enabled for it to be visible. So if a mod deletes a ref in Oblivion.esm and a later loaded mod tries to use it, it may end up invisible.
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am

Post » Sat May 28, 2011 8:12 pm

Yes and it's fine. I made three test minimods. In the first, I set Initially Disabled on all objects in an outdoor cell. In the second, I deleted all of the objects. In the third, I set an enable parent to player (the only mass operation available from outside the Render window) just so they were all dirty.

With #1 active, objects were gone. With #1 and #3 active, objects were all back, including if game was saved with #3 inactive and it was then activated and game loaded. With all three active, objects were all back (well, seemed to be... see below) but.... crash on exit because #3's changes loaded after #2's deletions.
.....


Thanks so much for all the testing! That's great info, man.

...
This sounds like something for Wrye or ElminsterAU or dev_akm to incorporate in their utilities. All that's required is to find deleted refs. drawn from Oblivion.esm ie with a 00 index, if they are found, import the entire record (deleted refs. are missing the data segment which is probably what causes crash on exit) from the ESM replacing the deletion record and set the Initially Disabled flag.
...


Sounds like a reasonable solution. Now if we can just get one of them interested in the idea ....

;)
User avatar
Chenae Butler
 
Posts: 3485
Joined: Sat Feb 17, 2007 3:54 pm

Post » Sat May 28, 2011 10:56 am

The deletion conflict problem may not become a gotcha until several deletions are later overridden. All I can tell you for sure is that after going through my list of mods and undeleting records with TES4Edit, my problems with crash-on-exit have all vanished. Including edits to Tamriel -47,-7 which has been pinned as a cause for exit crashes.

Were I debugging this as a C program I'd be suspecting a double-free. These don't always bite you. The risk increases the more double-frees you cause until eventually one crashes the program. Perhaps the deletion marks it in the list as NULL and immediately removes the memory, but then the modification comes along and modifies that memory. Which remains semi-valid for the duration of the game. But when quitting the code blows up because it tried to free an already free block of memory. I've seen plenty of this in MUD code where invalid memory is still accessible until someone tries to shut down. Then it crashes as it's cleaning up.

What I don't get is why Oblivion bothers. Why go through the hassle of cleaning all that memory up when you've clearly told it you just want to quit. Why not just perform a saveini and simply drop to desktop after that? Let Windows have the memory back and clean up anything needing cleanup.

BTW - Shoving an item out of view by +/-150,000 Z units ( arbitrary value ) will put it far enough away that the game won't render it anyway. So if all this disabling and reenabling doesn't work, just shove it out of sight and it's not an issue if another mod comes along and drags it back to the surface. :)
User avatar
x a million...
 
Posts: 3464
Joined: Tue Jun 13, 2006 2:59 pm

Next

Return to IV - Oblivion