Fixing startup/freezing issues with IntelliJ/Android-Studio on Yosemite on case-sensitive volumes

I spent the better part of this morning wrestling with IntelliJ and Android Studio after upgrading to OS X Yosemite on Friday. Maybe this can save someone some headaches.

For some reason I was unable to start both IDEs. Each time they started it took little time until they froze. Curiousely the programs did not migrate to the “app not responding”-state for quite some time. Instead they just burned up CPU-time on one of my cores.

Futile Attempts

I tried everything that came to my mind (and the minds of others whose unrelated bugreports i found), including:

  • Removing JDK 7, only using JDK 8 instead
  • Removing JDK 8, only using JDK 7 instead
  • Deleting all kinds of Caches for Grails, the IDE
  • Reinstalling the JDK, Android Studio and Intellij, the Android SDK
  • Re-signing the app-bundles to work with the OS-Sandboxing (which I also turned off)


It did not seem to be a general issue since my colleagues installation on Yosemite worked just fine. At last I created a new user on my MacBook who could run Android Studio without problems. This helped me to exclude the installed applications, the OS as well as the JDK as likely causes.

The final hint came from the Android Studio logfile under ~/Library/Logs/AndroidStudioBeta/idea.log which told me exactly what its problem was:

2014-10-20 20:09:01,232 [  74085]  ERROR - wvfs.impl.VirtualDirectoryImpl - PersistentFS returned duplicate file names(Steam,steam) ignoreCase: true SystemInfo.isFileSystemCaseSensitive: false SystemInfo.OS: Mac OS X 10.10 wasChildrenLoaded: false in the dir: file:///Users/Martin/Desktop/old_homedir/library/Application Support; children: [AAV (827723), [...a bunch of other files and their inode numbers in that dir...]], SyncServices (827817)] 
    at com.intellij.openapi.diagnostic.Logger.error(
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl$
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl$
    at java.util.TimSort.binarySort(
    at java.util.TimSort.sort(
    at java.util.Arrays.sort(
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.getChildren(
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(
    at com.intellij.compiler.impl.TranslatingCompilerFilesMonitor$MyVfsListener.propertyChanged(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.intellij.util.EventDispatcher.dispatch(
    at com.intellij.util.EventDispatcher.access$100(
    at com.intellij.util.EventDispatcher$1.invoke(
    at com.sun.proxy.$Proxy13.propertyChanged(Unknown Source)
    at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.fireAfter(
    at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.after(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(
    at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(
    at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(
    at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(
    at com.intellij.util.messages.impl.MessageBusImpl.access$000(
    at com.intellij.util.messages.impl.MessageBusImpl$1.invoke(
    at com.sun.proxy.$Proxy48.after(Unknown Source)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEvents(
    at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEventsInWriteAction(
    at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl$
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(
    at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEvents(
    at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl$1$
    at com.intellij.openapi.application.impl.LaterInvocator$
    at java.awt.event.InvocationEvent.dispatch(
    at java.awt.EventQueue.dispatchEventImpl(
    at java.awt.EventQueue.access$400(
    at java.awt.EventQueue$
    at java.awt.EventQueue$
    at Method)
    at java.awt.EventQueue.dispatchEvent(
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(
    at com.intellij.ide.IdeEventQueue._dispatchEvent(
    at com.intellij.ide.IdeEventQueue.dispatchEvent(
    at java.awt.EventDispatchThread.pumpOneEventForFilters(
    at java.awt.EventDispatchThread.pumpEventsForFilter(
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(
    at java.awt.EventDispatchThread.pumpEvents(
    at java.awt.EventDispatchThread.pumpEvents(

The reason for Android Studio not starting was that I created a not-really duplicate file then I created a Symlink from the directory ~/Application\ Support/steam to the directory ~/Application\ Support/Steam in my old homedirectory (some old backup). This is a workaround for Valve being unable to provide a version of Steam working on case-sensitive volumes.


Now I have absolutely no idea why Android Studio would be reading anything at all from this seemingly arbitrary directory at all nor why this became a problem just now, after updating to Yosemite. Somehow to explaining Android Studio that it was running on a case-sensitive volume by editing IDE_INSTALL_DIR\bin\ to include an entry finally did the trick.

Lessons learned

What I could have done to save me some trouble:

  • separate accounts for work and play (of course not an option ;))
  • throw away months old backups
  • don’t try to fix proprietary software (Steam) that won’t run on your OS
  • read the f*in logfiles earlier (I’ve looked at the open files of the process a dozen times, prompting me to remove all those caches)

I still would love to know why all this happened today, why Android Studio cannot determine case-sensitivity by itself and what in the heck it is doing scanning my home-directory but for now I am done with this s..special problem.

Edit: There seems to be a related bug report.

Swift has tail call optimization

The other day I asked myself how I would build trampoline in Swift. I tried to implement a simple recursive function that summed up all numbers in a list.

I was unable to provoke a stack overflow error. The answer came from the errors namesake page. Swift indeed seems to implement tail call optimization, although I could not find anything word on that from Apple.

The Checker Framework

Are you tired of null pointer exceptions, unintended side effects, SQL injections, concurrency errors, mistaken equality tests, and other run-time errors that appear during testing or in the field?

The Checker Framework enhances Java’s type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins (“checkers”) that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

The Checker Framework.


A normal diff between 2 text files enables you to quickly determine 2 things – Whether the two input files are identical, and if not, exactly where the differences lie.

A Perceptual Diff (pdiff) allows you to do the same with 2 image files and quickly identify whether the two images are identical, and highlight areas where the 2 images mismatch. pdiffy does exactly this.

via kennychua/pdiffy.