Displaying a large 2htdp/image value in DrRacket can expose an internal racket/draw source loc (draw/private/bitmap.rkt:169:2) with out of memory. This differs from behavior in other situations, where such errors are reported as plain out of memory.
I think the result-rendering failure should probably be reported without blaming an internal library location, or with a beginner-facing message such as “image is too large to display under the current memory limit.”
#lang htdp/isl+
(require 2htdp/image)
(define WIDTH 25000000)
(rectangle WIDTH 1 "solid" "blue")
--------------------------------------------
Welcome to DrRacket, version 9.1 [cs].
Language: htdp/isl+, with test coverage [custom]; memory limit: 128 MB.
. . ../../Applications/Racket v9.1/share/pkgs/draw-lib/racket/draw/private/bitmap.rkt:169:2: out of memory
>
This does also present user the OOM pop-up box, which is expected.
Displaying a large
2htdp/imagevalue in DrRacket can expose an internalracket/drawsource loc (draw/private/bitmap.rkt:169:2) with out of memory. This differs from behavior in other situations, where such errors are reported as plain out of memory.I think the result-rendering failure should probably be reported without blaming an internal library location, or with a beginner-facing message such as “image is too large to display under the current memory limit.”
This does also present user the OOM pop-up box, which is expected.