Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SquirrelSQL render flickering in SQL view

Everything works great with SquirrelSQL except for a weird bug while using the SQL view. If I switch back to this view, type in it, click on it, or in any way interact with the SQL view, the window seems to re-render multiple times. It looks like the screen is constantly flashing. It makes typing SQL very frustrating.

I think the problem may have something to do with Java, but I have no idea. Does anyone know why Squirrel would render this window multiple times?

like image 409
SortingHat Avatar asked Sep 04 '13 15:09

SortingHat


2 Answers

So I figured it out and figured I'd leave this here for anyone else that has this problem.

RSyntax Editor causes this problem on the macbook pro with Retina display. You need to either go to a previous release that doesn't use RSyntax Editor or try and use a newer version.

You can turn off RSyntax Editor by going to Plugins and unchecking "syntax" and then clicking unload. Restart and it won't flicker.

Unfortunately this also turns off syntax highlighting.

SOURCE: http://squirrel-sql-client.10976.n7.nabble.com/SQL-editor-flickers-in-macbook-pro-retina-display-td3214.html

like image 164
SortingHat Avatar answered Sep 30 '22 18:09

SortingHat


I ran into this problem as well, and found a better solution:

  • Install JDK 7u25 (not 40 or higher, since that causes other bugs)
  • Fire up Terminal and enter the following commands:

cd /Library/Java

rm Home

sudo ln -s JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/ Home

  • Now go to Finder, right click on SQuirreLSQL.app and say 'Show Package Contents'
  • Navigate to Contents -> MacOS and edit the squirrel-sql.sh file in your editor of choice
  • Find the line that starts with IZPACK_JAVA_HOME and change the value to /Library/Java/Home
  • Save the file, restart SQuirreL and you should be able to use the RSyntax Editor again

A few notes:

  • I couldn't get this working with having just the JRE installed, that's why I opted for the JDK.
  • Obviously you can set IZPACK_JAVA_HOME to the full /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/, but creating a symbolic link is 'nicer'
  • The bugs with Update 40 or higher consists of SQuirreL executing all SQL twice(!)
like image 35
fdrijver Avatar answered Sep 30 '22 19:09

fdrijver