2
1
Fork
You've already forked chicken
0

Autodoc hangs on Chicken variables whose values are blobs #27

Open
opened 2019年10月28日 18:56:59 +01:00 by jmckernon · 3 comments
jmckernon commented 2019年10月28日 18:56:59 +01:00 (Migrated from gitlab.com)
Copy link

I find that Geiser can hang when Chicken variables defined as 'blobs' are queried with autodoc (by hovering the cursor over them). (Chicken's 'blobs' are unstructured blocks of memory.)

To reproduce: In a Geiser buffer running Chicken with autodoc switched on, eval the following two lines of code:

(import (chicken scheme))
(define foo (make-blob 8))

Then hover the cursor over this one:

foo

Emacs hangs, runs up to 100% cpu, and has to be sent a quit signal. Here's the stack trace I got from the quit signal:

Debugger entered--Lisp error: (quit)
 geiser-syntax--read/next-token()
 geiser-syntax--read/list()
 geiser-syntax--read/list()
 geiser-syntax--read()
 geiser-syntax--read/list()
 geiser-syntax--read/list()
 geiser-syntax--read()
 geiser-syntax--read/list()
 geiser-syntax--read()
 geiser-syntax--read-from-string("((foo (\"value\" . #${60d6c7cdda7f0000})))")
 geiser-autodoc--show-signatures(((result "((foo (\"value\" . #${60d6c7cdda7f0000})))") (output . "")))
 geiser-con--process-completed-request(((:id . 8) (:string . "(geiser-eval '#f '(geiser-autodoc '(foo)))") (:continuation . geiser-autodoc--show-signatures) (:buffer . #<buffer make_pointer_test.scm>) (:connection t (:filter . comint-output-filter) (:tq ((nil "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)" #1 . geiser-con--process-completed-request)) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>) (:tq-filter lambda (p s) (geiser-con--tq-filter (quote ((...) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>)) s)) (:eot . "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)") (:prompt . "#[^;]*;[^:0-9]*:?[0-9]+> ") (:debug-prompt) (:is-debugging) (:count . 8) (:completed . #<hash-table eql 0/65 0x17dcbb9>))) "((result \"((foo (\\\"value\\\" . #${60d6c7cdda7f0000})))\") (output . \"\"))\n#;12> ")
 geiser-con--tq-filter((((nil "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)" ((:id . 8) (:string . "(geiser-eval '#f '(geiser-autodoc '(foo)))") (:continuation . geiser-autodoc--show-signatures) (:buffer . #<buffer make_pointer_test.scm>) (:connection t (:filter . comint-output-filter) (:tq . #1) (:tq-filter lambda (p s) (geiser-con--tq-filter ... s)) (:eot . "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)") (:prompt . "#[^;]*;[^:0-9]*:?[0-9]+> ") (:debug-prompt) (:is-debugging) (:count . 8) (:completed . #<hash-table eql 0/65 0x17dcbb9>))) . geiser-con--process-completed-request)) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>) "((result \"((foo (\\\"value\\\" . #${60d6c7cdda7f0000})))\") (output . \"\"))\n#;12> ")
 (lambda (p s) (geiser-con--tq-filter (quote (((nil "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)" ((:id . 8) (:string . "(geiser-eval '#f '(geiser-autodoc '(foo)))") (:continuation . geiser-autodoc--show-signatures) (:buffer . #<buffer make_pointer_test.scm>) (:connection t ... ... ... ... ... ... ... ... ...)) . geiser-con--process-completed-request)) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>)) s))(#<process Chicken REPL> "((result \"((foo (\\\"value\\\" . #${60d6c7cdda7f0000})))\") (output . \"\"))\n#;12> ")

It's fine when autodoc is turned off, and in the Geiser repl.

Curiously, I found that it seems not to crash when the variable is called 'seq', but it does for every other name I tried. Don't ask me why.

I'm running Chicken 5.1.0, Geiser 20191022.1613, and Emacs 26.3.

I find that Geiser can hang when Chicken variables defined as 'blobs' are queried with autodoc (by hovering the cursor over them). (Chicken's 'blobs' are unstructured blocks of memory.) To reproduce: In a Geiser buffer running Chicken with autodoc switched on, eval the following two lines of code: ``` (import (chicken scheme)) (define foo (make-blob 8)) ``` Then hover the cursor over this one: `foo` Emacs hangs, runs up to 100% cpu, and has to be sent a quit signal. Here's the stack trace I got from the quit signal: ``` Debugger entered--Lisp error: (quit) geiser-syntax--read/next-token() geiser-syntax--read/list() geiser-syntax--read/list() geiser-syntax--read() geiser-syntax--read/list() geiser-syntax--read/list() geiser-syntax--read() geiser-syntax--read/list() geiser-syntax--read() geiser-syntax--read-from-string("((foo (\"value\" . #${60d6c7cdda7f0000})))") geiser-autodoc--show-signatures(((result "((foo (\"value\" . #${60d6c7cdda7f0000})))") (output . ""))) geiser-con--process-completed-request(((:id . 8) (:string . "(geiser-eval '#f '(geiser-autodoc '(foo)))") (:continuation . geiser-autodoc--show-signatures) (:buffer . #<buffer make_pointer_test.scm>) (:connection t (:filter . comint-output-filter) (:tq ((nil "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)" #1 . geiser-con--process-completed-request)) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>) (:tq-filter lambda (p s) (geiser-con--tq-filter (quote ((...) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>)) s)) (:eot . "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)") (:prompt . "#[^;]*;[^:0-9]*:?[0-9]+> ") (:debug-prompt) (:is-debugging) (:count . 8) (:completed . #<hash-table eql 0/65 0x17dcbb9>))) "((result \"((foo (\\\"value\\\" . #${60d6c7cdda7f0000})))\") (output . \"\"))\n#;12> ") geiser-con--tq-filter((((nil "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)" ((:id . 8) (:string . "(geiser-eval '#f '(geiser-autodoc '(foo)))") (:continuation . geiser-autodoc--show-signatures) (:buffer . #<buffer make_pointer_test.scm>) (:connection t (:filter . comint-output-filter) (:tq . #1) (:tq-filter lambda (p s) (geiser-con--tq-filter ... s)) (:eot . "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)") (:prompt . "#[^;]*;[^:0-9]*:?[0-9]+> ") (:debug-prompt) (:is-debugging) (:count . 8) (:completed . #<hash-table eql 0/65 0x17dcbb9>))) . geiser-con--process-completed-request)) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>) "((result \"((foo (\\\"value\\\" . #${60d6c7cdda7f0000})))\") (output . \"\"))\n#;12> ") (lambda (p s) (geiser-con--tq-filter (quote (((nil "\\(\n#[^;]*;[^:0-9]*:?[0-9]+> \\)" ((:id . 8) (:string . "(geiser-eval '#f '(geiser-autodoc '(foo)))") (:continuation . geiser-autodoc--show-signatures) (:buffer . #<buffer make_pointer_test.scm>) (:connection t ... ... ... ... ... ... ... ... ...)) . geiser-con--process-completed-request)) #<process Chicken REPL> . #<buffer tq-temp-Chicken REPL>)) s))(#<process Chicken REPL> "((result \"((foo (\\\"value\\\" . #${60d6c7cdda7f0000})))\") (output . \"\"))\n#;12> ") ``` It's fine when autodoc is turned off, and in the Geiser repl. Curiously, I found that it seems not to crash when the variable is called 'seq', but it does for every other name I tried. Don't ask me why. I'm running Chicken 5.1.0, Geiser 20191022.1613, and Emacs 26.3.
hidetod commented 2020年06月16日 21:09:18 +02:00 (Migrated from gitlab.com)
Copy link

I am using Chicken 5.2.0 and could not reproduce this bug,
autodoc simply shows

foo => $

Do you still have this issue?

I am using Chicken 5.2.0 and could not reproduce this bug, autodoc simply shows ``` foo => $ ``` Do you still have this issue?
jmckernon commented 2020年06月16日 21:35:19 +02:00 (Migrated from gitlab.com)
Copy link

Not sure, haven't been using Chicken in a while.

I can try digging it out and trying to reproduce if it would be useful to you? But certainly the issue isn't bothering me at the moment.

Not sure, haven't been using Chicken in a while. I can try digging it out and trying to reproduce if it would be useful to you? But certainly the issue isn't bothering me at the moment.
jaor commented 2020年07月20日 07:14:55 +02:00 (Migrated from gitlab.com)
Copy link

moved from jaor/geiser#288

moved from jaor/geiser#288
Sign in to join this conversation.
No Branch/Tag specified
master
0.17
0.16
0.14
0.13
0.12
0.11.2
0.11.1
0.11
0.10
0.9
0.8.1
0.8
0.7
0.6
0.5
0.4
0.3
0.2.2
0.2.1
0.2
0.1.4
0.1.3
0.1.2
0.1.1
0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geiser/chicken#27
Reference in a new issue
geiser/chicken
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?