aptana/studio3 — pull request #92 by pinnamur (2013-08-08 22:16:26+00:00)
Title: TISTUD-5220 Ubuntu: Appcelerator Studio freezes on launching project on android emulator

Looking at the threads stack,
- If there are any changes in the SDK, then JNotifyAdapterLinux locks its ide2Data object and then, invoke reset() method - which actually tries to acquire lock of SDKLocator instance.
- If SDKLocator is not initialized, then it locks the SDKLocator instance and then, creates file watcher which actually tries to acquire lock on id2Data object.

Since the hierarchy of the locks is inconsistent, it ends up deadlock. The fix is to make sure that JNotifyAdapterLinux does not lock its object before it invokes SDKLocator reset method - that will make sure the locking hierarchy is consistent and avoids deadlock.