Skip to content

Polymode crashes Emacs 29 for Windows #40

@AntonioFasano

Description

@AntonioFasano

Steps to reproduce in a freshly installed Windows 10 virtual machine hosted in Linux.

  1. Download Emacs 29.1_1 or 29.2_1, see links:
    http://ftpmirror.gnu.org/emacs/windows/emacs-29/emacs-29.1_1.zip
    http://ftpmirror.gnu.org/emacs/windows/emacs-29/emacs-29.2_1.zip

  2. Extract the zip and start Emacs with:
    runemacs.exe -Q

  3. Evaluate the following expressions:

 (require 'package)
 (add-to-list 'package-archives  '("stable-melpa" . "https://stable.melpa.org/packages/"))
 (list-packages)
  1. Install ess and poly-R packages from the stable MELPA archive.

  2. Evaluate the following expressions:

 (let ((default-directory user-emacs-directory))
   (normal-top-level-add-subdirs-to-load-path))
 (setopt inferior-R-program-name "path to your R/bin/x64/Rterm.exe")
 (require 'poly-R)
  1. Open a relatively large Rmd document.

  2. On an R code chunk, type C-return to start the inferior R buffer.

  3. Finally, navigate the document via the Polymode menu with Next/Previous chunk entries.
    Don't use key bindings, but the mouse and, in particular, use the same-type chunk entry in the menu.

May be after 10/15 chunk visits, like said above, Emacs crashes. Probably, the test works better if you do not disable the default Windows real-time virus & threat protection settings (active).

Specifically, for version 29.1_1, it just suddenly closes, so there are not many useful details.
For 29.2_1 it gets stuck. If you kill Rterm in Windows Task Manager, functionality seems to be restored, but only at keyboard level. Clicking with the mouse pointer is ineffective. I was unable to reproduce with ordinary R files in r-mode buffers, using the ESS menu eval entries, and similarly in Polymode using the key bindings, rather than the menu bar, I do not get errors.

As it seems, the bug is a mouse thing and is related to comint communication with the R process. The menu somehow queries R to navigate chunks and loses sync with the process, then it remains stuck waiting for an answer.

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