Sublime Forum

ST3 sometimes not opening files / folders from command line

#1

I have ST3 build 3065 and this has been happening for a long time… namely when I run “subl . -n” from command line (or just subl file.txt) the ST is brought into foreground but it’s stuff that’s already been open, not the content that is supposed to open… so in fact, nothing really happens except that windows is in foreground… when I repeat, most times, it does open on second try, but sometimes a third launch is needed…

This happens very frequently and is really bad because it breaks my flow and I have to stop, think and repeat.

Is this a known problem?

I have latest Mavericks 10.9.5… but as I said it was happening for a long time on previous versions of OSX Mavericks and ST3… for ST2 I don’t really remember, but possibly as well.

Thank you
david

0 Likes

#2

No response at all? :frowning:( This is really driving me nuts…

0 Likes

#3

Found this in Console.app

14/11/14 20:25:02,818 Sublime Text[94653]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
14/11/14 20:29:35,033 Sublime Text[94653]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
14/11/14 20:39:30,796 SIMBL Agent[843]: warning: failed to get scripting definition from /Applications/Sublime Text.app; it may not be scriptable.
14/11/14 20:39:31,066 Sublime Text[72503]: AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event ESIM/load from process ‘SIMBL Agent’/0x0-0x26026, pid=843, because it is not entitled to send an AppleEvent to this process.
14/11/14 20:39:36,479 Sublime Text[72503]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
14/11/14 20:39:45,490 Sublime Text[72503]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
14/11/14 20:40:39,191 Sublime Text[72503]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid

Also this thread from two years ago: sublimetext.com/forum/viewt … f=2&t=5137
And this big discussion with potential hasckish solution that doesn’t work reliably: github.com/SublimeText/Issues/issues/27

looks like an old problem… so could it be investigated, that would be great… thank you!

0 Likes

#4

This bug has been around for as long as I can remember.

There is a bug report on the git hub issue tracker here: https://github.com/SublimeText/Issues/issues/27#issuecomment-17714701 where some people had some workarounds using a wrapper script to retry when the failure was detected etc. however those workaround scripts tend to fall out of sync with the App and currently don’t seem to work at all.

I’ve never seen the Sublime developer even acknowledge this issue. On the surface it appears it would be so easy to fix if they cared to look into it, but since it’s not open source all we can do is hope :confused:
Though this is a minor annoyance, the fact that the bug has seen no attention in over a year makes me loose faith in this product. I think I will invest my time and energy in improving my dev environment with open source editors instead.

0 Likes