-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when changing directory in custom build system #246
Comments
Odd, can you see if the console shows something else? I did not change the way omnisharp-sublime interacts with omnisharp-roslyn. |
This comment has been minimized.
This comment has been minimized.
On my end part of the problem seems to be my buildsystem. Every time a do a build the .csproj gets overwritten. Sublime OmniSharp seems to not handle this correctly. (VScode version does not care) I will try and investigate if not overwriting the .csproj file solves this. I've removed all data, paths and names of the console output but notice this:
=============== CONSOLE OUTPUT ===============
|
@virella2385 verify that you have all the requirements installed @ALIAS-777 odd, can you try to manually execute |
This comment has been minimized.
This comment has been minimized.
Found the culprit... It's really the weirdest thing. After doing lots of test and finding out the running my build from outside Sublime worked just fine and keeps OmniSharp going, I've tested an other scenario. My build system uses cd and popd a lot and that's the problem. If you change directory in a Sublime build system then the problem occurs - omnisharp plugin reacts to this. Here is repro. test.cmd: Put this in the root of the folder you are opening.
MyBuild.sublime-build: Put this in <ST3_userdir>\Sublime Text 3\Packages\User
Set MyBuild as default build system by checking it on in: Tools -> Build System -> MyBuild ... And then execute the build: Tools -> Build This will crash OmniSharp. For now I will just workaround this by building from a console or AutoHokeys Script until this gets fixed. |
This comment has been minimized.
This comment has been minimized.
Thank you for figuring it out! I'll research the code and see if it's
the fault of this plugin or sublime.
Thank you very much! :)
…On 02.10 03:44, Alias-777 wrote:
Found the culprit... It's really the weirdest thing. After doing lots of test and finding out the running my build from outside Sublime worked just fine and keeps OmniSharp going, I've tested an other scenario. My build system uses cd and popd a lot and that's the problem. If you change directory in a Sublime build system then the problem occurs - omnisharp plugin reacts to this. Here is repro.
**test.cmd**: Put this in the root of the folder you are opening.
```
@echo off
echo Going to CD
cd ..
```
**MyBuild.sublime-build**: Put this in <ST3_userdir>\Sublime Text 3\Packages\User
```
{
"working_dir": "$folder",
"cmd": ["test.cmd"],
"shell": true
}
```
Set MyBuild as default build system by checking it on in: Tools -> Build System -> MyBuild ... And then execute the build: Tools -> Build
This will crash OmniSharp. For now I will just workaround this by building from a console or AutoHokeys Script until this gets fixed.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#246 (comment)
|
@ALIAS-777 I looked at it, doesn't seem like something I can fix sadly omnisharp-sublime/lib/helpers.py Lines 34 to 58 in 6adda05
|
@tim241 I'm not familair with python nor the internals of the sublime plugin system, but can you not just query the path the first time the function is called and store it in a variable instead of re-querying it on each call.... Does that fix it? (or perhaps in an init function?). Or is there maybe an hook (callback) when a new "project folder" opens? Then query it there and then store it. These are obviously not the most prettiest ways of doing it. but the only things changing the working directory seem to be build-systems anyways. To be honest, in my opinion sublime+omnisharp is not a great combination at this point. I'ts just unstable and frustrating to use. I will check it out in the future, perhaps things are better then. For now I will stick with VScode. (which Omnisharp impenmentation is very decent) Thanks for all your help though! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Any solution for this already? I'm having the same problem, I 'm trying to use Sublime Text 3 with Unity, I followed this tutorial: http://makegamessa.com/discussion/2879/tutorial-using-sublime-text-3-in-unity-with-intellisense-autocomplete and I'm getting this error on console: |
I'm running into same problem. Trying to use OmniSharp with Sublime for Unity, getting connection refused. |
OmniSharp: v1.9.7
Windows: 10 (BUILD: 1803)
Sublime: 3.1.1 (BUILD: 3176)
After a short period (couple of minutes) OmniSharp stops working. It states in the status bar:
This shows up in the console:
If I would direct my browser to
http://localhost:<port>
when OmniSharp is still working, then a blank page shows. After the error I get:ERR_CONNECTION_REFUSED
So it seems that Node is having problems? Or, also i've noticed that the previous version send some kind of
keep alive messages
... This version does not! Perhaps just a timeout?The text was updated successfully, but these errors were encountered: