Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile fails when packing files (v27.19) #168

Closed
killer89 opened this issue Mar 29, 2022 · 33 comments
Closed

Compile fails when packing files (v27.19) #168

killer89 opened this issue Mar 29, 2022 · 33 comments
Labels

Comments

@killer89
Copy link

Compile fails when content packing is enabled.

debug.log

@killer89 killer89 added the bug label Mar 29, 2022
@Exactol
Copy link
Collaborator

Exactol commented Apr 2, 2022

Can you translate this?
System.IO.EndOfStreamException: Lukutoimintoa ei voi käyttää virran loppukohdan ulkopuolella. kohteessa System.IO.BinaryReader.FillBuffer(Int32 numBytes) kohteessa System.IO.BinaryReader.ReadInt32() kohteessa CompilePalX.Compilers.BSPPack.AssetUtils.FindVtxMaterials(String path) tiedostossa D:\a\CompilePal\CompilePal\CompilePalX\Compilers\BSPPack\AssetUtils.cs:rivillä 270 kohteessa CompilePalX.Compilers.BSPPack.PakFile.AddModel(String internalPath, List 1 skins) tiedostossa D:\a\CompilePal\CompilePal\CompilePalX\Compilers\BSPPack\PakFile.cs:rivillä 283 kohteessa CompilePalX.Compilers.BSPPack.PakFile..ctor(BSP bsp, List 1 sourceDirectories, List 1 includeFiles, List 1 excludedFiles, List 1 excludedDirs, List 1 excludedVpkFiles, String outputFile) tiedostossa D:\a\CompilePal\CompilePal\CompilePalX\Compilers\BSPPack\PakFile.cs:rivillä 151 kohteessa CompilePalX.Compilers.BSPPack.BSPPack.Run(CompileContext context) tiedostossa D:\a\CompilePal\CompilePal\CompilePalX\Compilers\BSPPack\Pack.cs:rivillä 246

@killer89
Copy link
Author

killer89 commented Apr 2, 2022

System.IO.EndOfStreamException: The read function cannot be used outside the end of the current. in System.IO.BinaryReader.FillBuffer (Int32 numBytes) in System.IO.BinaryReader.ReadInt32 () in CompilePalX.Compilers.BSPPack.AssetUtils.FindVtxMaterials (String path) in D: \ a \ CompilePal \ CompilePal \ CompilePal \ BSPPack \ AssetUtils.cs: on line 270 in CompilePalX.Compilers.BSPPack.PakFile.AddModel (String internalPath, List 1 skins) in D: \ a \ CompilePal \ CompilePal \ CompilePalX \ Compilers \ BSPPack \ PakFile.cs: on line 283 in Comp .Compilers.BSPPack.PakFile..ctor (BSP bsp, List 1 sourceDirectories, List 1 includeFiles, List 1 excludedFiles, List 1 excludedDirs, List 1 excludedVpkFiles, String outputFile) in D: \ a \ CompilePal \ CompilePal \ CompilePalX \ Compilers \ BSPPack \ PakFile.cs: on line 151 in CompilePalX.Compilers.BSPPack.BSPPack.Run (CompileContext context) in D: \ a \ CompilePal \ CompilePal \ CompilePalX \ Compilers \ BSPPack \ Pack.cs: on line 246

@PixelAffection
Copy link

I have the same issue, I found out that this happens every time I have both CSS and CS:GO mounted in Hammer at the same time, I think some of the content is conflicting with each other and the program gets confused which one's content should be packed into the map.

@Exactol
Copy link
Collaborator

Exactol commented Jun 12, 2022

Compile Pal 027.19.zip
I added more logging to help find the issue, can you try this build and upload the debug.log file?

@killer89
Copy link
Author

Compile Pal 027.19.zip I added more logging to help find the issue, can you try this build and upload the debug.log file?

debug.log

@Exactol
Copy link
Collaborator

Exactol commented Jun 14, 2022

It looks like there might be an issue packing models/props_vehicles/humvee_glass.mdl. Can you send me the model and materials? You can send it over discord if you don't want to upload it publicly.

@killer89
Copy link
Author

humvee_glass.zip

@Exactol
Copy link
Collaborator

Exactol commented Jun 15, 2022

It looks like the humvee_glass.vtx file is corrupted (I don't think it's even used https://developer.valvesoftware.com/wiki/VTX#:~:text=It%20is%20currently,Portal%202.). VTX files are binary, but this looks like its a badly formatted VMT text file.

@killer89
Copy link
Author

killer89 commented Jun 15, 2022

Recompiled the model, and now the packing fails without an error.

debug.log

And if i try to pack with only the pack-setting toggled on, the following error appears:

System.OutOfMemoryException: Tyypin System.OutOfMemoryException poikkeus.
kohteessa CompilePalX.Compilers.BSPPack.BSP.buildModelList() tiedostossa C:\Users\10zil\Documents\Projects\C Sharp\CompilePal\CompilePalX\Compilers\BSPPack\BSP.cs:rivillä 314
kohteessa CompilePalX.Compilers.BSPPack.BSP..ctor(FileInfo file) tiedostossa C:\Users\10zil\Documents\Projects\C Sharp\CompilePal\CompilePalX\Compilers\BSPPack\BSP.cs:rivillä 99
kohteessa CompilePalX.Compilers.BSPPack.BSPPack.Run(CompileContext context) tiedostossa C:\Users\10zil\Documents\Projects\C Sharp\CompilePal\CompilePalX\Compilers\BSPPack\Pack.cs:rivillä 230

@Exactol
Copy link
Collaborator

Exactol commented Jun 16, 2022

Are there any crash logs in the Compile Pal folder?

@killer89
Copy link
Author

Are there any crash logs in the Compile Pal folder?

No

@Exactol
Copy link
Collaborator

Exactol commented Jul 7, 2022

Can you send the unpacked bsp and the recompiled model?

@killer89
Copy link
Author

killer89 commented Jul 7, 2022

Unpacked
complex.zip

Packed
packed.zip

@Exactol
Copy link
Collaborator

Exactol commented Jul 8, 2022

What game is this for? The packed BSP seems corrupted, it crashes VIDE when I try to open it and GCFScape shows that it has no lumps. The unpacked one worked fine for me.

@killer89
Copy link
Author

killer89 commented Jul 8, 2022

Half-Life 2: Episode Two. The packing turns out like that when packed using compilepal, however packing with VIDE works without issues

@Exactol
Copy link
Collaborator

Exactol commented Jul 8, 2022

Compile Pal 027.20.zip
Can you try packing with this version?

@killer89
Copy link
Author

killer89 commented Jul 8, 2022

Compile Pal 027.20.zip Can you try packing with this version?

Still same.

@Exactol
Copy link
Collaborator

Exactol commented Jul 8, 2022

Can you send me the debug.log?

@killer89
Copy link
Author

killer89 commented Jul 8, 2022

debug.log

@Exactol
Copy link
Collaborator

Exactol commented Jul 8, 2022

The log looks like it ran normally. Can you try verifying your game files and then retry packing it?

@killer89
Copy link
Author

killer89 commented Jul 8, 2022

Verified and tried again. No luck.

Also as a side note, i'm using Slammin' Source Map Tools (tried also with vanilla tools). For some reason trying to pack stuff with compilepal seems to corrupt the map, but VIDE however can pack the exact same content without issues.

@Exactol
Copy link
Collaborator

Exactol commented Jul 9, 2022

Compile pal doesn't directly modify the map, it just calls bspzip. Can you send me the files.txt file in the Compile Pal BSPZipFiles folder?

@killer89
Copy link
Author

killer89 commented Jul 9, 2022

files.txt

@Exactol
Copy link
Collaborator

Exactol commented Jul 9, 2022

Can you run the pack step with the verbose parameter and send the log? It should show the output from BSPZip

@killer89
Copy link
Author

killer89 commented Jul 9, 2022

2022-07-09T22-05-48.txt

@Exactol
Copy link
Collaborator

Exactol commented Jul 9, 2022

It looks like there was a bug that prevented the full output from being logged, can you send the log from this new version?
Compile Pal 027.20.zip

@killer89
Copy link
Author

killer89 commented Jul 9, 2022

Now compiling jams (idles at 80%, when packing is supposed to start) at
image

@Exactol
Copy link
Collaborator

Exactol commented Jul 11, 2022

Compile Pal 027.20.zip
Try this build

@killer89
Copy link
Author

New error: BSPZIP exited with code: -1073741819

debug.log

@Exactol
Copy link
Collaborator

Exactol commented Jul 12, 2022

It looks like this might be an issue with BSPZIP, do you have any large files that you are trying to pack into the map? Sound files are usually pretty large so it might be a good place to check.

@killer89
Copy link
Author

I may have found out the issue. It seems that HL2EP2's bspzip.exe has a stability issue related to handling of large amount of custom assets, which however is fixed in TF2's version of the tool.

"Improved bspzip tool stability when packing maps with large amounts of custom assets"

https://www.reddit.com/r/tf2/comments/43wnv5/tf2_update_for_2216/

I replaced HL2EP2's bspzip.exe with TF2's, and the packing succeeded after the compiling. The level also loaded normally.
However this still doesn't explain why bspzip worked normally in VIDE, while corrupting the map when used to pack content through compilepal.

@Exactol
Copy link
Collaborator

Exactol commented Jul 12, 2022

Compile Pal uses BSPZIP, but I'm pretty sure VIDE does not, which would explain why it was able to successfully pack it

@killer89
Copy link
Author

Seeing that it's an issue in Valve's tool, it would probably be a good idea to create an explanation for that bspzip error, in case someone else gets it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants