From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.bugs Subject: bug#61436: Emacs Freezing With Java Files Date: Wed, 11 Oct 2023 06:17:50 -0400 Message-ID: References: <83cz6fiefb.fsf@gnu.org> <835yc6hl0c.fsf@gnu.org> <87bkd7fsp4.fsf@sappc2.fritz.box> <87il7ew5wx.fsf@sappc2.fritz.box> <87il7dbosk.fsf@lidells.se> Reply-To: rswgnu@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000448fe006076e24a4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31259"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Hank Greenburg , Jens Schmidt , Eli Zaretskii , 61436@debbugs.gnu.org To: Mats Lidell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 11 12:19:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qqWJI-0007u5-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Oct 2023 12:19:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWIe-0004KI-6w; Wed, 11 Oct 2023 06:18:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqWIb-0004K7-TA for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 06:18:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWIb-0001Ej-3k for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 06:18:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqWIw-0005Fs-FI for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 06:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Weiner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Oct 2023 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61436 X-GNU-PR-Package: emacs Original-Received: via spool by 61436-submit@debbugs.gnu.org id=B61436.169701953020176 (code B ref 61436); Wed, 11 Oct 2023 10:19:02 +0000 Original-Received: (at 61436) by debbugs.gnu.org; 11 Oct 2023 10:18:50 +0000 Original-Received: from localhost ([127.0.0.1]:37543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqWIk-0005FM-1T for submit@debbugs.gnu.org; Wed, 11 Oct 2023 06:18:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqWIf-0005F3-5M for 61436@debbugs.gnu.org; Wed, 11 Oct 2023 06:18:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqWID-0001BY-GU for 61436@debbugs.gnu.org; Wed, 11 Oct 2023 06:18:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=W6t1JrSVxMwE/2qVitgjqK6OwIkL8xmvZfIhNQRnQYs=; b=Sk1sYiPUlTSc cHcxL2hVdHKov0Y88Lr9DFSlM6ykz0X68MP98PP8faa07TqIarRTeAHfooE84tZ1OzBb+M9+yIPuJ pET/uK1naLQz709/37UWBsmxBIqd+HvzSS6QTtW5RZV1FgTnTAn5FfVE/l4cKgjZLpPhRbxkFBfzZ XI0U9m/v0m4ltXPqWpk6BXlmEkCsmCmO7xlFixnXxTePlSH+7bhFlY9yfSgrMoN0MwjH77Iy6oVWG UORB28uhWoa57fOw6kk2bbDOv77d6meO5Aw2QUue/0FtrTQDx6H4tgJGxeUWte5CoCUwE2C3Gdqjb sb5ekk83+U03IR/0AMR25g==; X-Gm-Message-State: AOJu0YxXh+G8eyvzIMPQ4jOzmMFOXNHFBpQKW4twg3wf6+dT8bMreuN/ D6i9/9E+97nvAUCwVEY7cA3RFmDyyNipxsWpFrs= X-Google-Smtp-Source: AGHT+IHbo8foko55S3lI2GeS+gsus2dw26LADqt5SL2I8rsJV+zbD8Pf2kw8Al5En4dnp7P7ooWY/W24rdFkEYRWxYI= X-Received: by 2002:a67:ead5:0:b0:452:5a06:b6ae with SMTP id s21-20020a67ead5000000b004525a06b6aemr11675406vso.2.1697019496528; Wed, 11 Oct 2023 03:18:16 -0700 (PDT) In-Reply-To: <87il7dbosk.fsf@lidells.se> X-Gmail-Original-Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272247 Archived-At: --000000000000448fe006076e24a4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFAM Mats Lidell wrote: > Hi Jens, > > Thanks for the report. Seems non trivial. > > > Jens Schmidt writes: > > Jens Schmidt 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 t= o > > 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 hav= e > 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 th= e > 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 ca= n > > be further handled on Emacs debbugs, no? Mats, Bob? > > Hyperbole has its own tracker. > > https://debbugs.gnu.org/cgi/pkgreport.cgi?package=3Dhyperbole > > %% Mats > --000000000000448fe006076e24a4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Jens wrote:

> That always freezes Emacs (29 and mast= er) even before it has a chance to
> display P1.java.=C2=A0 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 an= d
> repeat: No freeze.

As you note above, the infinite loop is comi= ng from a Lisp function in Emacs core, not from Hyperbole.=C2=A0 A Hyperbol= e setting may help you to see a state reached in that function that you oth= erwise would not, but it is not a Hyperbole bug; it is an unhandled state o= utside of Hyperbole.=C2=A0 When the issue is found, we will have to work ar= ound it in Hyperbole since we support Emacs versions back to 27.1 but that = is another matter.=C2=A0 Thanks for pointing it out.

-- rsw


On Wed, Oct 11, 2023 at 3:29=E2=80=AFAM Mats Lidell <mats.lidell@lidells.se> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Hi Jens,

Thanks for the report. Seems non trivial.

> Jens Schmidt writes:
> Jens Schmidt <jschmidt4gnu@vodafonemail.de> writes:
>
> >=C2=A0 =C2=A0Ensure package "hyperbole" is installed.=C2= =A0 (Its only role in this
> >=C2=A0 =C2=A0issue seems to be a "background load generator&q= uot;, but I'm not 100%
> >=C2=A0 =C2=A0sure here.)
>
> The second part above is not true!=C2=A0 Hyperbole mode is the culprit= ,
> unless proven otherwise.=C2=A0 Here is a 100%-freezing reproducer (wit= h
> P1.java as from the initial post):
>
> ------------------------- init.el -------------------------
> (require 'package)
> (add-to-list 'package-archives
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '("melpa" . &qu= ot;https://melpa.org/packages/"))
> (add-to-list 'package-archives
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '("gnu" . "= ;https://elpa.gnu.org/packages/"))
> (package-initialize)
> ;(setq hkey-init nil)
> (hyperbole-mode 1)
> ------------------------- init.el -------------------------
>
> Execute Emacs as:
>
>=C2=A0 =C2=A0./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.=C2=A0 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 an= d
> repeat: No freeze.

I have tried to recreate the freezing (with 29.1 running docker) and I don&= #39;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 ca= n
be more things affected of course.

I have tried both with the hyperbole stable and devel packages and get the<= br> same behavior.

Note: I don't know what P1.java means here. I have picked a java file a= t
random that I had on my machine that is large. Is P1.java a specific file t= hat
has been shared earlier?

> Not sure how to continue here - since this is a GNU ELPA package, it c= an
> be further handled on Emacs debbugs, no?=C2=A0 Mats, Bob?

Hyperbole has its own tracker.

https://debbugs.gnu.org/cgi/pkgreport.c= gi?package=3Dhyperbole

%% Mats
--000000000000448fe006076e24a4--