-
Notifications
You must be signed in to change notification settings - Fork 97
irony process stopped! when handle c file including chinese characters #163
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
Comments
I found in the log file for this issue:error: missing newline for unsaved file content. So can anyone help resolving this problem ,because it is blocking me from using irony-mode in my work.Thanks for any advice!! |
Sorry, I tried but your example works for me. At the time I tried I didn't know how to have the file being encoded in You tested with clang, can you test with irony-server with the following command:
I should be able to try on Windows during the weekend. |
Appreciate your reply! :~/.emacs.d/irony/bin/irony-server.exe complete test.c 11 10 execute: Command{action=Command::Complete, file='test.c', line=11, column=10, flags=[], unsavedFiles.count=0, opt=off} But in the file ,it can not work. |
I will test on Windows but I wasn't able to reproduce on Linux! |
I wrote some output log sentences in Command.cpp , and found the reason why irony-server exited was the size of std::cin.read exceeding the length of test.c when irony.el sending unsaved file contents to the server,and this leads the error "missing newline". I mean the below codes: |
I just tested on Windows and cannot reproduce the issue here either, completion works just fine for me. We have a similar configuration. Can you provide me your file as attachment and maybe make sure you try irony-mode in a simplified environment. For example launch |
Thanks for your patience on my issue,I produced this issue when using runemacs.exe -Q. |
I didn't get your email, can you make sure you sent it to the proper address? The one you wrote looks fine. |
The mail was blocked at first time,then I used another mail ,please check it again. |
Okay, I can reproduce it now, thank you. I'm not sure but maybe that was company-clang that was providing me with the good results. |
I looked at the code and a few things, and I couldn't find what's wrong yet. Maybe something related to coding system or such, I don't really know, this is not something I am familiar with. Just for the record, the issue is the same on Linux. |
I have been seeing the same problem since I upgraded to the latest code today. It seems to happen when editing a specific file, but it is encoded in ASCII. I am using Ubuntu 12.04 with LLVM from SVN. |
Are you sure that all the characters are ASCII? What are the end-of-line characters newline only or CR+NL? What does
I'm a bit clueless on this issue for now :-/ |
It returns "ASCII C program text". But I just noticed something else, the file actually does not end with a newline! Sorry for being stupid :( |
Irony-mode should break on missing newline so that's a valid report. |
my c file is encoded in GBK dos ,the code as below:
irony works well if I remove the comment ,which have chinese characters in it.
But once there are chinese characters in comment or in string,the functions of irony complete,flycheck, and eldoc can not work at all.
I use clang.exe to compile the file,it compiled successfully.
My environment is win7 x64, LLVM 3.5,gcc-4.8.1,emacs 24.4,my irony-server.exe is compiled by VS2013.
The text was updated successfully, but these errors were encountered: