From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63711: 30.0.50; Crash in xdisp.c when it->string is 0x0 Date: Thu, 25 May 2023 18:54:13 +0300 Message-ID: <83353kmmoq.fsf@gnu.org> References: <83ilcgn9ud.fsf@gnu.org> <835y8gmt3f.fsf@gnu.org> <834jo0mono.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20119"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63711@debbugs.gnu.org To: Thomas Fitzsimmons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 25 17:54:21 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 1q2DIC-00052D-PS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 May 2023 17:54:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2DHv-0007n2-Fo; Thu, 25 May 2023 11:54:03 -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 1q2DHu-0007mR-Nm for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 11:54: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 1q2DHu-0006Zq-Fp for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2DHu-0001Zm-1z for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 11:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 May 2023 15:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63711 X-GNU-PR-Package: emacs Original-Received: via spool by 63711-submit@debbugs.gnu.org id=B63711.16850300366045 (code B ref 63711); Thu, 25 May 2023 15:54:02 +0000 Original-Received: (at 63711) by debbugs.gnu.org; 25 May 2023 15:53:56 +0000 Original-Received: from localhost ([127.0.0.1]:47906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2DHn-0001ZQ-L6 for submit@debbugs.gnu.org; Thu, 25 May 2023 11:53:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2DHj-0001ZC-Fk for 63711@debbugs.gnu.org; Thu, 25 May 2023 11:53:54 -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 1q2DHd-0006Ty-4b; Thu, 25 May 2023 11:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=w+3T0ug88WoklS7b8GIDVA/IvMvZl05fx6JTxsTsWsg=; b=pLvIObhE5icN pUsx3xGSxqfBwLsvdFpK7heOe5vhlPVG2Uf2m5BtRC4bNUm2ihctPhHA32gJHGMCWTsJOV5Tkel+H jaIt5LndJHtYcRIBz95nNJ2ZifaOpdNIXOj3s3yXr7QhMRlVJtOWFEaVKGKpgctS5S/7VMDOMukPX X5ESQ7dFQdx5ZCNg5DiXbLe5qLxTq3o4V5AJRGKR4asT9t0MebjVyKprkeb7ZhZTHbZCT1BbsHA0E 0gVAS1vA9fJsKg89jAIOOre0gdQxEwQUiT+tEsz5ySx8bGMyE9VCVWwQnS3MKTyrlOyAfXt6W+FiG pS1e/zWd54WatM4F5nRE5Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2DHc-00071J-KT; Thu, 25 May 2023 11:53:44 -0400 In-Reply-To: (message from Thomas Fitzsimmons on Thu, 25 May 2023 11:25:23 -0400) 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:262377 Archived-At: > From: Thomas Fitzsimmons > Cc: 63711@debbugs.gnu.org > Date: Thu, 25 May 2023 11:25:23 -0400 > > > (gdb) prow > > y=701 x=0 pwid=1287 a+d=18+5=23 phys=16+4=20 vis=23 > used=(LMargin=0,Text=113,RMargin=0) Hash=258184180 > start=0 end=0 ENA MODEL > > > (gdb) pgrow > > TEXT: 113 glyphs > 0 0: CHAR[ ] str=0xf188ab16[0] blev=0,btyp=L w=11 a+d=18+5 face=1 > 1 11: CHAR[U] str=0x1ccec60[1] blev=0,btyp=L w=11 a+d=18+5 face=1 > 2 22: CHAR[:] str=0x4e125d0[0] blev=0,btyp=L w=11 a+d=18+5 face=1 > 3 33: STRETCH[23+18] str=0x1ccecb8[0] w=33 a+d=18+5 face=1 > 4 66: CHAR[@] str=0x1ccecb8[0] blev=0,btyp=L w=11 a+d=18+5 face=1 This is the mode line: first sign of trouble. We are handling a mode-line glyph row as if it were a text row. That cannot lead to anything good, ever. > > (gdb) p first_reusable_row - start_row > > $22 = 15 > > > (gdb) p first_row_to_display - start_row > > $23 = 30 So we think that the first glyph row to display is screen line 30 (zero-based). Is it true that the window was supposed to have only 30 lines in its body, not 31? > > (gdb) p first_row_to_display->y > > $24 = 701 > > > (gdb) p window_text_bottom_y(w) > > $25 = 701 And this also tells us that we are using the wrong glyph row, I think: its Y coordinate is outside of the visible text area. I think I understand the problem. Let me think about a solution. Please leave this GDB session running, in case I'll need some more data from it. > > But there weren't supposed to be any overlays at the beginning of the > > buffer, right? > > Correct, there weren't supposed to be any overlays at the beginning of > the buffer -- as far as I know, anyway. I didn't explicitly do anything > with overlays. The window doesn't display the beginning of the buffer, it displays starting at buffer position 142803, see the glyphs of start_row. The zero position we get in pos->pos.charpos is because that's a position of the string from which the mode line was generated. > > Can you describe your experiments with font-locking JavaScript? Which > > display-related features did you try? > > I was enabling and disabling font-lock-mode, running font-lock-ensure > and font-lock-flush on temporary buffers (not in the js.el buffer). I > wasn't doing anything particularly fancy or low-level, just elisp-level > function calls and changing font-lock variable settings, primarily the > js keyword variables. OK.