BEEmod/BEE2-items

Corrupt VPK crashes during export

Closed this issue · 1 comments

BEE2 Application Version

2.4.44.1

BEE2 Package Version

4.44.0

What operating system are you running on?

Windows 10 (64bit)

Description of the bug

After I tried to convert a folder into .vpk file, bee2 break every export, or even uninstall systems.

Expected behavior

root would convert into the root.vpk file.

Steps to reproduce

Step 1: put any folder into the vpk_override folder
Step 2: export anything to Portal 2
Step 3: MultiError: error('unpack requires a buffer of 18 bytes')

Logs and Reports

+ Exception Group Traceback (most recent call last):
  |   File "trio\_core\_run.py", line 963, in __aexit__
  | trio.NonBaseMultiError: <MultiError: error('unpack requires a buffer of 18 bytes')>
  +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    |   File "app\gameMan.py", line 1416, in remove_game
    |   File "app\gameMan.py", line 647, in clear_cache
    |   File "packages\style_vpk.py", line 108, in find_vpk
    |   File "trio\_core\_run.py", line 963, in __aexit__
    | trio.NonBaseMultiError: error('unpack requires a buffer of 18 bytes')
    +-+---------------- 1 ----------------
      | Traceback (most recent call last):
      |   File "packages\style_vpk.py", line 99, in worker
      |   File "trio\_threads.py", line 400, in to_thread_run_sync
      |   File "outcome\_impl.py", line 213, in unwrap
      |   File "trio\_threads.py", line 327, in do_release_then_return_result
      |   File "outcome\_impl.py", line 213, in unwrap
      |   File "trio\_threads.py", line 346, in worker_fn
      |   File "srctools\vpk.py", line 305, in __init__
      |   File "srctools\vpk.py", line 386, in load_dirfile
      | struct.error: unpack requires a buffer of 18 bytes
      +------------------------------------


Additional information:

I cant ever verify game files after this happened. 
Btw BEE2 was the best way to make Portal2 maps, devs did their work very well.

Try deleting portal2_dlc3/pak01_dir.vpk, it sounds like that got corrupted.