Another user originally reported this on the General forum.
I am having the same problem and I think it belongs here in Technical Support so (hopefully) the devs will see it.
The “subl” command doesn’t work for me unless I already have a ST2 window open.
If I issue “subl ” and there is not an ST2 window open, I get a blank untitled window and a message like the following is logged:
2/24/12 1:12:09.002 PM Sublime Text 2: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
Scenarios:
-
App is not running. Type “subl ”. Result: blank “untitled” window
-
App is running but no windows are open. Type “subl ”. Result: blank “untitled” window
-
App is running and at least one window is open. Type “subl ”. Result: success
Things I have tried:
-
restarting
-
rm’ing and re-creating my “~/bin/subl” symlink.
-
deleting my “~/Library/Application Support/Sublime Text 2” folder (i.e., stock configuration)
I am using Lion 10.7.3 and ST 2 build 2181.
This old message on cocoa-dev (by Apple employee Chris Kane) indicates that errors of this kind can be caused by timing-specific race conditions that can vary between machines. So, in case it matters, my configuration is: MacBook Pro 15-Inch, Mid 2010, 2.66 GHz Core i7, 8 GB RAM, GeForce GT 330M 512 MB. 500 GB Hitachi HDD (not SSD).