Install: Linux launcher hangs checking .nup and exhausts system memory #1525

Open
opened 2026-11-18 02:00:53 +00:00 by BeanBot · 3 comments
Member

Reported on Discord

What happened?

On Linux Bazzite, Longshot Launcher nightly-137-7012f7f4 remained on “Checking...” for the .nup game file and did not finish. After about a minute, memory use became critical and the system ran out of memory. The reporter suspects the game file may be corrupted, but this has not been confirmed. The screenshot shows 59.1 GiB of 60.4 GiB memory and 4.3 GiB of 16.0 GiB swap in use.

Steps to reproduce

The reporter downloaded the nightly launcher, opened it, and selected The Legend of Zelda Ocarina of Time.nup in ~/Documents. The check remained stuck until system memory was nearly exhausted. The reporter took the memory screenshot before it became critical.

Expected behavior

The game-file check should complete or report an error without exhausting system memory.

Environment

  • Launcher: nightly-137-7012f7f4
  • OS: Bazzite, Linux x64
  • Launcher log says .NET 10.0.15.
  • Game build selected: v3.0.0-rc.7.
  • Unknown: launcher installation type, system hardware details, game dump details, whether it happens with another dump/folder, and exact duration until memory exhaustion.

Logs and screenshots

Launcher log:

2026-11-17 17:57:16.384 -08:00 Longshot Launcher nightly-137-7012f7f4 (not installed) started; Bazzite, X64, .NET 10.0.15; home ~/.local/share/longshot/launcher
2026-11-17 17:57:16.963 DNS git-cdn.magicbean.dev: <ip>, <ip>, 2606:4700:3032::6815:3747, 2606:4700:3037::ac43:aaa0 (10 ms)
2026-11-17 17:57:16.968 connect git-cdn.magicbean.dev <ip>:443: connected in 2 ms
2026-11-17 17:57:17.037 GET https://git-cdn.magicbean.dev/api/v1/repos/MagicBeanDev/Longshot/releases?…: HTTP 200, 104 ms
2026-11-17 17:57:17.082 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS: HTTP 200, 32 ms
2026-11-17 17:57:17.083 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS: 290 bytes in 0 ms
2026-11-17 17:57:17.131 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS.sig: HTTP 200, 46 ms
2026-11-17 17:57:17.131 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS.sig: 97 bytes in 0 ms
2026-11-17 17:57:17.181 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS: HTTP 200, 46 ms
2026-11-17 17:57:17.190 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS: 308 bytes in 9 ms
2026-11-17 17:57:17.217 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS.sig: HTTP 200, 26 ms
2026-11-17 17:57:17.217 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS.sig: 97 bytes in 0 ms
2026-11-17 17:57:17.307 GET https://git-cdn.magicbean.dev/api/v1/repos/MagicBeanDev/LongshotLauncher/releases?…: HTTP 200, 88 ms
2026-11-17 17:57:17.335 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS: HTTP 200, 28 ms
2026-11-17 17:57:17.335 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS: 351 bytes in 0 ms
2026-11-17 17:57:17.366 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS.sig: HTTP 200, 30 ms
2026-11-17 17:57:17.366 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS.sig: 97 bytes in 0 ms
2026-11-17 17:57:17.379 update check: answered
2026-11-17 17:58:42.562 the launcher closed (0)

Copy the attached launcher log and screenshots showing the .nup stuck at “Checking...”, launcher version, and memory/swap usage. The log contains no indication of the check itself; it ends with a normal launcher close.

Reported on [Discord](https://discord.com/channels/1569849200047427645/1570784344241340417/1572427863926247616) ### What happened? On Linux Bazzite, Longshot Launcher nightly-137-7012f7f4 remained on “Checking...” for the `.nup` game file and did not finish. After about a minute, memory use became critical and the system ran out of memory. The reporter suspects the game file may be corrupted, but this has not been confirmed. The screenshot shows 59.1 GiB of 60.4 GiB memory and 4.3 GiB of 16.0 GiB swap in use. ### Steps to reproduce The reporter downloaded the nightly launcher, opened it, and selected `The Legend of Zelda Ocarina of Time.nup` in `~/Documents`. The check remained stuck until system memory was nearly exhausted. The reporter took the memory screenshot before it became critical. ### Expected behavior The game-file check should complete or report an error without exhausting system memory. ### Environment - Launcher: nightly-137-7012f7f4 - OS: Bazzite, Linux x64 - Launcher log says .NET 10.0.15. - Game build selected: v3.0.0-rc.7. - Unknown: launcher installation type, system hardware details, game dump details, whether it happens with another dump/folder, and exact duration until memory exhaustion. ### Logs and screenshots Launcher log: ```text 2026-11-17 17:57:16.384 -08:00 Longshot Launcher nightly-137-7012f7f4 (not installed) started; Bazzite, X64, .NET 10.0.15; home ~/.local/share/longshot/launcher 2026-11-17 17:57:16.963 DNS git-cdn.magicbean.dev: <ip>, <ip>, 2606:4700:3032::6815:3747, 2606:4700:3037::ac43:aaa0 (10 ms) 2026-11-17 17:57:16.968 connect git-cdn.magicbean.dev <ip>:443: connected in 2 ms 2026-11-17 17:57:17.037 GET https://git-cdn.magicbean.dev/api/v1/repos/MagicBeanDev/Longshot/releases?…: HTTP 200, 104 ms 2026-11-17 17:57:17.082 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS: HTTP 200, 32 ms 2026-11-17 17:57:17.083 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS: 290 bytes in 0 ms 2026-11-17 17:57:17.131 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS.sig: HTTP 200, 46 ms 2026-11-17 17:57:17.131 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/v3.0.0-rc.7/SHA256SUMS.sig: 97 bytes in 0 ms 2026-11-17 17:57:17.181 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS: HTTP 200, 46 ms 2026-11-17 17:57:17.190 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS: 308 bytes in 9 ms 2026-11-17 17:57:17.217 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS.sig: HTTP 200, 26 ms 2026-11-17 17:57:17.217 GET https://git-cdn.magicbean.dev/MagicBeanDev/Longshot/releases/download/nightly-464-310e7c9d/SHA256SUMS.sig: 97 bytes in 0 ms 2026-11-17 17:57:17.307 GET https://git-cdn.magicbean.dev/api/v1/repos/MagicBeanDev/LongshotLauncher/releases?…: HTTP 200, 88 ms 2026-11-17 17:57:17.335 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS: HTTP 200, 28 ms 2026-11-17 17:57:17.335 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS: 351 bytes in 0 ms 2026-11-17 17:57:17.366 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS.sig: HTTP 200, 30 ms 2026-11-17 17:57:17.366 GET https://git-cdn.magicbean.dev/MagicBeanDev/LongshotLauncher/releases/download/v1.0.0-rc.10/SHA256SUMS.sig: 97 bytes in 0 ms 2026-11-17 17:57:17.379 update check: answered 2026-11-17 17:58:42.562 the launcher closed (0) ``` Copy the attached launcher log and screenshots showing the `.nup` stuck at “Checking...”, launcher version, and memory/swap usage. The log contains no indication of the check itself; it ends with a normal launcher close.
Author
Member

Files from the Discord report:

Files from the Discord report: - [launcher.log](https://git.magicbean.dev/attachments/92aea7aa-f9e3-4661-842d-47ff473a4f50) - [image.png](https://git.magicbean.dev/attachments/728cdca5-472b-4d63-bff1-d32c459c2255) - [image.png](https://git.magicbean.dev/attachments/644e0f34-692e-4a20-a224-9497a8a2bc93) - [image.png](https://git.magicbean.dev/attachments/3e704a30-7684-47d8-bfa0-315db2ba9dd2)
Contributor

Root cause measured on the launcher side (no game data attached):

  • The check spawns make_game.py --check, which runs Longshot's nx2/nup.py, and Nup.__init__ (nx2/nup.py:143-159) trusts the table of contents' u64 counts and offsets before validating them: meta = f.read(0x80 + strings offset + strings size) reads up to the whole file, self.strings = meta[...] slices a second near-full copy, and then the titles/dirs/files/child lists are built per entry.
  • A sane 25.6 GB dump of this game parses at 256 MiB peak (36.8 MB TOC, 2 titles, 1,199 dirs, 372,587 files) — constant in the 25.6 GB of payload. A corrupt TOC (a 64 MiB synthetic with the same header fields wrong) peaked at 147 MiB = 2.3× the file size; at 25.6–27 GB that is the ~57–59 GiB in the report.
  • The launcher had no bound of its own here: CheckAsync kept every stdout line the check wrote, and the check's process tree had no memory cap.

The launcher-side mitigation is in progress on fix/nup-toc-memory (base 6887d57c): a 176-byte header preflight that refuses a TOC that cannot fit the file or is far larger than a game dump's before any tool starts, a hard RLIMIT_AS inherited by make_game.py and nx2/nup.py on Linux, and a bounded output ring. No PR yet; nothing built or run yet.

@dyst owns the nx2/nup.py fix, and I am not touching it: this is only the launcher's side.

Root cause measured on the launcher side (no game data attached): - The check spawns `make_game.py --check`, which runs Longshot's `nx2/nup.py`, and `Nup.__init__` (`nx2/nup.py:143-159`) trusts the table of contents' u64 counts and offsets before validating them: `meta = f.read(0x80 + strings offset + strings size)` reads up to the whole file, `self.strings = meta[...]` slices a second near-full copy, and then the titles/dirs/files/child lists are built per entry. - A sane 25.6 GB dump of this game parses at **256 MiB peak** (36.8 MB TOC, 2 titles, 1,199 dirs, 372,587 files) — constant in the 25.6 GB of payload. A corrupt TOC (a 64 MiB synthetic with the same header fields wrong) peaked at **147 MiB = 2.3× the file size**; at 25.6–27 GB that is the **~57–59 GiB** in the report. - The launcher had no bound of its own here: `CheckAsync` kept every stdout line the check wrote, and the check's process tree had no memory cap. The launcher-side mitigation is in progress on `fix/nup-toc-memory` (base `6887d57c`): a 176-byte header preflight that refuses a TOC that cannot fit the file or is far larger than a game dump's before any tool starts, a hard `RLIMIT_AS` inherited by `make_game.py` and `nx2/nup.py` on Linux, and a bounded output ring. No PR yet; nothing built or run yet. @dyst owns the `nx2/nup.py` fix, and I am not touching it: this is only the launcher's side.
Contributor

Launcher side, now with tests and a run — no game launch, no game data attached. PR:
MagicBeanDev/LongshotLauncher#252

Before/after, same read. nx2/nup.py:143-159 reads meta = f.read(0x80 + strings offset + strings size) (up to the
whole file) and then copies the names again with self.strings = meta[...], before any count is checked:

old path (nx2/nup.py) this branch (Core/NupIndex.cs)
the real 25,622,267,860-byte dump 258.5 MiB peak (parses) 176 bytes read, accepted in 1.8 ms
64 MiB header of the report's shape 148.3 MiB peak = 2.32× the file 176 bytes, refused in <0.01 ms
25.6 GB sparse file, names claiming 25 GB read + names copy = 50.0 GB = 46.6 GiB before records; MemoryError at nx2/nup.py:143 under ulimit -v 2 GiB, OOM-killed under MemoryMax=2G 176 bytes, refused in 0.02 ms

So the measured multiplier is 2.32× on a file of the same shape: at 25.6 GB that is the 59.1 GiB in the screenshot
(the sparse file is a header and a hole — no game data, and it never leaves this PC).

Fix — two commits on fix/nup-toc-memory, base 6887d57c:

  • 32b848fe — Core/NupIndex.cs reads 0xB0 = 176 bytes before any tool starts and refuses a TOC that cannot fit the
    file or is far larger than a game dump's (256 MiB TOC, 64 MiB names, 2.5 M files), saying "damaged" or "incomplete";
    MakeGameRun.Bounded runs the check under an inherited RLIMIT_AS (half the PC's memory, 1–2 GiB) through bash
    ulimit -v, so make_game.py and the nx2/nup.py it starts cannot grow past it; CheckAsync keeps the check's last
    512 lines, not every line.
  • b372d00 — a fix the suite caught: with bash in front of the check, a missing tool no longer made Process.Start
    fail, so a run said "stopped without saying why (127)" and blamed the file. A program that is not there is now left
    unwrapped, so the answer is this PC's again — tests/launcher_core's "Tools that do not start: this PC's, not the
    file's" is what caught it, and a new check holds the rule.

Tests (built from Core/ at b372d00):

  • tests/launcher_core — 2704 checks passed, 0 warnings, 0 errors, including the new NupIndexChecks (sound dump
    accepted from 176 bytes; a 1 TiB header with names past its TOC refused from 176 bytes; every count/offset bound
    refused; the wizard reading NupIndex.Why before it starts the tools).
  • Tooling's tests/test_release.py — 42 tests, OK.
  • python -I tests/test_launcher_core.py still stops at its translation gate: 48 "left over" texts, the same 48 with the
    same texts on main
    (6887d57), which is what @dyst's open #246 fixes. This branch changes no catalog text; it is red
    on main and here alike.

The nx2/nup.py fix itself is @dyst's and is untouched: this is only what the launcher can do — never start the tools on a
header it can prove is wrong, and cap what the tools can take.

Launcher side, now with tests and a run — no game launch, no game data attached. **PR: https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/252** **Before/after, same read.** `nx2/nup.py:143-159` reads `meta = f.read(0x80 + strings offset + strings size)` (up to the whole file) and then copies the names again with `self.strings = meta[...]`, before any count is checked: | | old path (`nx2/nup.py`) | this branch (`Core/NupIndex.cs`) | |---|---|---| | the real 25,622,267,860-byte dump | 258.5 MiB peak (parses) | **176 bytes** read, accepted in 1.8 ms | | 64 MiB header of the report's shape | **148.3 MiB peak = 2.32×** the file | **176 bytes**, refused in <0.01 ms | | 25.6 GB sparse file, names claiming 25 GB | read + names copy = 50.0 GB = 46.6 GiB before records; **`MemoryError` at `nx2/nup.py:143`** under `ulimit -v 2 GiB`, **OOM-killed** under `MemoryMax=2G` | **176 bytes**, refused in 0.02 ms | So the measured multiplier is 2.32× on a file of the same shape: at 25.6 GB that is the **59.1 GiB** in the screenshot (the sparse file is a header and a hole — no game data, and it never leaves this PC). **Fix** — two commits on `fix/nup-toc-memory`, base `6887d57c`: - `32b848fe` — `Core/NupIndex.cs` reads **0xB0 = 176 bytes** before any tool starts and refuses a TOC that cannot fit the file or is far larger than a game dump's (256 MiB TOC, 64 MiB names, 2.5 M files), saying "damaged" or "incomplete"; `MakeGameRun.Bounded` runs the check under an inherited `RLIMIT_AS` (half the PC's memory, 1–2 GiB) through bash `ulimit -v`, so `make_game.py` and the `nx2/nup.py` it starts cannot grow past it; `CheckAsync` keeps the check's last 512 lines, not every line. - `b372d00` — a fix the suite caught: with bash in front of the check, a *missing* tool no longer made `Process.Start` fail, so a run said "stopped without saying why (127)" and blamed the file. A program that is not there is now left unwrapped, so the answer is this PC's again — `tests/launcher_core`'s "Tools that do not start: this PC's, not the file's" is what caught it, and a new check holds the rule. **Tests** (built from `Core/` at `b372d00`): - `tests/launcher_core` — **2704 checks passed**, 0 warnings, 0 errors, including the new `NupIndexChecks` (sound dump accepted from 176 bytes; a 1 TiB header with names past its TOC refused from 176 bytes; every count/offset bound refused; the wizard reading `NupIndex.Why` before it starts the tools). - Tooling's `tests/test_release.py` — **42 tests, OK**. - `python -I tests/test_launcher_core.py` still stops at its translation gate: **48 "left over" texts, the same 48 with the same texts on `main`** (`6887d57`), which is what @dyst's open #246 fixes. This branch changes no catalog text; it is red on `main` and here alike. The `nx2/nup.py` fix itself is @dyst's and is untouched: this is only what the launcher can do — never start the tools on a header it can prove is wrong, and cap what the tools can take.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#1525
No description provided.