From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Mazer Newsgroups: gmane.emacs.bugs Subject: bug#63363: 28.2; emacs freezes opening python file w/ unclosed quotes Date: Wed, 10 May 2023 17:11:44 -0600 Message-ID: References: <17BB823F-A919-44FB-87E1-1CAC9BD7426B@netyu.xyz> <83lehzcaq0.fsf@gnu.org> <83v8h2bwrw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007f243105fb5effa5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10481"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 63363@debbugs.gnu.org To: Ruijie Yu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 11 01:13:23 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 1pwszp-0002Yz-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 May 2023 01:13:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwszc-0001U2-3R; Wed, 10 May 2023 19:13:08 -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 1pwszW-0001TL-6a for bug-gnu-emacs@gnu.org; Wed, 10 May 2023 19:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwszV-00021J-U4 for bug-gnu-emacs@gnu.org; Wed, 10 May 2023 19:13:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwszV-0006G7-PD for bug-gnu-emacs@gnu.org; Wed, 10 May 2023 19:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James Mazer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 May 2023 23:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63363 X-GNU-PR-Package: emacs Original-Received: via spool by 63363-submit@debbugs.gnu.org id=B63363.168376032523965 (code B ref 63363); Wed, 10 May 2023 23:13:01 +0000 Original-Received: (at 63363) by debbugs.gnu.org; 10 May 2023 23:12:05 +0000 Original-Received: from localhost ([127.0.0.1]:49229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwsya-0006ES-P0 for submit@debbugs.gnu.org; Wed, 10 May 2023 19:12:05 -0400 Original-Received: from mail-yw1-f175.google.com ([209.85.128.175]:49165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwsyX-0006Dv-Ic for 63363@debbugs.gnu.org; Wed, 10 May 2023 19:12:03 -0400 Original-Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-55a44a2637bso117328287b3.2 for <63363@debbugs.gnu.org>; Wed, 10 May 2023 16:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683760316; x=1686352316; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XuDqRRSqEpglE6761CsCKjfdHS3lynRZrS22a/d64ek=; b=UJdvAuiI72LAGjdiMiEpMB4CQHBcGAWMlLz6iYMPB+4IfBhD/ci0zT2N7KAFlxyDTW m9ij6vDzsjDjQVz2m9ls4IgUPXJdrjq4rO98Pji25zej6P6TWNjA6IN3b0mhxEG1F++e hQM8VpN8/+PRNGUPJDCFXigoke205EZCFH1uRGU6YuANBxGdH+IxakxvrmloRnZKZZCY ifzDk5m+vYnakQ1G1PyHURzm4jIMrqh1Ae1pHY8jC1iu19M+P4No2jS8+2b27qpcXJJT tEEI6yOcp7tyncn5FQPio8kP7PF1NBw2owZEU8WinLg0o30JSmGtzrhaHf3h29YR5n4g /hQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683760316; x=1686352316; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XuDqRRSqEpglE6761CsCKjfdHS3lynRZrS22a/d64ek=; b=Am4gDaxhp0VnRkYOX1s2MXHtk9pDCgB6SdlmfTCUYJuIvl4UmD83atgfgtPG008DaY A2ZGIBWZhWjXnwMPWWDCcbenjRZJpGUe+nN3hxmPeQhqgKf5ogVc6qQWdq5KuWICHOhv 2fkOc9oRTPOW9+wagtnvuDzBrPA9dqe4iN1sZVMWAA0h5evfD83lqPWQFoKsDRypswwh GBNfTP8zXnQEqdyox+cTDmHurP7TMITedzJyPtsnv53hubqBUx6ooP6qJMrUSZZPrNsZ 2WnG7bHp+xz95oNJsEvzlUHM/iOk/z4Sry8SyB8DMzquSOXVjze2ww229Yy12iQg5fST BwMA== X-Gm-Message-State: AC+VfDyQPjahHZxdXnT2YIrmCOllUKeWmns0fxBh/BkCW//4enkUZMc6 Zyvu7L3nVbP7rzROoC0bQp4ODdhTlkUKY7F21zhjGKU+bwg= X-Google-Smtp-Source: ACHHUZ4AvcwNevx6BmiaguUl/w3PNBf9BtTwUwyMU28FUCKztKoNQH888iXnQNkCw0ZsAqrhShoAxtS4LD/oshNOfMM= X-Received: by 2002:a0d:d942:0:b0:55a:a57e:7de6 with SMTP id b63-20020a0dd942000000b0055aa57e7de6mr20724107ywe.15.1683760315572; Wed, 10 May 2023 16:11:55 -0700 (PDT) In-Reply-To: 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:261533 Archived-At: --0000000000007f243105fb5effa5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Disregard that -- until 29 is out, I just added > > (defun python-nav-end-of-statement--bug-override (orig-fn &optional noend= ) > (forward-line 1)) > (advice-add 'python-nav-end-of-statement :around > #'python-nav-end-of-statement--bug-override) to my init.el (from https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58780). Seems to do the trick for now -- no more lost buffers :-) On Wed, May 10, 2023 at 5:01=E2=80=AFPM James Mazer = wrote: > Just confirmed that with an emacs 29.0.90 snap (beta) I'm not seeing the > lock up. So it appears to be fixed downstream, but would be nice to be ab= le > to fix in 28 until 29 is actually released :-) > > > On Tue, May 9, 2023 at 9:23=E2=80=AFAM James Mazer = wrote: > >> Yes, seems to be the same issue. I just tried replicating his trigger an= d >> locked up an emacs window.. here's the backtrace after sigusr2: >> >>> Debugger entered--entering a function: >>> * #f(compiled-function () #)() >>> syntax-ppss() >>> python-nav-end-of-statement() >>> python-nav-end-of-block() >>> python-info-statement-ends-block-p() >>> python-nav--forward-sexp(-1 nil nil) >>> python-nav-forward-sexp(-1 nil nil) >>> python-nav-backward-sexp() >>> python-info-docstring-p((0 nil 390 34 nil nil 0 nil 427 nil nil)) >>> python-font-lock-syntactic-face-function((0 nil 390 34 nil nil 0 nil >>> 427 nil nil)) >>> font-lock-fontify-syntactically-region(180 1700 nil) >>> font-lock-default-fontify-region(184 1684 nil) >>> font-lock-fontify-region(184 1684) >>> #f(compiled-function (fun) #>> 0x19ba0a4f10e54dbd>)(font-lock-fontify-region) >>> jit-lock--run-functions(184 1684) >>> jit-lock-fontify-now(184 1684) >>> jit-lock-function(184) >>> redisplay_internal\ \(C\ function\)() >> >> >> I'll see if I can spin up a version of 29. Been a while since I compiled >> emacs from scratch... I'm actually surprised that there aren't packages = for >> 28 and 29 more readily available for ubuntu. Not sure what's up with tha= t. >> >> >> On Mon, May 8, 2023 at 9:09=E2=80=AFPM Ruijie Yu wrot= e: >> >>> >>> James Mazer writes: >>> >>> > Don't have time right now to do a custom build, but as sanity check, = I >>> just quickly pulled the 28.2 gnu.org.emacs flatpak and tried that and I= get >>> > exactly the same issue, so it doesn't appear to be specific to the >>> snap build. I can't find a 29 snap or flatpak to test, though. >>> >>> There is also another bug report (closed as fixed on 29), #62794, that = I >>> think is the same as this report and #62325. In particular, see this >>> message within that bug report: >>> >>> msgid:ZDdE/j6dDbhCw1QF@nicku.org >>> https://mail.gnu.org/archive/html/bug-gnu-emacs/2023-04/msg00798.html >>> >>> What Nick described in #62794 sounds exactly the same as your issue and >>> Eli's observation: that only _some type(s) of_ python files trigger the >>> error. I, as well as Eli, were able to reproduce the issue of #62794 >>> via using the file Nick attached in that message. >>> >>> James, can you confirm that Nick's issue on #62794 is exactly the same >>> as yours in this bug report, and that you can also reproduce the issue >>> using Nick's attachment from that message? >>> >>> And also, if you want to get a version of 29 to test, you can either ge= t >>> the pretest or clone the code and run "make". The resultant emacs >>> binary is located at "src/emacs". Let me know if this is unclear. >>> >>> -- >>> Best, >>> >>> >>> RY >>> >> >> >> -- >> James Mazer >> mazerj@gmail.com >> >> > > -- > James Mazer > mazerj@gmail.com > > --=20 James Mazer mazerj@gmail.com --0000000000007f243105fb5effa5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Disregard that -- until 29 is out, I just added(defun python-nav-end-of-statement--= bug-override (orig-fn &optional noend)
=C2=A0 (forward-line 1))
(= advice-add 'python-nav-end-of-statement :around
=C2=A0 =C2=A0#'= ;python-nav-end-of-statement--bug-override)
to my init.el = (from htt= ps://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58780). Seems to do the tr= ick for now -- no more lost buffers :-)

On Wed, May 10, 2023 at 5:01= =E2=80=AFPM James Mazer <mazerj2= 006@gmail.com> wrote:
Just confirmed that with an emacs 29.0.90 sna= p (beta) I'm not seeing the lock up. So it appears to be fixed downstre= am, but would be nice to be able to fix in 28 until 29 is actually released= :-)


On Tue, May 9, 2023 at 9:23=E2=80=AFAM James Mazer <<= a href=3D"mailto:mazerj2006@gmail.com" target=3D"_blank">mazerj2006@gmail.c= om> wrote:
Yes, seems to be the same issue. I just tried repli= cating his trigger and locked up an emacs window.. here's the backtrace= after sigusr2:
Debu= gger entered--entering a function:
* #f(compiled-function () #<byteco= de 0xb893e2c8c539dfa>)()
=C2=A0 syntax-ppss()
=C2=A0 python-nav-en= d-of-statement()
=C2=A0 python-nav-end-of-block()
=C2=A0 python-info-= statement-ends-block-p()
=C2=A0 python-nav--forward-sexp(-1 nil nil)
= =C2=A0 python-nav-forward-sexp(-1 nil nil)
=C2=A0 python-nav-backward-se= xp()
=C2=A0 python-info-docstring-p((0 nil 390 34 nil nil 0 nil 427 nil = nil))
=C2=A0 python-font-lock-syntactic-face-function((0 nil 390 34 nil = nil 0 nil 427 nil nil))
=C2=A0 font-lock-fontify-syntactically-region(18= 0 1700 nil)
=C2=A0 font-lock-default-fontify-region(184 1684 nil)
=C2= =A0 font-lock-fontify-region(184 1684)
=C2=A0 #f(compiled-function (fun)= #<bytecode 0x19ba0a4f10e54dbd>)(font-lock-fontify-region)
=C2=A0 = jit-lock--run-functions(184 1684)
=C2=A0 jit-lock-fontify-now(184 1684)<= br>=C2=A0 jit-lock-function(184)
=C2=A0 redisplay_internal\ \(C\ functio= n\)()
=C2=A0
I'll see if I can spin up a ver= sion of 29. Been a while since I compiled emacs from scratch... I'm act= ually surprised that there aren't packages for 28 and 29 more readily a= vailable for ubuntu. Not sure what's up with that.

=

= On Mon, May 8, 2023 at 9:09=E2=80=AFPM Ruijie Yu <ruijie@netyu.xyz> wrote:

James Mazer <m= azerj2006@gmail.com> writes:

> Don't have time right now to do a custom build, but as sanity chec= k, I just quickly pulled the 28.2 gnu.org.emacs flatpak and tried that and = I get
> exactly the same issue, so it doesn't appear to be specific to the= snap build. I can't find a 29 snap or flatpak to test, though.

There is also another bug report (closed as fixed on 29), #62794, that I think is the same as this report and #62325.=C2=A0 In particular, see this<= br> message within that bug report:

msgid:ZDdE/j6dDb= hCw1QF@nicku.org
https://mail.gnu.org/archive/ht= ml/bug-gnu-emacs/2023-04/msg00798.html

What Nick described in #62794 sounds exactly the same as your issue and
Eli's observation: that only _some type(s) of_ python files trigger the=
error.=C2=A0 I, as well as Eli, were able to reproduce the issue of #62794<= br> via using the file Nick attached in that message.

James, can you confirm that Nick's issue on #62794 is exactly the same<= br> as yours in this bug report, and that you can also reproduce the issue
using Nick's attachment from that message?

And also, if you want to get a version of 29 to test, you can either get the pretest or clone the code and run "make".=C2=A0 The resultant= emacs
binary is located at "src/emacs".=C2=A0 Let me know if this is un= clear.

--
Best,


RY


--
=
James Mazer



--


--