ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
635 stars 74 forks source link

[TF2] vpk_linux32 segfaulting while extracting files on Ubuntu 12.04 Server #1709

Open powerlord opened 10 years ago

powerlord commented 10 years ago

So, I just tried to extract scripts/talker/demoman.txt from tf2_misc_dir.vpk only to get a segmentation fault:

tf2@powerlord:~/tf2/tf$ LD_LIBRARY_PATH=/home/tf2/tf2/bin /home/tf2/tf2/bin/vpk_linux32 x tf2_misc_dir.vpk scripts/talker/demoman.txt
extracting scripts/talker/demoman.txt
Segmentation fault (core dumped)

The last time I tried using it was in December and it was working properly then.

The LD_LIBRARY_PATH is necessary because if you don't, you get this instead

tf2@powerlord:~/tf2/tf$ /home/tf2/tf2/bin/vpk_linux32 x tf2_misc_dir.vpk scripts/talker/demoman.txt
/home/tf2/tf2/bin/vpk_linux32: error while loading shared libraries: libtcmalloc_minimal.so.4: cannot open shared object file: No such file or directory

I've already done a steamcmd validation on my server's TF2 install and it is otherwise working correctly.

Edit: This is on Ubuntu 12.04 LTS 64-bit, and as previously mentioned, this worked fine a few months earlier.

powerlord commented 10 years ago

This appears to be have fixed in the last update.

clarkwinkelmann commented 8 years ago

Well it's currently happening to me on Ubuntu Desktop 14.04... Don't know what to do...

In this thread someone says it will segfault if I don't have the right system... But I believe Ubuntu trusty falls under the "right system" case

After testing: not all files fail. I have the segfault with ~/.steam/steam/SteamApps/common/Team Fortress 2/tf/tf2_misc_000.vpk

# copy ~/.steam/steam/SteamApps/common/Team Fortress 2/tf/tf2_misc_000.vpk to a working directory then try to unpack
./vpk.sh tf2_misc_000.vpk
# Fails with segfault (System with French locale)
# ./vpk.sh : ligne 5 :  9294 Erreur de segmentation  (core dumped) LD_LIBRARY_PATH="${VALVE_LIB_DIR}:${LD_LIBRARY_PATH}" "${VPK_LINUX}" "${*}"

vpk.sh content:

#!/bin/bash
# https://developer.valvesoftware.com/wiki/VPK#Linux_users
VPK_LINUX="$(find "${HOME}/.local/share/Steam" -type f -iname "vpk_linux32" -print | head -n 1)"
VALVE_LIB_DIR="$(dirname  "${VPK_LINUX}")"
LD_LIBRARY_PATH="${VALVE_LIB_DIR}:${LD_LIBRARY_PATH}" "${VPK_LINUX}" "${*}"

This is not a big problem, I'm just tinkering with the game files. Still strange it does not work as expected.

drakon64 commented 7 years ago

Error still occurs with Fedora 25

kisak-valve commented 7 years ago
Starting program: /home/kisak/.local/share/Steam/steamapps/common/Team Fortress 2/bin/vpk_linux32 "/home/kisak/.local/share/Steam/steamapps/common/Team Fortress 2/bin/temp/tf2_misc_000.vpk"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xf7844b40 (LWP 4863)]

Program received signal SIGSEGV, Segmentation fault.
0xf7b3d982 in ?? () from /lib32/libc.so.6
(gdb) bt
#0  0xf7b3d982 in ?? () from /lib32/libc.so.6
#1  0x0807b58e in CPackedStore::GetFileList(char const*, CUtlStringList&, bool, bool) ()
#2  0x7261566e in ?? ()
#3  0x735f722e in ?? ()
#4  0x65657263 in ?? ()
#5  0x6461666e in ?? ()
#6  0x6e696d65 in ?? ()
#7  0x657a6973 in ?? ()
#8  0x31220922 in ?? ()
#9  0x0d223035 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
ghost commented 6 years ago

Segfaulting on Ubuntu 16.04 LTS when trying to extract This Synergy Addon with the HL2 vpk_linux32 exec. Could I be missing dependencies by any chance?

$ vpk 1282256877_pak.vpk
extracting materials/models/items/ammocrate_ar2.vmt
Segmentation fault (core dumped)

Bin script

#!/bin/sh
LD_LIBRARY_PATH=~/.steam/steam/steamapps/common/Half-Life\ 2/bin ~/.steam/steam/steamapps/common/Half-Life\ 2/bin/vpk_linux32 $*
Buggem commented 1 month ago

Still happens in Fedora. I used the SDK 2013 one and that created folders with nothing, so I tried the hl2 one and it Segfaulted