htdp icon indicating copy to clipboard operation
htdp copied to clipboard

stepper + big bang broken since 2014, sigh.

Open jbclements opened this issue 7 years ago • 3 comments

Shriram points out that the stepper is broken on this simplest big-bang program:

(require 2htdp/image)
(require 2htdp/universe)
(define (f2 w) (text "hi" 30 "red"))
(big-bang "dummy" [to-draw f2])

Specifically, it produces the error

skip-step?: contract violation
  expected: (or/c (listof procedure?) #f)
  given: (cons (lambda () ...) (cons "supposed to be skipped" (cons (lambda () ...) empty)))
  in: (->
       (or/c
        'normal-break
        'normal-break/values
        'result-exp-break
        'result-value-break
        'double-break
        'late-let-break
        'expr-finished-break
        'define-struct-break)
       (or/c (listof procedure?) #f)
       render-settings?
       boolean?)
  contract from: 
      <pkgs>/htdp-lib/stepper/private/reconstruct.rkt
  blaming: <pkgs>/htdp-lib/stepper/private/model.rkt
   (assuming the contract is correct)
  at: <pkgs>/htdp-lib/stepper/private/reconstruct.rkt:46.2

... in racket 6.1.1, and an essentially equivalent error in all more recent versions.

jbclements avatar Sep 12 '18 23:09 jbclements

research: the direct cause is a stepper-skip-completely that's wrapped around the call to run-it in universe.rkt. It looks to me like that tag has been there since before this error appeared. My guess is that calls to user code are happening inside of this call to run-it that used to happen after it returned. If that's true, then either this skip-completely should be replaced with ... possibly a "skip-to", possibly a set of skip-completely's that are further in, or possibly another mechanism completely. Either way, not going to be fixed today. Darn.

jbclements avatar Jul 09 '19 08:07 jbclements

FWIW, it appears to work fine on 6.0.1 using OS X.

jbclements avatar Jul 09 '19 08:07 jbclements

Works fine in Racket[cs] 7.9 on ubuntu 20.04. This issue probably should be closed.

IlnarSelimcan avatar Feb 01 '21 22:02 IlnarSelimcan