[Bug] Streaming: resuming a save state restores the newest in-game save, not the one saved with that state (GameCube hangs on its next save)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Trace state claiming from POST /api/streaming/sessions through saves.restorable_for and newest_restorable, then inspect how the selected state_id and optional save_id reach the stream session. The reproduction identifies the required behavior: without save_id, choose the archive filed at the same exit as the state; with no state, keep the newest archive as the default. Verify that resuming the saved state uploads its matching archive and that Dolphin can complete an in-game save.
Written by the indexing model from the issue text.
Description
RomM version
5.5.0-beta.2
Describe the bug
With emulator streaming (webstation), claiming a session with state_id and no save_id restores the user's newest saves archive (saves.restorable_for -> newest_restorable), not the archive filed at the same exit as the picked state. When the in-game save is newer than the state, the game boots from the state with a memory card that does not match what the game has in RAM.
On GameCube (Dolphin, GCI folder card) this hangs the game: the next in-game save never finishes. The game stops (Dolphin idle, no log output, UsePanicHandlers=False), and a save-and-exit from that point stores a state of the hung game, which then shows "Decompressing State..." forever on every resume.
The web player hits this too: its stream page only sends save_id when the container has supports_save_picker and the user picked a save, so on GameCube (no save picker) a state resume always gets the newest archive.
To Reproduce
- Stream a GameCube game (Pikmin 2, USA), play, Save and quit. RomM stores state A and, a few seconds later, saves archive A.
- Resume from state A, save in-game (memory card), then quit without saving. RomM stores saves archive B (newer card), no new state.
- Resume from state A again. RomM uploads archive B (
uploaded saves to container, file=<archive B>), Dolphin loads state A. - Save in-game. The game hangs at the save. Save and quit now stores a state that never loads.
Expected behavior
A state resume restores the saves archive that belongs with that state (the one filed at the same exit), so the state and the memory card / save files match. The newest archive is the right default only when no state is picked.
Screenshots
n/a (log lines and timings below)
Server (please complete the following information):
- OS: Docker on a UGREEN NAS
- Version: RomM 5.5.0-beta.2, webstation (linuxserver
:rommtag), broker 0.15.3, Dolphin from the webstation image
Client (please complete the following information):
- Device: Google TV Streamer, custom client using
POST /api/streaming/sessions - OS: Android 14
- Browser: n/a
- Version: n/a
Additional context
Timings from the run: state at 00:04:51 with archive at 00:04:54 (same exit); in-game card save at 00:06:38 (archive at 00:15:26 after a quit without saving); every resume of the 00:04:51 state afterwards uploaded the newer archive and hung on the next in-game save. Resuming the same state with save_id of the 00:04:54 archive gives a matching card.
Suggested fix: when state_id is given and save_id is not, restore the archive filed at the same exit as that state (for example by recording the archive id on the state at pull time, or by picking the archive created right after the state). Clients can work around it today by sending that save_id themselves, which is what my client now does.
Related: #5544 (restore uses only the newest archive).
- Dominant language
- Python
- Stars
- 13.3k
- Forks
- 747
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 207
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rommapp/romm
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rommapp/romm#5857 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rommapp/romm#4178 · 1 reaction ·
Maintainers usually reply within 1 day
-
[UI/UX] Misaligned number in searchPossibly taken @NevesHenry claimed this today. Openui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
[Bug] Games do not show up in search if more than 2 letters are used.Possibly taken @andest01 claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
rommapp/romm#5853 · 7 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
web-push-libs/pywebpush#216 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AgriciDaniel/claude-seo#572 ·
Maintainers usually reply within 5 days
-
area:print-dispatch
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
area: docs domain: technical-writing good first issue type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Deepak3699/Ai_Mentor#919 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day