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.