PHPStorm keeps on crashing (macOS) and I lose my workspace state

Hi!

Since some update (don't know if from macOS or phpStorm) it crashes 1-2x times a day. That byself would not be so annoying, if I didn't lose the opened files and projects at the time of the crash.

It always reverts to the state of open projects and files of the last time where I closed phpStorm normally.

Is there any way to save the list of open projects and files on an interval? I often work on specific files during a longer period, and needing to re-open and find all the files I was working on is a chore. Also I don't want to close and reopen phpStorm manually every time.

(Of course, fixing the crashes would even be better, I sent a couple of crash dumps the past days already)

Thanks for any ideas!

0
10 comments

Hi Gh,

Crash dumps are anonymized and can not be associated with you or with any other PhpStorm user.
Could you please collect logs from Help | Collect Logs and Diagnostic Data and upload them here - https://uploads.jetbrains.com/ - so we can try to define the root cause of the issue?

0

Hi Anastasiia Zyrianova - thanks for getting in touch. I've just uploaded this as: 2024_05_28_bCHFBBBMgLMCa2GkF66SKs

Happy to hear back from you, this is really a nagging thing for me :)

0

Gh, could you please add -Dsun.java2d.metal=false in Help | Edit Custom VM Options, restart the IDE, and check if it gets better?
The errors in the provided logs point to the following known issue: https://youtrack.jetbrains.com/issue/JBR-6817.

0

Thank you for the suggestion. I've added that (and also removed an option “-Xmx2048m” that sounded like maybe memory restrictions could apply?). Will let you know here if the crashes continue! Very happy about your quick reaction here, awesome! :)

0

There is no need to remove `-Xmx2048m`. If you are experiencing slowdowns, you may want to increase the memory heap via Help | Change Memory Settings. However, I would recommend to leave it as is.

Please keep me posted :) 

0

Hi Anastasiia Zyrianova !

Wanted to check back here: Since the change I haven't had a single crash now. Seems that did the trick, many thanks! :)

I don't experience specific negative or performance drawbacks, so I assume I can keep this metal-based rendering permanently disabled?

0

Hi Gh,
Glad to hear! Thank you for letting me know :)
The issue should have already been fixed for the following JBR builds - jbr17.1207.14, jbr21.427.2, jr21.446.1. So, if you use one of them, the VM option -Dsun.java2d.metal=false should be reverted.

0

Thanks again Anastasiia Zyrianova for the quick reply.

I just updated PHPStorm and its “About” screen shows:

PhpStorm 2024.1.2
Build #PS-241.17011.119, built on May 28, 2024
Runtime version: 17.0.11+1-b1207.24 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.5
 

I'm not sure what “JBR” and “JR” means, probably “Java Runtime”? On my shell “java --version” gives me:

$ java --version
openjdk 11.0.23 2024-04-16
OpenJDK Runtime Environment Homebrew (build 11.0.23+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.23+0, mixed mode)

0

Hi Gh,

It should have already been fixed in 17.0.11+1-b1207.24. Please try to remove the VM option, restart PhpStorm, and observe the IDE's behavior for some time.

0

To address PhpStorm crashes and prevent loss of open files:

  1. Enable Auto-Save:
    • Go to Preferences > Appearance & Behavior > System Settings.
    • Check Save files on frame deactivation and Save files automatically if application is idle for ... sec.
  2. Increase Memory Allocation:
    • Go to Help > Edit Custom VM Options.
    • Add:

      diff

      Copy code

      -Xms512m -Xmx2048m -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC

  3. Update Software:
    • Ensure both PhpStorm and macOS are updated to the latest versions.
  4. Disable Problematic Plugins:
    • Go to Preferences > Plugins.
    • Disable non-essential plugins.
  5. Check Logs:
    • Go to Help > Show Log in Finder.
    • Look for errors or warnings in the logs.
  6. Backup Configuration:
    • Manually back up ~/Library/Application Support/JetBrains/PhpStorm<version>.

If issues persist, contact JetBrains support with detailed logs.

0

Please sign in to leave a comment.