fireundubh / playwithfire

backup for wiki.fireundubh.com
3 stars 1 forks source link

Wiki addition request: how to debug buffout 4 CreateTexture2D crash #3

Open arifogel opened 3 years ago

arifogel commented 3 years ago

While playing a modded game, I was getting a lot of crashes with the Buffout4.toml option:

[Warnings]
CreateTexture2D = true   # Warns when a call to CreateTexture2D fails

That is, the crashes happen whether that flag is true or false, but when true you get a dialogue box saying that CreateTexture2D failed and the game will crash.

After a bunch of digging, I finally figured out a semi-reasonable way to identify the cause (which is not at all apparent from the crash log):

  1. Run archive2.exe (in fallout Tools directory)
  2. Create a new archive (File->New), and select format DDS
  3. For each chunk of textures in all your mods (and base game I guess) for which you have enough HD space to save a compressed archive: a. Drag those textures into the archive2 window (can drag the containing folders) b. Save the archive somewhere (File->Save As) c. After the save finishes, note any warnings in the archive2 log like the example below after saving: Skipping "Textures/actors/character/basehumanfemale/revelationwh/femalebhedFEARLESS_d.dds" since it contains features not supported by the archiver

One should also decompress all suspect ba2 files that may contain textures, and trying to recompress the extracted textures in archive2 using the method above.

So far, all such textures I have encountered that emit such warnings cause the game to crash when the texture is loaded (presumably via CreateTexture2D. The crash can be avoided by removing or perhaps repairing the texture using an appropriate tool. I have read online that certain texture formats causes crashes after a certain Fallout 4 patch. I think textures can be fixed by resaving them in a compatible format with the right application (e.g. Blender?)

@fireundubh would you be willing to add a section to your Buffout 4 wiki detailing this method of debugging CreateTexture2D crashes?

KirkH420 commented 4 months ago

...what do you mean by "chunk of textures"? Are you saying to load any loose files textures into this tool? (It's never recommended to be running F4 with loose files). Or are you saying to load all Texture.ba2 archives into this tool? (that does nothing except print errors). I tried what you said (or the best I can figure that you are talking about anyway)... and it produces the "skipping" error... but it doesn't create any archive2 file or any files at all.

If this is supposed to be a work-around of some kind... it needs to be fleshed-out and explained a lot better.