Closed jeremysalwen closed 7 years ago
This bug has already been reported here https://github.com/Sarcasm/irony-mode/issues/159
This is kind of a design issue in irony-server which I'm struggling finding a proper solution (mostly by lack of time).
You can check the "workaround" proposed in the issue and see if that works for you. I will update this issue when it's fixed.
Thank you! the workaround seems to be working for me.
I'm still experiencing this problem while I'm using the latest version of irony-mode
(20150227.1526) and flycheck-irony
(20150308.1230).
The symptom is just like @jeremysalwen described. In the beginning, flycheck-irony
is working but after some time, it keeps showing "FlyC*" in the mode-line. To turn off and on flycheck-mode
fixes the problem temporarily.
FYI, I'm using OS X 10.10.2 / emacs-24.4 / llvm-3.6.0
I noticed it a few times as well but I haven't identified the pattern for now, I'm reopening.
@Sarcasm, thank you for the attention!
This problem occurs very often for me, and it is quite annoying. After some experimentation I found that the "freezing" occurs when editing and then directly switching buffer. After looking some in the code, I think I found the cause.
/Karl
@Hylen, I've tried your patch on my mac, but it doesn't work. It gives me "irony process stopped!" message after flycheck starts. FYI, flycheck still shows FlyC*
.
This is a general question: how can I get more diagnostic information when it doesn't work?
I've tried your patch on my mac, but it doesn't work. It gives me "irony process stopped!" message after flycheck starts. FYI, flycheck still shows FlyC*.
I didn't get this error when testing. Did you try a clean "reboot" of Emacs? I committed some fix, @Hylen patch + another, can you try to update irony?
This is a general question: how can I get more diagnostic information when it doesn't work?
This is a general question I have no general answer yet, for now debugging is mostly dependent on the issues, if I get a pattern in the user issues I may be able to provide such information but right now it's iterative debugging on the issues.
Hi! I installed Irony mode a few days ago through the package manager, and unfortunately I encounter the same error: for some time flycheck works perfectly, then after a few minutes of editing it enters into this "FlyC*" mode and stops checking syntax. Stopping and restarting the on-the-fly checking make it works again, but every time it is just for a few minutes before it freezes again. I have the impression as well that this might be related to change of buffer/jumping around. I am using a few other packages such as yasnippet and ggtags. Of course I will be happy to give all the details that might be useful
Maybe, I found the root cause. Irony failed to setup callback function properly.
36.7 Sending Input to Processes states the following:
It also allows filters, sentinels and timers to run—so take account of that in writing your code.
Take a look at irony--parse-buffer-async.
(setq ... irony--parse-buffer-callbacks nil ...)
(irony--send-parse-request "parse" ...)
(push callback irony--parse-buffer-callbacks)
It seems correct, but it's not. It's possible to get the parse result without callback set. process-send-string() called by irony--send-parse-request() can invoke timer or filter functions. Thus, the following will happen:
I actually, confirmed this happens by inserting debug print around. Hope this help.
Hello @naota,
I just wanted to give you a heads up, I plan to work on a patch when I have sufficient time to do so, the report is great! It explains the issue really well and should be straightforward to fix if there is no other mishaps.
Thank you for helping :+1:
I was able to reproduce the issue easily by adding an additional (sit-for 1)
between the moment we send the request and the moment we set the callback.
https://github.com/Sarcasm/irony-mode/commit/3286b72baf96094e846ef549a737ba6a79f99d15 should fix the issue. I hope this is the last issue with this function...
Thanks @naota for figuring all this out!
I have installed irony, company-irony, yasnippet, and flycheck-irony.
When I first open a file, flycheck works properly, and wil display the error messages from irony. However, if I modify the file, it usually will fail to update the errors. If I run "flycheck-mode" twice, then it will update the errors. The little "FlyC" string above the minibuffer displays "FlyC*" instead of the number of errors/warning, as it does when I first load, and this will never update. I'm new to emacs/irony/flycheck, so I'm not sure if I'm doing something wrong, but it seems like there is a bug, as even when I run "flycheck-buffer" manually, it does not update anything.