Mord3rca / gamma-launcher

Just another Launcher to setup S.T.A.L.K.E.R.: G.A.M.M.A.
GNU General Public License v3.0
86 stars 13 forks source link

gamma-launcher has bugs installing and verifying #95

Closed stubkan closed 5 months ago

stubkan commented 10 months ago

On Ubuntu system:

Using both standalone and source venv has the same results :

bug 1

Bug 1: anomaly-install will crash checking md5 of archive files (but still proceeds to install)

gamma-launcher anomaly-install --anomaly ~/DriveTwo/Stalker/pfx/drive_c/Anomaly/
[+] Installing base Anomaly 1.5.1
Calculating hash of Anomaly-1.5.1.2.7z: 100%|##################################################| 8.75G/8.75G [00:19<00:00, 471MiB/s]
  - Using cached Anomaly-1.5.1.2.7z (0ee1e9a0e45c529536370ba76b0ec47f)
  - Extracting
[+] Installing update Anomaly 1.5.1 to 1.5.2

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz (A0652),ASM,AES-NI)

Scanning the drive for archives:
1 file, 9400335298 bytes (8965 MiB)                          

Extracting archive: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/Anomaly-1.5.1.2.7z
--
Path = /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/Anomaly-1.5.1.2.7z
Type = 7z
Physical Size = 9400335298
Headers Size = 2332
Method = LZMA2:1536m LZMA:20 BCJ2
Solid = +
Blocks = 2

Calculating hash of Anomaly-1.5.1-to-1.5.2-Update.7z:   9%|###1                                | 90.0M/1.01G   0% 21 - db/levels/levCalculating hash of Anomaly-1.5.1-to-1.5.2-Update.7z: 100%|####################################| 1.01G/1.01G [00:02<00:00, 471MiB/s]
  - Using cached Anomaly-1.5.1-to-1.5.2-Update.7z (8f4d4000e8aee78f25ee2ac977acaa0f)
  - Extracting
Traceback (most recent call last):
  File "/home/stubkan/DriveTwo/Stalker/env/bin/gamma-launcher", line 33, in <module>
    sys.exit(load_entry_point('gamma-launcher==1.5', 'console_scripts', 'gamma-launcher')())
  File "/home/stubkan/DriveTwo/Stalker/env/lib/python3.10/site-packages/launcher/cli.py", line 68, in main
    args.cobject().run(args)
  File "/home/stubkan/DriveTwo/Stalker/env/lib/python3.10/site-packages/launcher/commands/install.py", line 104, in run
    CheckAnomaly().run(args)
  File "/home/stubkan/DriveTwo/Stalker/env/lib/python3.10/site-packages/launcher/commands/check.py", line 39, in run
    for file, hash in self._read_checksums(anomaly):
  File "/home/stubkan/DriveTwo/Stalker/env/lib/python3.10/site-packages/launcher/commands/check.py", line 29, in _read_checksums
    for line in checksums.read_text().split("\n"):
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz (A0652),ASM,AES-NI)

Scanning the drive for archives:
1 file, 1085624064 bytes (1036 MiB)                          

Extracting archive: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/Anomaly-1.5.1-to-1.5.2-Update.7z
--
Path = /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/Anomaly-1.5.1-to-1.5.2-Update.7z
Type = 7z
Physical Size = 1085624064
Headers Size = 805
Method = LZMA2:1536m LZMA:20 BCJ2
Solid = +
Blocks = 2

  0%    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/tools/checksums.md5'
(env) stubkan@pleiades:~/Drive 20% 36 - dbEverything is Ok                                    

Folders: 8
Files: 21
Size:       1951067379
Compressed: 1085624064
Everything is Ok                                   

Folders: 13
Files: 92
Size:       17399612816
Compressed: 9400335298

Perhaps this is occuring because I placed both .7z archives in the Anomaly install folder, which makes the installer use the cached files instead of downloading it, which saves me a lot of time.

bug 2

Extra bug: When the program completes - there is no command prompt or final completion message, so it takes me a while to realize it is finished, and I have to press enter to bring a command prompt back.

bug 3

Also, I have installed the game 4 times using different methods, still trying to get a working copy. Every time I attempt to verify it fails, Sometimes it crashes and says all the DX exe files are bad, but after fresh install it always crashes and says these 2 files are bad:

Checking Anomaly file: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/textures/textures_weapons.db0...: 100%|#| 512M/512M [00
Checking Anomaly file: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/textures/textures_weapons.db1...: 100%|#| 514M/514M [00
Checking Anomaly file: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/textures/textures_weapons.db2...: 100%|#| 272M/272M [00
Checking Anomaly file: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/files.db0...: 100%|#| 381k/381k [00:00<00:00, 7.91MiB/s
Checking Anomaly file: /home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/shaders.db0...: 100%|#| 914k/914k [00:00<00:00, 198MiB/
Traceback (most recent call last):
  File "/home/stubkan/DriveTwo/Stalker/env/bin/gamma-launcher", line 33, in <module>
    sys.exit(load_entry_point('gamma-launcher==1.5', 'console_scripts', 'gamma-launcher')())
  File "/home/stubkan/DriveTwo/Stalker/env/lib/python3.10/site-packages/launcher/cli.py", line 68, in main
    args.cobject().run(args)
  File "/home/stubkan/DriveTwo/Stalker/env/lib/python3.10/site-packages/launcher/commands/check.py", line 45, in run
    raise RuntimeError(f"Invalid file(s) detected:\n{err_str}")
RuntimeError: Invalid file(s) detected:
/home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/configs/configs.db0
/home/stubkan/DriveTwo/Stalker/pfx/drive_c/Anomaly/db/configs/scripts.db0

seems like a bug, since this is a fresh install and does it no matter what type of install method I use

Mord3rca commented 10 months ago

bug 1

It seems launcher don't wait for extraction. Do you have an alias on 7z or something ? command -v 7z ? Also, output should not appear since exec is called with &>/dev/null directive. Maybe the issue come from your sh interpreter. file /bin/sh ? (should be a symlink on bash which support &>/dev/null directive)

bug 2 Program should return 0 or 1 on completion success / failure respectively, this is maybe related to your shell interpreter (and bug 1)

bug 3 May be caused by bug 1 since 7z execution is not controlled

stubkan commented 10 months ago

no, 7z is normal (/usr/bin/7z)

I am unsure how bug 3 is related to 7z, since it is only calculating md5 hash?

I think it is possibly just failing md5 hash and crashing instead of writing an error message

Mord3rca commented 10 months ago

Please tell me if your shell return immediately in sh with the following command:

$ sh
sh$ sleep 60 &>/dev/null
stubkan commented 10 months ago

It sleeps for 60 seconds then doesnt do anything more - it stays on $, on all shells I try

image

image

image

Mord3rca commented 9 months ago

Can you try removing &>/dev/null from this line and try again ? (pip install + running the launcher)

According to your log, extracting is not blocking.

Mord3rca commented 6 months ago

Still an issue ?

Mord3rca commented 5 months ago

Fixed in #121