Wrye-bash: CBash fails to build due to error while printing error info

Created on 25 Feb 2020  路  5Comments  路  Source: wrye-bash/wrye-bash

When attempting to build a patch using CBash in Oblivion, the process runs through to where it should display the window showing the outcome but instead it simply quits and nothing more happens. The file is never updated. A debug log of the session is attached.
BashBugDump.log

This hasn't always been broken, and it's been brought up on Discord before, and now I don't recall how long its been this way but it's been awhile.

I'm sure CBash is somewhat of a 3rd rail topic, but there are numerous Oblivion mods still in active use that rely on it to function, like my Oblivion DLC Delayers mod, All Natural, Better Cities, and parts of TIE. If this turns into an issue that cannot be fixed for some reason, a lot of mods in moth balls will never be updated to compensate for it.

C-bug G-oblivion A-patchers A-cbash M-relnotes

All 5 comments

Thanks for the report - which branch is this on?

So, that's erroring while trying to debug-print another error. Namely, it's trying to do this:
https://github.com/wrye-bash/wrye-bash/blob/feebf658ca8c9dd7ccd41c38639714b0e983fc7d/Mopy/bash/game/oblivion/patcher/special.py#L260-L262

But for some reason the MGEF isn't present in the name dict and so it gets a KeyError. It then tries to print out info about this error (e.g. MGEF name):
https://github.com/wrye-bash/wrye-bash/blob/feebf658ca8c9dd7ccd41c38639714b0e983fc7d/Mopy/bash/game/oblivion/patcher/special.py#L263-L274

But note that the first call there is to Debug_DumpModFiles, which seems to want to print out the address of a pointer???
https://github.com/wrye-bash/wrye-bash/blob/feebf658ca8c9dd7ccd41c38639714b0e983fc7d/Mopy/bash/cint.py#L15523

That clearly isn't working and I don't see how it would be of any use either, so I'll drop that and try building CBash again, will report back.

On a random aside, there's also a really weird call to encode() in that method:
https://github.com/wrye-bash/wrye-bash/blob/feebf658ca8c9dd7ccd41c38639714b0e983fc7d/Mopy/bash/cint.py#L15532
All usages of this method either print the result or concatenate it with a unicode string, so I don't see how this is of any use - it will just instantly get converted to unicode again once it's printed/concatenated.

Ah, so it's from that weird MGEF window that pops up? Why was that ever a thing?

@Utumno This is from 307.202002242156 nightly from Discord.

@Infernio this is an opportunity to centralize a bit warnings emitted by the patch - the reason I never squashed for instance 49aaee48f571b26f5eea4fc737760065863eaa81 is that I think there should be some _PFile "warnings" dict keyed by patcher that will print this kind of warnings to the log (that appear here and there at semi random). This, or log them directly if the log is in scope. Did not have time (or courage) to look at this but since you are there give it some thought (and feel free to squash/drop/whatever 49aaee48f571b26f5eea4fc737760065863eaa81)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Utumno picture Utumno  路  25Comments

Utumno picture Utumno  路  15Comments

Infernio picture Infernio  路  15Comments

StormDancer46 picture StormDancer46  路  26Comments

Utumno picture Utumno  路  22Comments