euslisp / EusLisp

EusLisp is an integrated programming system for the research on intelligent robots based on Common Lisp and Object-Oriented programming. [Manual](http://euslisp.github.io/EusLisp/manual.html ) [マニュアル](http://euslisp.github.io/EusLisp/jmanual.html )
Other
57 stars 50 forks source link

Dead lock when printing objects with *print-circle* #465

Open Affonso-Gui opened 3 years ago

Affonso-Gui commented 3 years ago

How to reproduce:

(setq c (instance object))
(setq *print-circle* t)
c
;; dead lock

What is happening:

  1. prinx
  2. mutex_lock to keep mark&unmark together (https://github.com/euslisp/EusLisp/blob/master/lisp/c/printer.c#L622-L630)
  3. prin1
  4. send obj :prin1 (https://github.com/euslisp/EusLisp/blob/master/lisp/c/printer.c#L589)
  5. format ... (https://github.com/euslisp/EusLisp/blob/master/lisp/l/object.l#L15-L20)
  6. prinx
  7. dead lock

Not really sure how we should solve this... :thinking: