flathub / com.jetbrains.IntelliJ-IDEA-Ultimate

https://flathub.org/apps/details/com.jetbrains.IntelliJ-IDEA-Ultimate
13 stars 7 forks source link

lock file is not removed on system shutdown #186

Open Spikhalskiy opened 2 months ago

Spikhalskiy commented 2 months ago

Idea is installed on Ubuntu from Flathub repo. If I restart the system with Idea running, the lock file (~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea2024.1/.lock) is not cleaned up and requires a manual deletion after a startup. The problem doesn't reproduce if the process is killed using kill.

Ubuntu 24.04

IntelliJ IDEA 2024.1 (Ultimate Edition) Build #IU-241.14494.240, built on March 28, 2024 Runtime version: 17.0.10+8-b1207.12 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 6.8.0-31-generic Registry: ide.browser.jcef.sandbox.enable=false ide.experimental.ui=true Non-Bundled Plugins: Pythonid (241.14494.314) com.intellij.ml.llm (241.14494.320) Kotlin: 241.14494.240-IJ Current Desktop: ubuntu:GNOME

x80486 commented 2 months ago

@Spikhalskiy, this is a known issue with JetBrains' IDEs — not something specific with the Flatpak distribution.

I thought it was solved, but looks like it reappears sometimes :thinking:

I would provide the details in their issue tracker instead.

Spikhalskiy commented 2 months ago

The report in the Idea issue tracker: https://youtrack.jetbrains.com/issue/IDEA-352736/IDEA-doesnt-remove-.lock-file-on-system-restart-with-Ubuntu-24.04

Spikhalskiy commented 1 month ago

I tested a vanilla Idea installation from tar.gz as instructed by Jetbrains support and the issue doesn't reproduce. So it's specific to Flatpack installation only. Reopening.

x80486 commented 1 month ago

I think this issue can be reproduced with any release — not just Flatpak.

I use Flatpak at home and the Toolbox release at work, and this issue occurs in both environments from time to time. Although I can't consistently reproduce it under normal usage, it almost always happens if the operating system freezes or restarts abruptly.

If you find a way to consistently reproduce this issue, share the steps and I will investigate further. Currently, I'm unable to attribute this problem to a specific distribution format — it seems related to the IDE's behavior.

Spikhalskiy commented 1 month ago

Whenever I restart (normally, through Power -> Restart) Ubuntu 24.04 with Idea installed through Flatpack launched, I get the error after startup with 100% confidence. Not probabilistic. On 3 different systems. I now switched to the plain tar.gz installation and tried the exact steps that repro the problem for Flatpack about 3 times at random times / states and it didn't happen.

x80486 commented 1 month ago

Indeed. I'm aware of that one, that's what I meant for I can't consistently reproduce it under normal usage, it almost always happens if the operating system freezes or restarts abruptly.

Solving this would probably require some changes in https://github.com/Lctrs/jetbrains-flatpak-wrapper because that's what most, if not all, JetBrains IDEs are currently using for Flatpak.

I'll try to create an issue in that repository and see if it could be solved at that level, otherwise the entire startup routine should be reverted and check that it receives the correct signal from the operating system at that phase.