Skip to content

2htdp/image result display in DrRacket exposes internal bitmap.rkt OOM location #810

@jasonhemann

Description

@jasonhemann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions