abingham / emacs-ycmd

Emacs client for ycmd, the code completion system.
MIT License
384 stars 46 forks source link

request-backend set to 'curl causes error (wrong-type-argument number-or-marker-p nil) #490

Open danielkrizian opened 5 years ago

danielkrizian commented 5 years ago

Hi, I just wanted to report/share an observation that when request-backend is set to 'curl, following error is thrown every time I move up/down the c++-mode buffer and Emacs freezes until I press C-g (making it unfeasible to use ycmd).

I narrowed the triggering condition down to simply calling (ycmd-semantic-completer-available-p)

Backtrace:

ebugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)                                                                                
  request--curl-callback(#<process request curl> "finished\n")                                                                                            
  accept-process-output(nil 0.01)                                                                                                                         
  ycmd-deferred:sync!(#s(deferred :callback #f(compiled-function (response) #<bytecode 0x1145e2d>) :errorback deferred:default-errorback :cancel deferred      $
  ycmd--send-completer-available-request(c++-mode)                                                                                                        
  ycmd-semantic-completer-available-p()                                                                                                                   
  eval((ycmd-semantic-completer-available-p) nil)                                                                                                         
  eval-expression((ycmd-semantic-completer-available-p) nil nil 127)                                                                                      
  funcall-interactively(eval-expression (ycmd-semantic-completer-available-p) nil nil 127)                                                                
  call-interactively(eval-expression nil nil)                                                                                                             
  command-execute(eval-expression) 

Workaround: When I set request-backend to 'url-retrieve, error no longer pops up and ycmd works as expected.

Question: What would be the fix to allow me to use 'curl as request-backend ? Thanks


I have Emacs 26.1 and Spacemacs 0.300.0 (develop branch) on Debian Jessie.

luluman commented 5 years ago

Yes, the same issue to me.

abingham commented 5 years ago

I'm no longer maintaining this project. Sorry.

luluman commented 5 years ago

I'm sorry to hear that. But thanks a lot for your great work on this project. Emacs-ycmd is amazingly fast, stable and easy to get started. Also, the plugins, such as company-ycmd, flycheck-ycmd, eldoc-ycmd, you provided make Ycmd works together with other great projects seamlessly. I have got a lot of help from this project, so thanks again.

dvzubarev commented 4 years ago

I think it is related with this issue https://github.com/tkf/emacs-request/pull/157

dickmao commented 4 years ago

https://github.com/tkf/emacs-request/pull/85#issuecomment-526258222

This is continued fallout from an indiscretion some months ago.