racket / typed-racket

Typed Racket
Other
527 stars 104 forks source link

Reentrant promise error during check-syntax #810

Open hashimmm opened 5 years ago

hashimmm commented 5 years ago

I sometimes get this error when working in DrRacket:

internal error: force: reentrant promise `init-current-type-names'
  context...:
   /usr/share/racket/collects/racket/private/promise.rkt:53:8
   /usr/share/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
   f1698
   /usr/share/racket/pkgs/typed-racket-lib/typed-racket/types/printer.rkt:120:0: pretty-format-rep12
   /usr/share/racket/pkgs/drracket-tool-lib/drracket/private/syncheck/annotate.rkt:42:0: add-mouse-over/loc
   /usr/share/racket/pkgs/drracket-tool-lib/drracket/private/syncheck/traversals.rkt:621:2: loop
   /usr/share/racket/pkgs/drracket-tool-lib/drracket/private/syncheck/traversals.rkt:233:18: collect-general-info
   /usr/share/racket/pkgs/drracket-tool-lib/drracket/private/syncheck/traversals.rkt:184:6: level+tail+mod-loop
   /usr/share/racket/pkgs/drracket/drracket/private/syncheck/online-comp.rkt:43:0: build-trace
   .../more-scheme.rkt:261:28
   /usr/share/racket/pkgs/drracket/drracket/private/syncheck/online-comp.rkt:91:5: loop

It seems to be harmless, usually it just stays at the top for a few seconds and then goes away.

I'm not yet sure how to reproduce this reliably, I'll update this issue once I get it.

samth commented 5 years ago

This looks like a Typed Racket bug, so I'm going to move it there. The problem is that somehow init-current-type-names triggers some sort of printing which then tries to do the initialization again. It's not clear how that could happen, but it's definitely something in TR.