EsoErik

Wednesday, January 6, 2016

 

Making PyCharm 5.0.3 and CLion 1.2 run in 30-bit color mode

In 30-bit color mode on Linux, a fresh PyCharm 5.0.3 installation fails to start:

[06:33 PM][ehvatum@heavenly:~/pycharm-community-5.0.2/bin]> ./pycharm.sh  
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[    571]  ERROR - llij.ide.plugins.PluginManager - Unsupported bit depth: 30
sun.java2d.InvalidPipeException: Unsupported bit depth: 30
       at sun.java2d.x11.X11SurfaceData.getSurfaceType(X11SurfaceData.java:611)
       at sun.java2d.x11.X11SurfaceData.getSurfaceType(X11SurfaceData.java:516)
       at sun.awt.X11GraphicsConfig.getSurfaceType(X11GraphicsConfig.java:178)
       at sun.java2d.xr.XRSurfaceData.createData(XRSurfaceData.java:235)

...

Workaround: add -Dsun.java2d.opengl=true to PyCharm's java call.  This can be done by editing pycharm.sh; relevant snippet:

# ---------------------------------------------------------------------
# Run the IDE.
# ---------------------------------------------------------------------
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JAVA_BIN" \
 $AGENT \
 "-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" \
 -classpath "$CLASSPATH" \
 $VM_OPTIONS "-Djb.vmOptionsFile=$vm_options_file" \
 "-XX:ErrorFile=$HOME/java_error_in_PYCHARM_%p.log" \
 -Djb.restart.code=88 -Didea.paths.selector=PyCharm50 \
 -Dsun.java2d.opengl=true \
 $IDE_PROPERTIES_PROPERTY \
 $IDE_JVM_ARGS \
 com.intellij.idea.Main \
 "$@"

This trick also works for running CLion in 30-bit mode.  It presumably works with the other JetBrains IDEs, though I have not verified this.

Update: this workaround allows JetBrains IDEs to start in 30-bit mode, but they soon crash due to absolutely idiotic bugs in sun.java2d.opengl.  Oh well.  I guess I'll just delete all JetBrains stuff, never buy any of their products, and spread the word far and wide that they're basically retarded.  Until they fix this - which they never will, because the problem lies in the Oracle Java shit stack.  Nonetheless, the fault remains with JetBrains for going with Java.  Who could have possibly predicted that would be problematic?  Yeah, pretty much anybody.
Comments:

Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

July 2009   August 2009   September 2009   October 2009   November 2009   December 2009   January 2010   September 2010   December 2010   January 2011   February 2011   April 2011   June 2011   August 2011   February 2012   June 2012   July 2012   August 2012   October 2012   November 2012   January 2014   April 2014   June 2014   August 2014   September 2014   October 2014   January 2015   March 2015   April 2015   June 2015   November 2015   December 2015   January 2016   June 2016   August 2016   January 2017   March 2017   April 2018   April 2019   June 2019   January 2020  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]