Problem
An IntelliJ-based IDE (IntelliJ IDEA, WebStorm, PyCharm, and others) does not start on macOS. No IDE window opens. The failure remains after a cache cleanup or a reset of custom VM options.
When the IDE launcher runs from Terminal, it prints one of these errors:
[ERROR] xplat_launcher::java: [JVM] main method failed: NullPtr("Unexpected exception")
[ERROR] xplat_launcher::java: [JVM] main method failed: Java exception was thrown
After a reinstall, the IDE starts again. On some machines, the error comes back after days or weeks.
Cause
Files inside the IDE application bundle were modified or damaged after installation. The JVM starts, but the IDE cannot load its main class from a damaged JAR file.
Third-party security or antivirus software that modifies files inside the application bundle is a confirmed cause. Disk or memory faults can have the same effect.
Resolution
-
Check whether the installation is damaged. Run the command below in Terminal. Replace the path with the path of the IDE application bundle. Installations managed by the Toolbox App are usually in
~/Applications.codesign --verify --deep --strict --verbose=2 "/Applications/IntelliJ IDEA.app"An intact installation reports
valid on diskandsatisfies its Designated Requirement. A damaged installation reports afile modifiedline for each changed file, for example:file modified: /Applications/IntelliJ IDEA.app/Contents/lib/intellij.platform.ide.jarTo see the Java exception behind the launcher error, start the IDE with launcher debug logging as described in How to start IDE from the command line. A damaged JAR file can appear as an exception in
com.intellij.util.lang.ImmutableZipFile, for examplejava.lang.IllegalArgumentException: newPosition > limit. -
Reinstall the IDE from its download page on jetbrains.com or with the Toolbox App. Settings, plugins, and projects are stored outside the application bundle, so replacing the application does not remove them. See Directories used by the IDE to store settings, caches, plugins and logs.
-
Prevent the files from being modified again. Check the logs of the security or antivirus software for actions on files in the IDE application bundle. If the software changed them, exclude the IDE application bundle from scanning in that software. On a Mac managed by an organization, ask the IT or security team to add the exclusion.
Comments
0 comments
Please sign in to leave a comment.