Skip to content

Running code with 2htdp/universe and 2htdp/image via <F5> for the second time leads to freeze and OOM kill of emacs. #756

Open
@jaaaaaaaaan

Description

@jaaaaaaaaan

Package

metadata
(#s(package-desc racket-mode (20250609 1522)
		 "Racket editing, REPL, and more."
		 ((emacs (25 1)) (compat (30 0 2 0))) nil nil
		 "/home/jan/.emacs.d/elpa/racket-mode-20250609.1522"
		 ((:authors
		   ("Greg Hendershott"
		    . "[email protected]"))
		  (:revdesc . "4395797ff130")
		  (:commit
		   . "4395797ff130fcdcc9750fb2456d4f762d56852f")
		  (:url . "https://www.racket-mode.com/"))
		 nil))
package-archives
(("gnu" . "http://elpa.gnu.org/packages/")
 ("melpa" . "http://melpa.org/packages/")
 ("nongnu" . "https://elpa.nongnu.org/nongnu/"))
racket--el-source-dir
"/home/jan/.emacs.d/elpa/racket-mode-20250609.1522/"
racket--rkt-source-dir
"/home/jan/.emacs.d/elpa/racket-mode-20250609.1522/racket/"

System values

emacs-version
"30.1"
major-mode
racket-mode
system-type
gnu/linux
x-gtk-use-system-tooltips
t
display-graphic-p
t

Buffer values

after-change-functions
(jit-lock-after-change t)
before-change-functions
(t syntax-ppss-flush-cache)
completion-at-point-functions
(racket-complete-at-point)
eldoc-documentation-function
eldoc-documentation-default
eldoc-documentation-strategy
eldoc-documentation-default
eldoc-documentation-functions
nil
font-lock-defaults
((racket-font-lock-keywords-level-0 racket-font-lock-keywords-level-1
				    racket-font-lock-keywords-level-2
				    racket-font-lock-keywords-level-3)
 nil nil nil nil (font-lock-mark-block-function . mark-defun)
 (parse-sexp-lookup-properties . t) (font-lock-multiline . t)
 (font-lock-syntactic-face-function
  . racket-font-lock-syntactic-face-function)
 (font-lock-extend-region-functions font-lock-extend-region-wholelines
				    font-lock-extend-region-multiline))
pre-command-hook
(which-key--hide-popup delete-selection-pre-hook
		       ergoemacs-pre-command-hook
		       ergoemacs--cua-pre-command-handler)
post-command-hook
(jit-lock--antiblink-post-command yas--post-command-handler t)
post-self-insert-hook
(electric-indent-post-self-insert-function
 blink-paren-post-self-insert-function)
xref-backend-functions
(racket-mode-xref-backend-function t)

Racket Mode values

racket--cmd-open-p
nil
racket-after-run-hook
nil
racket-back-end-configurations
((:directory "/" :racket-program nil :remote-source-dir nil
	     :restart-watch-directories nil :windows nil))
racket-before-run-hook
(racket-ansi-color-context-reset)
racket-browse-url-function
browse-url-default-browser
racket-command-timeout
10
racket-doc-index-directory
"~/.emacs.d/racket-mode/"
racket-doc-index-predicate-function
always
racket-documentation-search-location
"https://docs.racket-lang.org/search/index.html?q=%s"
racket-error-context
medium
racket-expand-hiding
standard
racket-hash-lang-mode-hook
nil
racket-hash-lang-module-language-hook
nil
racket-hash-lang-token-face-alist
((builtin . font-lock-builtin-face)
 (constant . font-lock-constant-face) (error . error)
 (operator . font-lock-operator-face) (other . font-lock-doc-face)
 (keyword . font-lock-keyword-face)
 (hash-colon-keyword . racket-keyword-argument-face)
 (at . font-lock-doc-face))
racket-history-filter-regexp
"\\`\\s *\\'"
racket-imagemagick-props
nil
racket-images-do-not-use-svg
nil
racket-images-inline
t
racket-images-keep-last
100
racket-images-system-viewer
"display"
racket-indent-curly-as-sequence
t
racket-indent-sequence-depth
0
racket-input-prefix
"\\"
racket-input-translations
(("All" "∀") ("Union" "U") ("Intersection" "∩")
 ("test-->>E" "test-->>∃") ("vdash" "⊢") ("gg" "≫") ("succ" "≻")
 ("times" "×") ("Uparrow" "⇑") ("Downarrow" "⇓") ("Leftarrow" "⇐")
 ("Rightarrow" "⇒") ("leftarrow" "←") ("rightarrow" "→")
 ("nwarrow" "↖") ("nearrow" "↗") ("uparrow" "↑") ("downarrow" "↓")
 ("searrow" "↘") ("swarrow" "↙") ("leftrightarrow" "↔")
 ("updownarrow" "⇕") ("aleph" "א") ("emptyset" "∅") ("nabla" "∇")
 ("surd" "√") ("negation" "¬") ("infinity" "∞") ("prod" "∏")
 ("coprod" "∐") ("integrate" "∫") ("oint" "∮") ("vee" "∨")
 ("wedge" "∧") ("follows" "∘") ("setin" "∈") ("ni" "∋") ("notin" "∉")
 ("sqsubset" "⊏") ("sqsupset" "⊐") ("sqsubseteq" "⊑")
 ("sqsupseteq" "⊒") ("subset" "⊂") ("superset" "⊃") ("subseteq" "⊆")
 ("supseteq" "⊇") ("approx" "≈") ("cong" "≌") ("neq" "≠")
 ("sqcap" "⊓") ("sqcup" "⊔") ("models" "⊧") ("alpha" "α")
 ("Alpha" "Α") ("beta" "β") ("Beta" "Β") ("gamma" "γ") ("Gamma" "Γ")
 ("delta" "δ") ("Delta" "Δ") ("epsilon" "ε") ("Epsilon" "Ε")
 ("zeta" "ζ") ("Zeta" "Ζ") ("eta" "η") ("Eta" "Η") ("theta" "θ")
 ("Theta" "Θ") ("iota" "ι") ("Iota" "Ι") ("kappa" "κ") ("Kappa" "Κ")
 ("lambda" "λ") ("Lambda" "Λ") ("lamda" "λ") ("Lamda" "Λ") ("mu" "μ")
 ("Mu" "Μ") ("nu" "ν") ("Nu" "Ν") ("xi" "ξ") ("Xi" "Ξ")
 ("omicron" "ο") ("Omicron" "Ο") ("pi" "π") ("Pi" "Π") ("rho" "ρ")
 ("Rho" "Ρ") ("sigma" "σ") ("Sigma" "Σ") ("tau" "τ") ("Tau" "Τ")
 ("upsilon" "υ") ("Upsilon" "Υ") ("phi" "φ") ("Phi" "Φ") ("chi" "χ")
 ("Chi" "Χ") ("psi" "ψ") ("Psi" "Ψ") ("omega" "ω") ("Omega" "Ω")
 ("digamma" "ϝ") ("Digamma" "Ϝ") ("san" "ϻ") ("San" "Ϻ") ("qoppa" "ϙ")
 ("Qoppa" "Ϙ") ("sampi" "ϡ") ("Sampi" "Ϡ") ("stigma" "ϛ")
 ("Stigma" "Ϛ") ("heta" "ͱ") ("Heta" "Ͱ") ("sho" "ϸ") ("Sho" "Ϸ")
 ("|A|" "𝔸") ("|B|" "𝔹") ("|C|" "ℂ") ("|D|" "𝔻") ("|E|" "𝔼")
 ("|F|" "𝔽") ("|G|" "𝔾") ("|H|" "ℍ") ("|I|" "𝕀") ("|J|" "𝕁")
 ("|K|" "𝕂") ("|L|" "𝕃") ("|M|" "𝕄") ("|N|" "ℕ") ("|O|" "𝕆")
 ("|P|" "ℙ") ("|Q|" "ℚ") ("|R|" "ℝ") ("|S|" "𝕊") ("|T|" "𝕋")
 ("|U|" "𝕌") ("|V|" "𝕍") ("|W|" "𝕎") ("|X|" "𝕏") ("|Y|" "𝕐")
 ("|Z|" "ℤ") ("|gamma|" "ℽ") ("|Gamma|" "ℾ") ("|pi|" "ℼ") ("|Pi|" "ℿ")
 ("forall" "∀") ("exists" "∃") ("_0" "₀") ("_1" "₁") ("_2" "₂")
 ("_3" "₃") ("_4" "₄") ("_5" "₅") ("_6" "₆") ("_7" "₇") ("_8" "₈")
 ("_9" "₉") ("^0" "⁰") ("^1" "¹") ("^2" "²") ("^3" "³") ("^4" "⁴")
 ("^5" "⁵") ("^6" "⁶") ("^7" "⁷") ("^8" "⁸") ("^9" "⁹"))
racket-logger-config
((cm-accomplice . warning) (GC . info) (module-prefetch . warning)
 (optimizer . info) (racket/contract . error)
 (racket-mode-debugger . info) (sequence-specialization . info)
 (* . fatal))
racket-memory-limit
2048
racket-mode-hook
nil
racket-module-forms
"\\s(\\(?:module[*+]?\\|library\\)"
racket-pretty-lambda
nil
racket-pretty-print
t
racket-program
"racket"
racket-repl-buffer-name-function
nil
racket-repl-command-file
"/home/jan/.emacs.d/racket-mode/repl.rkt"
racket-repl-echo-sent-expressions
t
racket-repl-history-directory
"~/.emacs.d/racket-mode/"
racket-repl-mode-hook
nil
racket-sexp-comment-fade
0.5
racket-shell-or-terminal-function
racket-shell
racket-show-functions
(racket-show-pseudo-tooltip)
racket-smart-open-bracket-enable
nil
racket-submodules-to-run
((test) (main))
racket-use-repl-submit-predicate
nil
racket-xp-add-binding-faces
nil
racket-xp-after-change-refresh-delay
1
racket-xp-eldoc-level
summary
racket-xp-highlight-unused-regexp
"^[^_]"
racket-xp-mode-lighter
(:eval (racket--xp-mode-lighter))

Minor modes

enabled
((auto-composition-mode) (auto-compression-mode)
 (auto-encryption-mode) (blink-cursor-mode) (column-number-mode)
 (csv-field-index-mode) (delete-selection-mode) (direnv-mode)
 (display-line-numbers-mode) (electric-indent-mode) (ergoemacs-mode)
 (file-name-shadow-mode) (font-lock-mode)
 (global-display-line-numbers-mode) (global-eldoc-mode)
 (global-font-lock-mode) (global-semantic-idle-scheduler-mode)
 (global-semanticdb-minor-mode) (line-number-mode) (marginalia-mode)
 (minibuffer-regexp-mode) (mouse-wheel-mode) (override-global-mode)
 (rainbow-delimiters-mode) (recentf-mode) (savehist-mode)
 (semantic-minor-modes-format) (semantic-mode) (server-mode)
 (show-paren-mode) (transient-mark-mode) (vertico-mode)
 (vertico-mouse-mode) (which-key-mode) (yas-minor-mode))
Disabled minor modes
disabled
((abbrev-mode) (ansible-vault-mode) (archive-subfile-mode)
 (auto-fill-function) (auto-fill-mode) (auto-save-mode)
 (auto-save-visited-mode) (bashdb-track-mode) (buffer-face-mode)
 (buffer-read-only) (button-mode) (cl-old-struct-compat-mode)
 (comint-fontify-input-mode) (company-mode) (company-search-mode)
 (compilation-minor-mode) (compilation-shell-minor-mode)
 (completion-in-region-mode) (context-menu-mode) (csv-align-mode)
 (cursor-face-highlight-mode) (cursor-intangible-mode)
 (cursor-sensor-mode) (dash-fontify-mode) (defining-kbd-macro)
 (diff-auto-refine-mode) (diff-minor-mode)
 (dired-click-to-select-mode) (dired-hide-details-mode)
 (dired-isearch-filenames-mode) (edebug-backtrace-mode) (edebug-mode)
 (eldoc-mode) (electric-layout-mode) (electric-pair-mode)
 (electric-quote-mode) (eshell-arg-mode) (eshell-command-mode)
 (eshell-proc-mode) (eshell-var-mode) (flycheck-mode)
 (global-company-mode) (global-dash-fontify-mode)
 (global-flycheck-mode) (global-prettify-symbols-mode)
 (global-semantic-highlight-edits-mode)
 (global-semantic-highlight-func-mode)
 (global-semantic-idle-breadcrumbs-mode)
 (global-semantic-idle-completions-mode)
 (global-semantic-idle-local-symbol-highlight-mode)
 (global-semantic-idle-summary-mode)
 (global-semantic-show-parser-state-mode)
 (global-semantic-show-unmatched-syntax-mode)
 (global-semantic-stickyfunc-mode) (global-visual-fill-column-mode)
 (global-visual-line-mode) (gub-track-mode) (header-line-indent-mode)
 (horizontal-scroll-bar-mode) (hs-minor-mode) (ido-everywhere)
 (image-minor-mode) (impatient-mode) (indent-tabs-mode)
 (isearch-fold-quotes-mode) (isearch-mode) (jit-lock-debug-mode)
 (kshdb-track-mode) (lock-file-mode) (lost-selection-mode)
 (lsp-completion-mode) (lsp-inlay-hints-mode)
 (lsp-installation-buffer-mode) (lsp-managed-mode) (lsp-mode)
 (lsp-semantic-tokens-mode) (lsp-signature-mode) (mail-abbrevs-mode)
 (markdown-live-preview-mode) (menu-bar-mode) (mml-mode)
 (modifier-bar-mode) (next-error-follow-minor-mode) (org-cdlatex-mode)
 (org-list-checkbox-radio-mode) (org-src-mode)
 (org-table-follow-field-mode) (org-table-header-line-mode)
 (orgtbl-mode) (outline-minor-mode) (overwrite-mode)
 (paragraph-indent-minor-mode) (pdb-track-mode)
 (pdf-cache-prefetch-minor-mode) (pdf-view-auto-slice-minor-mode)
 (pdf-view-dark-minor-mode) (pdf-view-midnight-minor-mode)
 (pdf-view-printer-minor-mode) (pdf-view-themed-minor-mode)
 (perldb-track-mode) (prettify-symbols-mode)
 (python-black-on-save-mode) (racket-hash-lang-repl-mode)
 (racket-input-mode) (racket-smart-open-bracket-mode) (racket-xp-mode)
 (rdebug-track-mode) (read-extended-command-mode) (read-passwd-mode)
 (realgud-backtrack-mode) (realgud-short-key-mode)
 (realgud-srcbuf-mode) (realgud-track-mode) (realgud:gdb-track-mode)
 (realgud:trepanpl-track-mode) (remake-track-mode) (rst-minor-mode)
 (rust-playground-mode) (semantic-highlight-edits-mode)
 (semantic-highlight-func-mode) (semantic-idle-breadcrumbs-mode)
 (semantic-idle-completions-mode)
 (semantic-idle-local-symbol-highlight-mode)
 (semantic-idle-scheduler-mode) (semantic-idle-summary-mode)
 (semantic-show-parser-state-mode)
 (semantic-show-unmatched-syntax-mode) (semantic-stickyfunc-mode)
 (sh-electric-here-document-mode) (shell-dirtrack-mode)
 (shell-highlight-undef-mode) (size-indication-mode)
 (sudo-edit-indicator-mode) (tab-bar-history-mode) (tab-bar-mode)
 (tar-subfile-mode) (temp-buffer-resize-mode) (text-scale-mode)
 (tool-bar-mode) (tooltip-mode) (treesit-explore-mode)
 (treesit-inspect-mode) (trepan-track-mode) (trepan2-track-mode)
 (trepan3k-track-mode) (trepanjs-track-mode) (undelete-frame-mode)
 (url-handler-mode) (use-hard-newlines) (vc-dir-git-mode)
 (vertico-flat-mode) (view-mode) (visible-mode)
 (visual-fill-column-mode) (visual-line-fill-column-mode)
 (visual-line-mode) (window-divider-mode) (xref-etags-mode)
 (yas-global-mode) (zshdb-track-mode))

Steps to reproduce:
run this code with racket-run-and-switch-to-repl:

#lang racket

(require 2htdp/universe 2htdp/image)
(define WINDOW-WIDTH 1000)
(define WINDOW-HEIGHT 500)
(big-bang 0
          (to-draw (lambda (_) (circle 10 "solid" "tan")))
          (on-tick (lambda (_) empty)))

close the window which pops up, switch to buffer with code, and once again run it via racket-run-and-switch-to-repl

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions