Skip to content
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

Timeout errors #3

Closed
elemakil opened this issue Jul 29, 2014 · 9 comments
Closed

Timeout errors #3

elemakil opened this issue Jul 29, 2014 · 9 comments

Comments

@elemakil
Copy link

I'm experiencing timeout errors, namely:

Company: Back-end company-irony async timeout with args (candidates )

When I kill the buffer, reopen the file and re-execute irony-cdb-menu for loading the compilation DB, completion works fine again (for some time).

Below you can find the backtrace starting at company-complete-common, which is my entry-point for completion; note that <$$BYTECODE$$> is a placeholder for some byte-code like part of the backtrace which can not be pasted into github:

Debugger entered--Lisp error: (error "Company: Back-end company-irony async timeout with args (candidates )")
  signal(error ("Company: Back-end company-irony async timeout with args (candidates )"))
  error("Company: Back-end %s async timeout with args %s" company-irony (candidates ""))
  company--force-sync(company-call-backend-raw (candidates "") company-irony)
  company-call-backend(candidates "")
  company--fetch-candidates("")
  company-calculate-candidates("")
<$$BYTECODE$$>
  company--begin-new()
  company--perform()
  #[0 "\300 \207" [company--perform] 1 "\n\n(fn)"]()
  company-auto-begin()
  company-manual-begin()
  company-complete-common()
@Sarcasm
Copy link
Owner

Sarcasm commented Jul 29, 2014

Did you update irony-mode since last night or does this error comes from a previous version?

For me usually the first time a completion occurs the timeout may be reached, since the file has to be parsed twice by libclang and then it keeps some things in cache and completion should perform better.

But if it happens even after the first parse maybe something is wrong. If you set a higher value for the timeout by customizing company-async-timeout, i.e: M-: (setq company-async-timeout 10) RET, does the completion returns with meaningful results?

@elemakil
Copy link
Author

Did you update irony-mode since last night or does this error comes from a previous version?

Eh... I just updated and in my simple test case the problem does not exist anymore. It seems that last night's update fixed the problem whatever it was. I'll close this issue if the problem does not reappear till the end of the day.

@Sarcasm
Copy link
Owner

Sarcasm commented Jul 29, 2014

I was expecting last night commit to make things the same or slightly worse (but pretty sure it's unnoticeable), but not faster. But 6 days ago a commit should have made things better, so maybe it's the one that solved your problem, completion should perform better since this commit.

@Sarcasm Sarcasm closed this as completed Sep 9, 2014
@soonhokong
Copy link

Dear @Sarcasm,

I'm not sure that this is related with Sarcasm/flycheck-irony#3. But I do have the following message when I run company-complete-common.

FYI, I'm using OS X 10.10.2. I've tried different llvm versions -- 3.4, 3.5, 3.6, and different versions of emacs24.4 (24.4.1, 24.4.91). I can reproduce the problem in all combinations.

By the way, in Ubuntu, things are working in an expected way.

Debugger entered--Lisp error: (error "Company: Back-end company-irony async timeout with args (candidates )")
  signal(error ("Company: Back-end company-irony async timeout with args (candidates )"))
  error("Company: Back-end %s async timeout with args %s" company-irony (candidates ""))
  company--force-sync(company-call-backend-raw (candidates "") company-irony)
  company-call-backend(candidates "")
  company--fetch-candidates("")
  company-calculate-candidates("")
  #[0 "\n\203   �\nC\202\n��\211\205\220�\211@\300�9\204��\306�!\203<��9\2036��\307N\310=\2046��\307N?\205@�\311�!\205@��\312!\202@�\313�\312\"\240\210\300\242\203\211�\314\300\242!\203\203�\315\300\242!�\211�\301\316\f!\240\210\301\242:\204l�
\203\203�\317\320!\210\202\203�
\203t�\300\242��\321\301\242!\210\322\323\324 \"\210\325\326!\210\327\330\301\242\"\210�A\266\202\202\n�\207" [(("" . t)) (nil) company-backend company-backends company-prefix company--manual-action functionp company-init t company-init-backend prefix company--multi-backend-adapter company--good-prefix-p company--prefix-str company-calculate-candidates message "No completion found" company-update-candidates run-hook-with-args company-completion-started-hook company-explicit-action-p company-call-frontends show throw --cl-block-nil-- company--manual-prefix] 6 "\n\n(fn)"]()
  funcall(#[0 "\n\203   �\nC\202\n��\211\205\220�\211@\300�9\204��\306�!\203<��9\2036��\307N\310=\2046��\307N?\205@�\311�!\205@��\312!\202@�\313�\312\"\240\210\300\242\203\211�\314\300\242!\203\203�\315\300\242!�\211�\301\316\f!\240\210\301\242:\204l�
\203\203�\317\320!\210\202\203�
\203t�\300\242��\321\301\242!\210\322\323\324 \"\210\325\326!\210\327\330\301\242\"\210�A\266\202\202\n�\207" [(("" . t)) (nil) company-backend company-backends company-prefix company--manual-action functionp company-init t company-init-backend prefix company--multi-backend-adapter company--good-prefix-p company--prefix-str company-calculate-candidates message "No completion found" company-update-candidates run-hook-with-args company-completion-started-hook company-explicit-action-p company-call-frontends show throw --cl-block-nil-- company--manual-prefix] 6 "\n\n(fn)"])
  company--begin-new()
  company--perform()
  #[0 "\301 \210�\207" [company-candidates company--perform] 1 "\n\n(fn)"]()
  funcall(#[0 "\301 \210�\207" [company-candidates company--perform] 1 "\n\n(fn)"])
  company-auto-begin()
  company-manual-begin()
  company-complete-common()

@Sarcasm
Copy link
Owner

Sarcasm commented Mar 21, 2015

I don't think it is linked with this issue. If your project isn't properly configured Clang may not be able to cache the preamble, making the completion really costly. Do you know if your file compiles without any issue on OS X?

@soonhokong
Copy link

@Sarcasm, it compiles with the installed clang++. FYI, irony-cdb-menu gives me the following:

Compilation Database: irony-cdb-json

  Working Directory: /Users/soonhok/work/dReal3/build/debug-clang
  Compile Options:   -Wall -Wextra -std=c++11 -Wno-mismatched-tags -Qunused-arguments -stdlib=libc++ -g -DDREAL_DEBUG -DDREAL_TRACE -fno-inline -Iinclude -Iinclude/ibex -I/Users/soonhok/work/dReal3/src -I/Users/soonhok/work/dReal3/src/opensmt -I.

[q] to quit

Also, there are some files in my project where irony-mode is working as expected.

@Sarcasm
Copy link
Owner

Sarcasm commented Mar 25, 2015

Can you try to leave out the -Qunused-arguments just to see if there is an issue with any of the options?

But please create a new issue I will not reopen this one as it is not related and I may forget about your issue otherwise.

@soonhokong
Copy link

Can you try to leave out the -Qunused-arguments just to see if there is an issue with any of the options?

Yes, this fixes my problem. Is it what we're supposed to do?

But please create a new issue

Please let me know if you still want me to open an issue for this.

@Sarcasm
Copy link
Owner

Sarcasm commented Mar 29, 2015

I created a sepate issue #8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants