IDE crashes on MacOS 10.15 Catalina

Symptoms

  • MacOS 10.15 Catalina is installed.

  • PhpStorm or any other IDE crashes with the following error in java_error_in_<product>_<PID>.log:

    # Problematic frame:
    # C  [CoreGraphics+0x195930]  
    ERROR_CGDataProviderCreateWithData_BufferIsNotReadable+0x10

Cause

HarfBuzz library is used by JDK in text layout. The library is interacting with Cocoa API in a way which is causing the crash on MacOS 10.15 Catalina.

Workaround

Replace JBR with the patched one using the switcher:

If the IDE could not be started use the following method to change JBR (this example is for IntelliJ IDEA):

sudo tar -C /Library/Java/JavaVirtualMachines/ -xvf jbrsdk-8u212-osx-x64-b1596.tar.gz
echo /Library/Java/JavaVirtualMachines/jdk > ~/Library/Preferences/IntelliJIdea2019.1/idea.jdk

See this document for more details about overriding the default runtime via the "<product>.jdk" file.

Examples for PyCharm, RubyMine, PhpStorm and WebStorm products (2019.1.x version):

echo /Library/Java/JavaVirtualMachines/jdk > ~/Library/Preferences/PyCharm2019.1/pycharm.jdk
echo /Library/Java/JavaVirtualMachines/jdk > ~/Library/Preferences/RubyMine2019.1/rubymine.jdk
echo /Library/Java/JavaVirtualMachines/jdk > ~/Library/Preferences/PhpStorm2019.1/phpstorm.jdk
echo /Library/Java/JavaVirtualMachines/jdk > ~/Library/Preferences/WebStorm2019.1/webstorm.jdk

Additional details regarding the problem are described in the scope of this YouTrack ticket.

10 comments

As the IDE stays 2sec before closing, I tried the terminal step but it didnt worked. It just created a file called "PhpStorm2019.jdk" in ~/Library/Preferences/PhpStorm2019.1 but I don't see how to link it with JBR folder

Edited by Jeremie Lachkar
1

See https://intellij-support.jetbrains.com/hc/articles/206544879 for the details. You just put the path to the JBR installation directory into that file. Note that <product> for PhpStorm would be just "phpstorm", so the file name would be "phpstorm.jdk".

0

Created file "phpstorm.jdk", placed it into /Users/myname/Library/Preferences/PhpStorm2019.1/ and wrote into it /Users/myname/Downloads/jdk (root path of the JBR8 extracted), restarted IDE but still doesn't work ...

0

Try running PhpStorm from the Terminal to see which JDK is chosen and why:

export IDEA_LAUNCHER_DEBUG=true
/Applications/PhpStorm.app/Contents/MacOS/phpstorm
0

Thank you for your answers. The commands give this :

2019-07-16 20:38:25.995 phpstorm[1183:32154] allVms required 1.8*,1.8+

2019-07-16 20:38:25.997 phpstorm[1183:32154] Found Java Virtual Machines:

2019-07-16 20:38:25.997 phpstorm[1183:32154] /Applications/PhpStorm.app/Contents/jdk

2019-07-16 20:38:25.997 phpstorm[1183:32154] Required VMs: 1.8*,1.8+

2019-07-16 20:38:25.997 phpstorm[1183:32154] Chosen VM:

2019-07-16 20:38:25.998 phpstorm[1183:32154] /Applications/PhpStorm.app/Contents/jdk

2019-07-16 20:38:25.999 phpstorm[1183:32162] Value of PHPSTORM_VM_OPTIONS is (null)

2019-07-16 20:38:25.999 phpstorm[1183:32162] fullFileName is: /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions

2019-07-16 20:38:25.999 phpstorm[1183:32162] fullFileName exists: /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions

2019-07-16 20:38:25.999 phpstorm[1183:32162] Processing VMOptions file at /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions

2019-07-16 20:38:26.000 phpstorm[1183:32162] Reading at /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions OK

2019-07-16 20:38:26.000 phpstorm[1183:32162] Done

0

Please submit a ticket to support with the logs directory attached so that we can investigate it further.

0

Sorry that was my fault, thank you this workaround works !! :) 

0

Thanks for the workaround, its not crashing (that often) now. 

Crashing alot while: copy/paste file to a folder / having power safe mode off

0

Running into the same problem with AppCode 2019.2 beta (latest version) on Catalina public beta 4.

Launching AppCode with `IDEA_LAUNCHER_DEBUG=true` from the command line reveals:

$ export IDEA_LAUNCHER_DEBUG=true
$ ~/Library/Application\ Support/JetBrains/Toolbox/apps/AppCode/ch-1/192.5728.22/AppCode\ 2019.2\ EAP.app/Contents/MacOS/appcode

2019-07-18 19:49:07.204 appcode[29358:669705] allVms required 1.8*,1.8+
2019-07-18 19:49:07.205 appcode[29358:669705] Found Java Virtual Machines:
2019-07-18 19:49:07.205 appcode[29358:669705] /Users/stuart/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-1/192.5728.22/AppCode 2019.2 EAP.app/Contents/jbr
2019-07-18 19:49:07.205 appcode[29358:669705] Required VMs: 1.8*,1.8+
2019-07-18 19:49:07.205 appcode[29358:669705] Chosen VM:
2019-07-18 19:49:07.205 appcode[29358:669705] /Users/stuart/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-1/192.5728.22/AppCode 2019.2 EAP.app/Contents/jbr
2019-07-18 19:49:07.207 appcode[29358:669713] Value of APPCODE_VM_OPTIONS is (null)
2019-07-18 19:49:07.207 appcode[29358:669713] Processing VMOptions file at /Users/stuart/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-1/192.5728.22/AppCode 2019.2 EAP.app.vmoptions
2019-07-18 19:49:07.207 appcode[29358:669713] Reading at /Users/stuart/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-1/192.5728.22/AppCode 2019.2 EAP.app.vmoptions OK
2019-07-18 19:49:07.208 appcode[29358:669713] Done
Error occurred during initialization of VM
**Could not find agent library yjpagent on the library path, with error: dlopen(libyjpagent.dylib, 1): image not found**

The solution (for me, at least) was to delete the line:

`-agentlib:yjpagent=probe_disable=*,disablealloc,disabletracing,onlylocal,disableexceptiontelemetry,delay=10000,sessionname=AppCode2019.1` from

from `/Users/stuart/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-1/192.5728.22/AppCode 2019.2 EAP.app.vmoptions`

 

Edited by Stuartro
0

@Stuartro, your case is not related to the problem described in this document. Profiler agent was moved to a different location and your .vmoptions file was not adjusted. It looks like the issue is caused by the Toolbox settings migration, our team will investigate it, thanks for the report.

0

Please sign in to leave a comment.

Have more questions?

Submit a request