[racket-dev] Contract violation from custodian shutdown

From: Neil Toronto (neil.toronto at gmail.com)
Date: Thu Dec 6 18:48:37 EST 2012

I just got this message on my console, I think after closing a tab, 
which coincided with DrRacket hanging:


eventspace-shutdown?: contract violation
   expected: eventspace?
   given: #<procedure:mpfr_free_cache>
   context...:
    /home/neil/plt/collects/mred/private/wx/common/queue.rkt:201:0: 
shutdown-eventspace!


It's obviously because of this code, which is near the top of 
"math/private/bigfloat/mpfr.rkt":


(define mpfr-free-cache (get-mpfr-fun 'mpfr_free_cache (_fun -> _void)))

(define mpfr-shutdown
   (register-custodian-shutdown mpfr-free-cache (λ (free) (free))))


Did I misunderstand something, or is this someone else's bug?

Neil ⊥

Posted on the dev mailing list.