GNU bug report logs - #61436
Emacs Freezing With Java Files

Previous Next

Package: emacs;

Reported by: Hank Greenburg <hank.greenburg <at> protonmail.com>

Date: Sat, 11 Feb 2023 20:47:02 UTC

Severity: normal

Found in versions 30.0.50, 29.1.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Weiner <rsw <at> gnu.org>
To: Mats Lidell <mats.lidell <at> lidells.se>
Cc: Hank Greenburg <hank.greenburg <at> protonmail.com>, Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>, Eli Zaretskii <eliz <at> gnu.org>, 61436 <at> debbugs.gnu.org
Subject: bug#61436: Emacs Freezing With Java Files
Date: Wed, 11 Oct 2023 06:17:50 -0400
[Message part 1 (text/plain, inline)]
Jens wrote:

> That always freezes Emacs (29 and master) even before it has a chance to
> display P1.java.  The freeze happens in function
> `c-get-fallback-scan-pos', where the while loop inf-loops, BUT:
>
> If you uncomment the line setting `hkey-init' to nil in init.el and
> repeat: No freeze.

As you note above, the infinite loop is coming from a Lisp function in
Emacs core, not from Hyperbole.  A Hyperbole setting may help you to see a
state reached in that function that you otherwise would not, but it is not
a Hyperbole bug; it is an unhandled state outside of Hyperbole.  When the
issue is found, we will have to work around it in Hyperbole since we
support Emacs versions back to 27.1 but that is another matter.  Thanks for
pointing it out.

-- rsw


On Wed, Oct 11, 2023 at 3:29 AM Mats Lidell <mats.lidell <at> lidells.se> wrote:

> Hi Jens,
>
> Thanks for the report. Seems non trivial.
>
> > Jens Schmidt writes:
> > Jens Schmidt <jschmidt4gnu <at> vodafonemail.de> writes:
> >
> > >   Ensure package "hyperbole" is installed.  (Its only role in this
> > >   issue seems to be a "background load generator", but I'm not 100%
> > >   sure here.)
> >
> > The second part above is not true!  Hyperbole mode is the culprit,
> > unless proven otherwise.  Here is a 100%-freezing reproducer (with
> > P1.java as from the initial post):
> >
> > ------------------------- init.el -------------------------
> > (require 'package)
> > (add-to-list 'package-archives
> >            '("melpa" . "https://melpa.org/packages/"))
> > (add-to-list 'package-archives
> >            '("gnu" . "https://elpa.gnu.org/packages/"))
> > (package-initialize)
> > ;(setq hkey-init nil)
> > (hyperbole-mode 1)
> > ------------------------- init.el -------------------------
> >
> > Execute Emacs as:
> >
> >   ./src/emacs -Q -l ~/tmp/init.el +181 ~/tmp/P1.java
> >
> > That always freezes Emacs (29 and master) even before it has a chance to
> > display P1.java.  The freeze happens in function
> > `c-get-fallback-scan-pos', where the while loop inf-loops, BUT:
> >
> > If you uncomment the line setting `hkey-init' to nil in init.el and
> > repeat: No freeze.
>
> I have tried to recreate the freezing (with 29.1 running docker) and I
> don't
> see the exact same behavior. For me P1.java is displayed and there us no
> freeze but when I try to go to top or bottom of file it freezes and I have
> to
> hit C-g. After that it seems to work. This is just an observation. There
> can
> be more things affected of course.
>
> I have tried both with the hyperbole stable and devel packages and get the
> same behavior.
>
> Note: I don't know what P1.java means here. I have picked a java file at
> random that I had on my machine that is large. Is P1.java a specific file
> that
> has been shared earlier?
>
> > Not sure how to continue here - since this is a GNU ELPA package, it can
> > be further handled on Emacs debbugs, no?  Mats, Bob?
>
> Hyperbole has its own tracker.
>
> https://debbugs.gnu.org/cgi/pkgreport.cgi?package=hyperbole
>
> %% Mats
>
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 115 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.