-
Notifications
You must be signed in to change notification settings - Fork 90
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
Emacs crash when start omnisharp server on windows #315
Comments
this is can be hard to debug because the crash occurs somewhere within unmanaged emacs code and hard crash bugs on emacs /should/ not be related to elisp code.. have you tried running a different emacs version and/or from a different windows emacs distribution? |
I have the same problem, tested with both Emacs 25.2.1 and Emacs 24.5.1. I also used omnisharp 4.0 and 3.9 with both versions of Emacs. |
More info here: OmniSharp/omnisharp-roslyn#647 I have not tested this personally as I currently use VS Code for csharp, but the 32-bit version of OmniSharp is supposed to be working (at least not crashing). |
@kimgronqvist — in your case the server itself is/was crashing, not emacs, right? I think in this issue people about complaining about emacs (host) crash.. Or am I wrong? |
You are not wrong, host/emacs is crashing (I found this thread after experiencing same issue). edit:
I believe that thread is also emacs crash. |
Indeed, my issue was also that Emacs crashes when you run OmniSharp from Emacs itself. Running the server from the console works fine. |
Same here.
|
ok, this seems to be happening to many people, I am trying to build emacs with msys2 on windows with "-g -O" dropping down to C is rarely fun.. |
I couldn't replicate this myself by building a new emacs.exe from source (emacs-25) branch on windows/mingw-64 in debug mode. I got a fairly complicated solution loaded and autocomplete worked for me:
This is on Windows 10 x64 Could any of you provide more details about:
|
I run the modified Emacs build from https://sourceforge.net/projects/emacsbinw64/ But I get the same issue when I use the default build from https://www.gnu.org/software/emacs/download.html#windows In both cases it's this version: Windows 10 x64 I used Emacs -Q, and the minimum stuff that is needed for omnisharp-emacs. But I can also reproduce this by running OmniSharp from |
@kimgronqvist – I wasn't able to replicate the issue with any of the builds you mentioned when performing the following script with
do you have a list of dlls loaded in the process? with process explorer or I don't know.. this is interesting, since I am not able to replicate even if I have almost the same configuration... |
I do run it in a VirtualBox VM, but I guess this shouldn't matter much.. |
also doing |
Very odd. I just tested on another machine with Windows 8 x64, and Emacs still crashes on me. |
I have another idea.. It could also be related to this code in omnisharp-server-actions.el:
I believe the way If someone could try to do My idea is that it could be that Not sure what is the default value of And we don’t need pty here, as the comment says; – but the code below the comment is defective, it creates a let-bound variable instead of setting a global var as |
Ok, nevermind.. Tried it myself, didn't help |
The crash happens in
There has been recently (in 24-25 timeframe) been this commit added that touches w32_executable_type: I am trying now to revert it and see if it helps, otherwise I need to fix it somehow myself.. I think the cause here is that the code in w32_executable_type does not check for .NET binaries at all, maybe those have a slightly different PE format that causes the function to crash.. In any case the fix will require a patch to be added upstream and new binaries released before this is fixed. |
Ok, found a workaround! You should use Apparently x64 .net binaries cause emacs to crash when those are invoked with I will update omnisharp-emacs README.md to reflect this. |
…ggest a solution. Sometimes emacs crashes on Windows when omnisharp-win-x64-net46.zip bundle is used. The cause is detailed more thoroughly in OmniSharp#315. Using x86 (32bit) binaries keeps emacs from crashing. The actual fix will need to be submitted to emacs upstream.
…ggest a solution. Sometimes emacs crashes on Windows when omnisharp-win-x64-net46.zip bundle is used. The cause is detailed more thoroughly in OmniSharp#315. Using x86 (32bit) binaries keeps emacs from crashing. The actual fix will need to be submitted to emacs upstream.
This crash and a patch has been submitted to upstream emacs. I am closing this issue as a workaround is there and upstream should fix the bug in emacs eventually. Please reopen if this doesn't help you. |
Great work! |
Yeah good job! |
I got here from this documentation -- does it need to be updated? |
When I trying to start omnisharp server, Emacs just showing an abort dialog and then crashed. The error message showed: A fatal error has occurred.
It should not be caused by my environment not set up cause my omnisharp running well when I use vscode.
waiting for the Answer
The text was updated successfully, but these errors were encountered: