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

未关闭
#810 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清

调研方向

使用提供的 htdp/isl+ 和 2htdp/image 示例在 DrRacket 中重现该失败,然后检查报告的 racket/draw/private/bitmap.rkt:169:2 位置以及结果渲染路径。完成的标准是,大图像失败不再暴露内部源代码位置,而是显示一份适合初学者的恰当内存不足报告,同时保留预期的弹出窗口。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Racket
星标
517
派生
102
平均合并
20 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

racket/drracket 的其他 Issue

查看 racket/drracket 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。