Install and update fail at the end with "Another editor is changing this profile" since Longshot nightly-1179 #426
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher#426
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since Longshot nightly-1179, every Launcher install or update fails at its last step with "Another editor is changing this profile. Try again in a moment." Retrying fails the same way.
What a player saw
An update from nightly-981 to nightly-1179 with Launcher nightly-277:
The 2-second gap is the Launcher's lock wait. (
fast check: currentonly means an earlier attempt had built 1179 already.)Cause
The Launcher and Longshot's builder share
<profile>/.longshot-edit.lock, but since today they follow different rules:File::try_lock). The file is created when missing and left in place, empty, after the lock is released (builder/crates/launcher-profile/src/edit.rs). Everylongshot-builder build --profiletakes it, becauseplay::ensure_builtfirst callsmodtool::record_mods, which edits the profile.main48e2d12):src/players/profiles.rsEditLock::taketreats "the file exists" as "held", and only moves it aside when its second word is a time more than 30 seconds old. An empty file has no time, so it is never treated as stale: after 2 seconds, the error above.During an install or update, the builder runs and leaves the empty file; about 50 ms later
remember_build_options(src/game/wizard.rs) takes the profile's edit lock and fails. By then the build is in place and the version is registered under the new tag, but the build options, the game language follow, the settings patch and the cleanup of old builder downloads are skipped. Any other Launcher edit of that profile (save names, mods, language) fails the same way while the file is there, and every Play recreates it.Fix
The Launcher takes the same operating-system lock as the builder: open
.longshot-edit.lock(create it when missing),try_lockit for up to 2 seconds, leave the file in place. A file with no holder never keeps an edit out, and a crashed holder frees the lock when its process ends.Workaround until then
Deleting
.longshot-edit.lockin the profile folder (%LOCALAPPDATA%\LongshotLauncher\profiles\<profile>\by default) lets the Launcher's edits through until the builder runs again. It does not help a retried update, since the builder recreates the file just before the Launcher's step.This looks like a valid bug report. I couldn't locate the cause in the code.
The launcher code supports the reported failure: an empty
.longshot-edit.lockprevents profile edits and produces the quoted error after two seconds. This can stop installation finalization after the version has been registered. The builder code is not in this checkout, so I could not verify that nightly-1179 creates and leaves the empty file, or that every build and Play does so.For maintainers
Checked Launcher
src/players/profiles.rslines 98–132:EditLock::takeusespersist_noclobber, reads a PID/timestamp record to detect stale locks, and emits the quoted error after a two-second deadline. Longshot builderbuilder/crates/launcher-profile/src/edit.rsdocuments OS advisory locking viaFile::try_lock; the report identifies the lock file remaining empty after release. Report cites Longshot PR #3020 as introducing the builder change and nightly-1179 as its first release.The lock implementation is unchanged between launcher tag
nightly-277-cd9aad02and HEAD. Blame attributes it to commit5932797. Check the builder change in Longshot PR #3020 and coordinate the shared locking protocol there; this checkout does not contain the builder implementation.Seen in the code:
.longshot-edit.lockand attempts to create it without overwriting an existing file.remember_build_options; an error there skips the subsequent cleanup.remember_build_optionstakes the profile edit lock before updating the profile, language and settings.with_edit_lockencounter the same lock behavior.Automated triage by BeanBot (gpt-6-luna). Nothing was run; a maintainer decides.