Oblivion freezing when travelling in-game? Maybe this will h

Post » Sun Apr 19, 2015 10:04 pm

NOTE 1: This article deals with a specific type of freeze I was experiencing, where Oblivion would freeze on fast travel/walk to a location, but in earlier save games I could successfully visit the same location without any freeze. If you are experiencing some other type of freeze issue, this article won't be able to help you.

NOTE 2: This article goes into a lot of technical detail, and I don't yet know if the same steps will work for others with a different collection of mods. I am posting this information in case it does indeed help others. The steps assume the reader has a working knowledge of enabling/disabling mods, knowing your load order, using the in-game console, using a text editor and regular expressions, and has the patience to carefully follow the steps!

Introduction
In my current save game there were at least 4 places where I could not no longer fast travel to. On a fast travel attempt, the game would freeze during the loading screen which shows the progress bar. Nor could I approach those same places on foot. If I fast travelled to a location several cells away and then tried to walk towards the location where I could not fast travel to, the game would freeze on the way there.

However, these were places I had previously successfully travelled through; indeed I could load earlier save games and go to those same places without any issue. So the issue did not seem to be due to missing/corrupted resources like meshes. My thought was that there were invalid references in my save game causing oblivion to seize up when trying to load these references.

The upshot is I found a successful workaround that allows me to now travel to those places without any freeze. To do so I had to disable one or more references. Interestingly, these references have in my case always been buildings. When disabled, the referenced building disappears in game, however any doors into the building remain behind so you or NPCs can still enter the building. Thus apart from the visual discrepancy, gameplay is not affected.

Steps
The tricky part was finding the references that need to be disabled. I have 200+ mods so initially I had to disable mods from my load order to identify which mod the invalid references belonged to. Once done, for a simple mod with only a few buildings, I was able to identify the building reference to disable with the mod called RefScope. For a complex mod, I had to parse a text dump of the save game file to identify candidates that might be the cause, and then used trial and error while disabling these references to find the culprits.

Step 0: Preparation.

You will need the mod called RefScope in your load order (http://www.nexusmods.com/oblivion/mods/21862). You will also need a text dump of your save game file. To get this, load your latest save game, then enter the console and use the command 'save mygame 1'. This will save the game to a text file called mygame.ess.txt. It might take a few minutes so be patient. This text file contains a long list of records (~350K lines in my case)

Step 1: Identify the mods that cause the freezes.

If you only have a few mods this might be trivial; there may only be one mod that affects the area where the freeze occurs. In my case I have a ton of landscape related mods, so I had to repeatedly disable one or more mods working backwards from the last mod in my load order (the bashed patch in my case), then load the save game that had a problematic site, and fast travel to the site. Once the fast travel succeeds without freezing, then the last mod that was disabled is the source of the references that will need to be disabled to fix that site. I had a good idea of which mods affected which areas of the game, so in most cases I could disable a batch of 10-20 mods in one go (as long as I worked backwards from the end of the load order), and then just disable any suspected mod individually. As well as the mod itself, also identify its load order number. The first two digits of all references belonging to that mod will be the mod's load order number.

By the way, I found the quickest way to effectively recover from an oblivion freeze was:
(i) modify oblivion.ini to set it to windowed mode with a window size that allows me room to also have other windows open like task manager and my text editor (refer to http://www.uesp.net/wiki/Oblivion:Ini_Settingsfor instructions on modifying this ini)
(ii) start task manager, switch to processes tab, and click on the memory column heading so that processes using the most memory will be listed first (ie oblivion process)
(iii) start oblivion, select play in the initial dialog
(iv) once oblivion window opens, click within it to give it focus, press space to skip through loading screens, load the latest save game and try to fast travel to the problematic site
(v) if oblivion freezes, press alt-tab keyboard combo as many times as necessary to switch to task manager window
(vi) press down arrow once, this selects the top process which is oblivion
(vii) press the right context menu button on the keyboard (on my keyboard this is the key to the left of the right ctrl key), and use down arrow twice to select end process. A final confirm and this kills oblivion

Step 2: Get the reference ID for the buildings in the mod.

For a mod with a few buildings, load an old save game where you are able to fast travel to the site without a freeze. Stand in front of each building and press X to highlight it, then with X still pressed, press space to bring up a RefScope dialog where the first section details the reference id of the building. Verify that the building is actually from the mod causing the freeze. Cross check that the first two digits of the reference id will also be the mod's load order number.

For bigger mods (or if you don't have a save game where you can successfully fast travel to the site), all the building reference ids can be obtained from the text dump of the save. However, the buildings are not labelled in this file. From my experimentation, I developed a regular expression that in my case seems to match the reference ids of all the buildings. Load the text dump in a text editor that supports regular expression searching eg Notepad++, and use the following expression:

"^ DE.*125 .*Animation\(16\) Movement" (the regular expression is everything between the double quotes, including the spaces. Replace the DE with the load order number of the mod causing the freeze)

In the lines that match the regular expression, the reference id is the 8 digit number in the first column.

For the next 2 steps, do these one problematic mod at a time, and do the smallest problematic mod first, as you will see a positive result much quicker.

Step 3: Load up your latest save game, and start disabling building references that you have identified for that mod.

To disable a reference, enter the console and use the command 'prid ' to select the reference, then use the command 'disable' to disable it. After disabling the buildings, exit the console and fast travel to the site and confirm there is no more freeze. Save a new game

Step 4: Re-enable any references that do not contribute to the freeze.

Typically only 1 reference is the cause of the freeze, so I want to re-enable the others so that I don't have lots of missing buildings. Start re-enabling references you disabled (use the console commands 'prid ' to select the reference, then 'enable'). You will know which references are no good because after you re-enable it and exit the console back to the game world, the game will freeze again within seconds. Make a new save game after you have 'fixed' the freeze, then move onto the next problematic mod and start at step 3 again.

Note with step 4, I found that in 3 of my 4 cases, only one reference needed to be disabled. But in the 4th case (which was Better Cities Blood & Mud), I found there was 4 references (out of 50) that had to remain disabled.

Wrap up
The steps above helped me workaround the freeze issue in 4 different instances, hopefully it will also help others. Let me know if it does, or if you had to tweak any of the steps, or if you have any other insights or quicker methods. I still do not know what actually causes the affected reference ids to go bad in the first place. I have long ago disabled fast saves, and I mostly save to a new game slot each time I save, but not always. Perhaps when a save game is reused a bad reference could occur? Also I find it curious that for me, it is always a building that is problematic. Buildings are static; if anything I would have expected an NPC or similar to be the source of any freeze issue since they are dynamic and their actions are under the control of scripts that may have bugs. I believe that the only mod I have that affects buildings globally is AWLS which adds window lighting and chimney smoke effects; perhaps there is some subtle bug that could affect saved games sometimes when using this mod, but apart from checking whether disabling that mod stops the freeze issue (it didn't) I haven't investigated further.

For those interested in reading further, I am documenting below how I came to discover that it was bad building references causing my freeze issues, in case this may help with further investigation by others.

User avatar
Cccurly
 
Posts: 3381
Joined: Mon Apr 09, 2007 8:18 pm

Post » Mon Apr 20, 2015 1:47 am

I had 4 places in my current game where there was a freeze:
(i) just outside Bravil town
(ii) the area where Frostcrag tower was
(iii) just outside the Imperial city market district gate
(iv) an area where a Woodland village was added by the mod Shezrie's towns

My first idea to discover the source of the freezes was to go back in my save game history, discover which save game first introduced a freeze, make a 'text dump' save version of that game as well as the save immediately before it (where there was no freeze), then difference the two text dumps and try to discern what might have changed between the saves that might be the cause of the freeze. I did this with the freeze outside Bravil. However, there was quite a lot of differences between the saves, and many of the differences were with references that had no identifying name. This approach did not provide any leads.

Next I decided to disable mods starting from the end of my load order to determine which might be the source of the freezes, if any. A quick method to disable mods is simply move their esps out of the data folder. I use Better Cities Full Blood and mud edition, which is near the end of my load order, and as I suspected that the freeze outside Bravil was due to this mod, so I moved the last 12 or so mods of my load order including the bashed patch out of my data folder to a temporary area (I knew which were the last mods in my load order as Wrye bash timestamps the esps in load order one minute apart). This left the last enabled mod as Better Cities full b&m. I loaded my latest save game (saying ok to the warning that the save game relies on data no longer present) and still had the freeze. Then I retried after also disabling the blood and mud esp, and then I could load without a freeze. This confirmed it was that mod causing the freeze. The mod had load order number DE according to Wrye Bash.

Continuing, I found Frostcrag village was the source of the freeze near Frostcrag tower (load order number C1), Unique Landscapes Imperial Isle (load order number A4) the source of the freeze outside the Imperial city, and Shezries Towns the source of the freeze at Woodland village (load order number 85).

Considering these mods, I was surprised that Unique Landscapes Imperial Isle was the source of a freeze. I was expecting Region Revive Lake Rumare to be the culprit as it contained quests and affected the same area. At the time my chief suspect as to the source of the freeze was a quest script bug causing references to go awry, and I knew Unique Landscapes Imperial Isle had no quests. As this was the smallest of the 4 mods and the surprising one in my opinion, I decided to investigate this one first.

With no quests, the only dynamic component of this mod was its NPC's. Loading up this mod in Test4Edit revealed it had 9 NPC's. My thought was that perhaps something had happened to one of the NPC's or their AI packages had stuffed up. Using a text dump save game, I found the reference of each of the NPCs (each reference is eight hex digits starting with A4 which is the load order number of the mod). I stood in the market district of the Imperial city, and using the console, I selected one NPC by doing 'prid ', then 'moveto player'. This brings the NPC if they are alive to where I am standing (one or two of the NPC's were dead, so I had to additionally use 'enable' and 'resurrect' before the moveto command - by the way, a good source of info for console commands is http://www.uesp.net/wiki/Oblivion:Console).With RefScope I examined their AI packages, nothing seemed amiss. I disabled each NPC with ' disable', then stepped out the market district gate to the outside of the city to see if the freeze was gone. It wasn't.

Then I thought it might be the creatures added by the mod, about 16 farm animals like sheep and dogs. I looked their references up in the text dump file (again the refs are prefixed by the load order number), examined each, found nothing amiss, disabled them, but still got the freeze. Now I was stumped, there was nothing dynamic left to disable in the mod.

I decided to try a tool called Process Monitor (https://technet.microsoft.com/en-us/library/bb896645.aspx) which can trace all activity on a Windows file system. I set a filter to trace any file read activity by the oblivion process, started the capture, then loaded my save game in the market district and exited the imperial city. I saw that when the progress bar on the oblivion screen froze, read activity also froze. Just before the freeze I saw from the captured trace that oblivion had been loading pieces of architecture and clutter like a pitchfork which I recognized from a farmhouse added by the Imperial Isle mod. I tried the same on an earlier save game that didn't freeze in the same area, and saw that other stuff was being loaded up without issue after these same files. However, in the text dump file, there were no named references to farmhouses. So in my save game without the freeze, I travelled to the farmhouse which I thought I had recognized and did a RefScope on the farmhouse itself and the nearby open stable area where the pitchfork was situated and noted down the reference ids. I then loaded up my latest save game, disabled the references I had noted down, and was able to exit the imperial city without a freeze. Some quick trial and error and I had narrowed down the problematic reference to be that of just the farmhouse itself.

I saved a new game with just the farmhouse disabled via the console, then turned my attention to the freeze caused by Frostcrag village. This mod only added 4 houses. I noted down the reference ids of these 4 houses via Refscope on an earlier save game and tried disabling them in a later save game with a freeze in the area and once again, the freeze was gone. Again, it was just one house reference that needed to be disabled, and the freeze when fast travelling to the Frostcarg area was gone. Again I saved a new game.

Next mod was Shezrie's towns. The Woodland village added about 20 houses. Again I found the reference id of all 20 odd houses via Refscope in an earlier save game, disabled all the references in my latest save game, and the freeze was gone. After some trial and error, again I eliminated the freeze by having to disable just one house reference.

Feeling good, I tackled Better Cities Blood and Mud full. I travelled around the outside of Bravil in an earlier save game and noted all the reference ids of all the buildings I saw. There were lots of buildings, especially around the Bravil docks area. After loading my latest save game, disabling all the references I had noted and then travelling to the area, unfortunately I still got a freeze. So either I had missed a building or other references were involved with this particular freeze.

At this point I again reloaded my text dump save game file, and searched for the 3 reference ids I had identified from the other 3 mods that were the cause of the freeze and see if there was some pattern. Each of them looked similar in form, like this:

C1000ED3 57 03000000 125 - Animation(16) Movement Extra(43)
A40A2B47 57 03000000 125 - Animation(16) Movement Extra(43)
8506441F 57 03000000 125 - Animation(16) Movement Extra(43)

Typically, for most references, the blank area between the '125' and '- Animation...' identifies the reference name, eg an NPC name, or an item name like 'Barrel'. But seems houses are not named in this text dump. But apart from the reference id, the lines looked the same.

The text editor I use is a free one called Notepad++ and it supports regular expression matching. The Better Cities B&M references all started with DE (the load order number of the mod), so I did a search for the regular expression

"^ DE.*125 .*Animation\(16\) Movement Extra\(43\)"

but this matched nothing. I relaxed the expression by not exactly matching the digits after 'Movement Extra', so the expression was just

"^ DE.*125 .*Animation\(16\) Movement"

and this matched 50 references ids. I went to my latest save game and disabled all 50 references via console and the freeze was gone. However, trial and error to determine which references were causing the problem turned out to be a tedious chore in this case, because unlike the other 3 cases where only one reference needed disabling, this time I discovered it was more than one reference, Eventually I found 4 references form the 50 identified from the regular expression that had to be disabled. By loading my old save game, entering console and using 'prid ', then simply 'moveto', which transports the player to the location of the reference id, I found that 2 of the 4 references were houses outside of Bravil, and the other 2 references were also houses, but inside a 'ghost Bravil' which I had never seen in game but looked like the vanilla Bravil but without any people within it. I don't know how Better Cities is implemented but it seems it incorporates the vanilla cities in separate world spaces within itself but to which you can't actually travel. Anyway, with the use of the regular expression matching within the text dump save game, I was able to discover the necessary references to disable and thus eliminate my freezes.

As I mentioned at the end of my first post, I still do not know what actually causes the affected reference ids to go bad in the first place. The same reference ids exist in the earlier save game text dumps that don't freeze, and in the dumps that do freeze. It seems that the text dump does not expose everything contained within the save file, but there is something about the problematic houses that are being referenced that causes the freeze. The only dynamic feature I can think of with housing is the window lighting and chimney smoke effect added by the AWLS mod; perhaps there is some bug with this mod, or just a bug in Oblvion's save game feature that can occasionally cause these bad refs to occur and get saved.

User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am


Return to IV - Oblivion