Addon unpacked file size limit?
LillyWho opened this issue · 9 comments
It's currently somewhat dubious as to what the original addon size limits are. One changelog mentions it to be 2.2GB, while another claims a prerelease version would remove the limit entirely. I've been having issues with assets not working after upload, so I was wondering if there was a possibility that gmpublisher might overflow some sort of buffer trying to upload an addon that exceeds any limit, thereby corrupting the addon in the process.
Addon in question is this, for testing: https://steamcommunity.com/sharedfiles/filedetails/?id=2634043997
gmpublisher does not impose any limitation on the size of GMAs or GMA entries, if gmpublisher can pack and unpack a huge GMA with no problem, then Garry's Mod itself is the one imposing the limitation internally. Note that 32-bit Gmod can't allocate more than 4 GiB memory anyway, so most likely the limit is somewhere near that.
So I don't know if gmpublisher just works differently, but using gmad directly I get can't grow buffer size
which supposedly is due to running out of RAM, however I would have thought 32GB is enough. Thinking about 7-zip ultra compression though, I can imagine it might be a valid error. gmpub just never errors out regardless. It probably doesn't notice any buffer overflowing, and produces an invalid upload that's partially corrupt.
Edit: Turns out, by default crowbar was running the 32-bit version of gmad. Could x86 vs x64 be the issue with gmpublisher as well?
32-bit programs can’t allocate more than 4 GiB of memory. Gmpublisher works fine because it’s a 64-bit program. Gmad is 32-bit
32-bit programs can’t allocate more than 4 GiB of memory.
I know.
Gmpublisher works fine because it’s a 64-bit program.
That's the thing. It doesn't. My addon always gets corrupted.
Gmad is 32-bit
Only if you run the version located in bin
instead of bin\win64
. For testing I've now kicked off packing with gmad and it's been at it since before I wrote my last comment. The speed at which gmpublisher working is suspiciously quick, considering how long gmad is taking and the Addon size (3GB), unless you're doing some serious high performance compression wizardry.
There’s no point making addons that large because 32-bit Gmod won’t be able to extract them.
If gmpublisher can successfully compile, upload, download and extract your addon all from the UI then it is not corrupting anything - Gmod is
The addon is being tested on 64-bit Gmod and is still displaying the aforementioned issues. Gmad by the way cannot for the life of it pack the addon even in its 64-bit version, so gmpublisher finishing up within minutes, is, like I said, very sus.
Gmod probably has a hardcoded limit on 64-bit to prevent issues between branches. Please can you just split the addon up into multiple addons, you are pushing the limits of what Gmod can handle and are surprised as to why it is not working. If gmpublisher can download and extract the uploaded Workshop addon then it is not at fault.