Skip to content

🐛The requested operation cannot be performed on a file with a user-mapped section open in v0.49.0 #4489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kimsagro1 opened this issue Apr 16, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@kimsagro1
Copy link

Describe the bug

I downloaded version 0.49.0 and now when launching lazygit I get the following error message

2025/04/16 10:10:44 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*fs.PathError open C:\Users\USERNAME\AppData\Local\lazygit\state.yml: The requested operation cannot be performed on a file with a user-mapped section open.
/home/runner/work/lazygit/lazygit/pkg/app/app.go:55 (0x10046df)
/home/runner/work/lazygit/lazygit/pkg/app/entry_point.go:168 (0x1006885)
/home/runner/work/lazygit/lazygit/main.go:23 (0x1007ad8)
/opt/hostedtoolcache/go/1.24.2/x64/src/internal/runtime/atomic/types.go:194 (0x7c679d)
/opt/hostedtoolcache/go/1.24.2/x64/src/runtime/asm_amd64.s:1700 (0x8019a1)

I can't see anything locking state.yml.

If I delete the C:\Users\USERNAME\AppData\Local\lazygit and start lazygit then it works but if I exit lazygit and then launch lazygit again I get the error again.

To Reproduce
Go into any git repo and launch lazygit

Version info:
Run lazygit --version and paste the result here

> lazygit -v
commit=5f809809dda06c98e51743ac8c19af6a26a5984b, build date=2025-04-14T08:30:35Z, build source=binaryRelease, version=0.49.0, os=windows, arch=amd64, git version=2.49.0.windows.1

Run git --version and paste the result here

> git --version
git version 2.49.0.windows.1

Additional context
This appears to only be an issue with v0.49.0. v0.48.0 is working for me.

@kimsagro1 kimsagro1 added the bug Something isn't working label Apr 16, 2025
@stefanhaller
Copy link
Collaborator

I can't reproduce this on my Windows box. Also, I don't see anything in the diff between 0.48 and 0.49 that could make a difference to how we read or write state.yml.

My suspicion is that there is some other process that keeps the file open for some reason. See if this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants