On 10/12/07, Andrei Stebakov lispercat@gmail.com wrote:
I run across this error time after time but it's really hard to reproduce but I can replicate exactly the same backtrace of the problem if instead of some valid http domain I choose any fake one. If I run: (drakma:http-request "http://some-fake-domain.com" :method :get :parameters `(("param1" . "text")))
The backtrace will be:
The value 0 is not of type (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (INTEGER 1)). [Condition of type TYPE-ERROR]
Restarts: 0: [ABORT] Return to SLIME's top level. 1: [ABORT] Exit debugger, returning to top level.
Backtrace: 0: (RANDOM 0) 1: (USOCKET::GET-RANDOM-HOST-BY-NAME "some-fake-domain.com") 2: (USOCKET:SOCKET-CONNECT " some-fake-domain.com" 80) 3: (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com") 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DRAKMA:HTTP-REQUEST " http://some-fake-domain.com" :METHOD :GET :PARAMETERS '(("param1" . "text"))) #<NULL-LEXENV>) 5: ((LAMBDA ()))
In my case it looks like sometimes even for the real domain it calls (RANDOM 0) which gives this log. Even if the domain is wrong do you think it should throw an exception? I use SBCL 1.0.5. with the latest drakma and usocket ( usocket-0.3.2).
I'll have a look tonight, but I think I fixed this problem in newer usocket releases already. The newest usocket is 0.3.5. [After looking at the list of releases at the bottom of http://common-lisp.net/project/usocket/] I think your problem may have been fixed in usocket 0.3.3. (But again, I'll look at it later - tonight)
bye,
Erik.