Michael-wigontherun / ESLifyEverything

https://www.nexusmods.com/skyrimspecialedition/mods/75248
27 stars 4 forks source link

Aggregate Error #1

Closed Morribyte closed 2 years ago

Morribyte commented 2 years ago

Pic here: https://imgur.com/zcsscR5

Was trying to ESLify some scripts when I noticed compilation errors because the files that needed to be used weren't present. I have a huge folder of something like 30,000 scripts that have been accumulated over time of scripts I've needed when compiling and messing around with mods.

The issue is, if I ESLify a mod without these scripts present, nothing bad happens. But if I try to ESLify a mod that DOES need at least some of those scripts it will spit out an error if I have copied over every script. As such I have to add them either one-by-one as compilation errors arise (a huge pain in the ass) / by installing the correct dependencies (I have no idea what they actually are, so that's a bit of a no-go unless I spend some serious time researching and figuring out what mod needs what) or just drop them into the BSAModData folder for the compilation. I took the third option.

However, when I do that the number of scripts skyrockets from something like 30,000 to like 64,000 totalling nearly 1,000,000 lines. At some point, something happens and the length parameter in the decimal-to-hex conversion function ends up returning a negative number, causing the script compilation to stop and ESLify Everything to move onto opening xEdit for fixing FaceGen files. I took a look at the code, but am not an expert in C#. I wonder if the sheer number of scripts I dropped into the directory is causing ESLify Everything to become overloaded lol.

I can always just spend some time trying to find the proper sources for the mods I have installed instead of being lazy, if that's something that needs to happen though.

Morribyte commented 2 years ago

I thought about it for a while and think the issue is because I'm dropping non-decompiled versions of the scripts into the folder maybe? I am going to test it again with some of the sources that I know I do have with the rest of the scripts taken out.

Michael-wigontherun commented 2 years ago

Didn't mean to close it, It isn't a file limit issue, the crash is in the FormInFileLineReaderDecimal, inisde the local Method FixLineToHex, on the line with the TryParse.

Michael-wigontherun commented 2 years ago

Try the new release on Github. I added new verbose log line, enable VerboseFileLogging and tell me what it returns last before the error.

https://github.com/Michael-wigontherun/ESLifyEverything/releases/tag/V3.0.5b

Michael-wigontherun commented 2 years ago

It is vary likely an issue with the original source code. The reason am using Champollion to decompile all the scripts is firstly reduces time on finding what needs to be decompiled and what doesn't. and Secondly because Champollion will always format it the same unlike PEOPLE. The worst thing about coding is PEOPLE do it all differently, its annoying

Morribyte commented 2 years ago

Hey there! Thanks for the quick patch. I'll fire it up with the source scripts inside the folder and let you know what happens.

Morribyte commented 2 years ago

Ok, so ran it and got the same error and then checked the log and had an inkling (the forms being looked at right before the crash were commented out) so I checked it out and it turns out whoever originally wrote the script had several commented out lines with GetFormFromFiles that terminated at the 0x with no numbers. So, that explains that.

I guess the issue is, if a form is imported without an ID attached it freaks out.

I'm testing it now, but I don't have a lot of confidence it'll make it through since it'll probably be overwritten by the newly decompiled script. But, when I ran testing on smaller plugin set it didn't error out the way it did before so I think that was it.

Michael-wigontherun commented 2 years ago

Yey. I assumed it was a problem with peoples source code. Just place the original scripts that you need for compiling inside the "ExtractedBSAModData\Scripts" and let Champollion decompile the working code instead. I will add a ignore line filter for commented out code. Just in case in the next full build.

Morribyte commented 2 years ago

Yep that was it! :D it compiled properly. Those particular lines with the commented code never showed up before as far as I know. Thanks for the help!