jsk-ros-pkg / euslime

Emacs SLIME for Euslisp
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

sequence expected in (slime:slimetop) #5

Closed a-ichikura closed 2 years ago

a-ichikura commented 2 years ago
[DEBUG - server:L76] raw header: 000062
[DEBUG - server:L83] raw data: (:emacs-rex (swank-repl:listener-eval "(send a :newcoords cam-coords)
") "USER" :repl-thread 223)

[DEBUG - protocol:L67] Processing id: 223 ...
[INFO - protocol:L69] func: swank_repl_listener_eval
[INFO - protocol:L70] args: [u'(send a :newcoords cam-coords)\n']
[DEBUG - handler:L198] Acquiring lock: <thread.lock object at 0x7f0a3445b590>
[INFO - bridge:L362] eval: (send a :newcoords cam-coords)

[DEBUG - bridge:L118] repl output finished
[DEBUG - bridge:L218] Socket Response: error
[DEBUG - bridge:L239] Waiting for socket data...
[DEBUG - bridge:L246] Socket Request Type: error
[DEBUG - bridge:L218] Socket Response: "sequence expected in (slime:slimetop)"
[DEBUG - bridge:L218] Socket Response: abort
[DEBUG - bridge:L239] Waiting for socket data...
[DEBUG - bridge:L218] Socket Response: nil
[DEBUG - bridge:L295] Ignoring: [abort] nil
[INFO - bridge:L303] exec: (slime:print-callstack 14)
[DEBUG - bridge:L113] accumulating output: Call Stack (max depth: 14):
  0: at (slime:print-callstack 14)
  1: at slime:slime-error
  2: at slime:slime-error
  3: at (slime:slimetop)
  4: at (slime:slimetop)
  5: at #<compiled-code #X5641c77c6f50>

[DEBUG - bridge:L118] repl output finished
[DEBUG - bridge:L218] Socket Response: error
[DEBUG - bridge:L239] Waiting for socket data...
[DEBUG - bridge:L246] Socket Request Type: error
[DEBUG - bridge:L218] Socket Response: "print-callstack in (slime:print-callstack 14)"
[DEBUG - bridge:L258] Waiting for repl output...
[ERROR - handler:L229] Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/euslime/handler.py", line 201, in swank_eval
    for val in self.euslisp.eval(sexp):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/euslime/bridge.py", line 368, in eval
    for r in self.get_socket_result(connection, wait=True):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/euslime/bridge.py", line 276, in get_socket_result
    gen = self.get_socket_response(connection)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/euslime/bridge.py", line 266, in get_socket_response
    raise EuslispError(msg, stack)
EuslispError: Sequence expected in (slime:slimetop)

[ERROR - protocol:L87] Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/euslime/protocol.py", line 79, in process
    for resp in gen:
  File "/opt/ros/melodic/lib/python2.7/dist-packages/euslime/handler.py", line 235, in swank_eval
    raise e
EuslispError: Sequence expected in (slime:slimetop)

[DEBUG - server:L39] response: [Symbol(':debug'), 0, 1, ['Sequence expected in (slime:slimetop)', '', None], [['QUIT', 'Quit to the SLIME top level'], ['CONTINUE', 'Ignore the error and continue in the same stack level'], ['RESTART', 'Restart euslisp process']], [[0, '(slime:slimetop)', [Symbol(':restartable'), False]], [1, '(slime:slimetop)', [Symbol(':restartable'), False]], [2, '#<compiled-code #X5641c77c6f50>', [Symbol(':restartable'), False]]], [None]]
[DEBUG - bridge:L118] repl output finished
[DEBUG - protocol:L92] ... Finished processing id: 223
[DEBUG - server:L76] raw header: 000043
[DEBUG - server:L83] raw data: (:emacs-rex (swank:invoke-nth-restart-for-emacs 1 0) "USER" 0 224)

[DEBUG - protocol:L67] Processing id: 224 ...
[INFO - protocol:L69] func: swank_invoke_nth_restart_for_emacs
[INFO - protocol:L70] args: [1, 0]
(:emacs-rex
 (swank-repl:listener-eval "(send a :newcoords cam-coords)\n")
 "USER" :repl-thread 223)
(:debug 0 1
        ("Sequence expected in (slime:slimetop)" "" nil)
        (("QUIT" "Quit to the SLIME top level")
         ("CONTINUE" "Ignore the error and continue in the same stack level")
         ("RESTART" "Restart euslisp process"))
        ((0 "(slime:slimetop)"
            (:restartable nil))
         (1 "(slime:slimetop)"
            (:restartable nil))
         (2 "#<compiled-code #X5641c77c6f50>"
            (:restartable nil)))
        (nil))
Affonso-Gui commented 2 years ago

Thank you for your feedback.

It seems that this error is common euslisp behavior signalizing wrong argument to :newcoords, since we had set cam-coords to a joint instead of a coordinate value. It is not an euslime bug, but it was confusing because the error message is not very helpful and there is no useful callstack information.

The error can be reproduced with the following code:

(load "package://pr2eus/pr2-interface.l")
(load "models/arrow-object.l")
(setq a (arrow))
(pr2-init)
(send a :newcoords (send *pr2* :bl_caster_r_wheel_joint))

Call Stack (max depth 20):
  0: at #<compiled-code #X55b4f52586a8 eustop>
TYPE-ERROR: sequence expected in #<compiled-code #X55b4f52586a8 eustop>