From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 12:08:30 2021 Received: (at submit) by debbugs.gnu.org; 17 Aug 2021 16:08:30 +0000 Received: from localhost ([127.0.0.1]:53898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG1dd-0002wp-Sm for submit@debbugs.gnu.org; Tue, 17 Aug 2021 12:08:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:41250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG1db-0002wh-Jo for submit@debbugs.gnu.org; Tue, 17 Aug 2021 12:08:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG1db-0000wT-DI for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 12:08:27 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG1dW-0007ti-Dv for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 12:08:27 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2613260008 for ; Tue, 17 Aug 2021 16:08:17 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: args-out-of-range in redisplay_internal Organization: LINKOV.NET Date: Tue, 17 Aug 2021 19:06:41 +0300 Message-ID: <87r1esys1a.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.70.183.195; envelope-from=juri@linkov.net; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) I prepared a commit message for the tab-bar patch, everything was nice, but suddenly the commit failed with an unexpected error: Debugger entered--Lisp error: (args-out-of-range 1737 1737) redisplay_internal\ \(C\ function\)() message("Running in foreground: %s" #("git --no-pager commit -m Redesign = tab-bar event processing (bug#41342, bug#41343)\n\nInstead of emitting menu= -item keys like [tab-1],\nemit normal mouse events like [mouse-1] and [mous= e-2]\nfor all mouse clicks issued on the tab-bar.\n\n* lisp/mouse.el (mouse= -posn-property): Handle 'tab-bar' posn-area.\n\n* lisp/tab-bar.el (tab--key= -to-number): New internal function.\n(tab-bar-handle-mouse): Use tab key to= select/close tab.\n(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab)\n(t= ab-bar-mouse-context-menu): New commands.\n(tab-bar-map): Bind [down-mouse-= 1] to tab-bar-mouse-select-tab,\n[down-mouse-2] to tab-bar-mouse-close-tab,= \n[down-mouse-3] to tab-bar-mouse-context-menu.\n(tab-bar-keymap-cache): Re= move.\n(tab-bar-make-keymap): Don't use cache.\n(tab-bar--format-tab): Remo= ve default bindings from menu items.\n(tab-bar-make-keymap-1): Prepend tab-= bar-map.\n\n* src/keyboard.c (make_lispy_event): Append event->arg to posit= ion\nfor Qtab_bar.\n\n* src/term.c (handle_one_term_event): Simplify to set= event arg.\n\n* src/w32inevt.c (do_mouse_event): Set emacs_ev->arg to the = value\nreturned from tty_handle_tab_bar_click.\n\n* src/w32term.c (w32_hand= le_tab_bar_click): Return value from\nhandle_tab_bar_click.\n(w32_read_sock= et): Set tab_bar_key to value returned from\nw32_handle_tab_bar_click, and = set event arg from it.\n\n* src/xdisp.c (handle_tab_bar_click): Instead of = emitting event,\nreturn a list with Qtab_bar and tab caption with text prop= erties\nthat contain Qmenu_item with key and binding.\n(tty_handle_tab_bar_= click): Simplify to return a list of Qtab_bar,\nkey and close_p, instead of= emitting event.\n\n* src/xterm.c (handle_one_xevent): Set tab_bar_key to v= alue\nreturned from handle_tab_bar_click, and set event arg from it.\n --on= ly -- :(literal)/tmp/emacs/etc/NEWS :(literal)/tmp/emacs/lisp/mouse.el :(li= teral)/tmp/emacs/lisp/tab-bar.el :(literal)/tmp/emacs/src/dispextern.h :(li= teral)/tmp/emacs/src/keyboard.c :(literal)/tmp/emacs/src/term.c :(literal)/= tmp/emacs/src/termchar.h :(literal)/tmp/emacs/src/w32inevt.c :(literal)/tmp= /emacs/src/w32term.c :(literal)/tmp/emacs/src/xdisp.c :(literal)/tmp/emacs/= src/xterm.c" 25 81 (face log-edit-summary jit-lock-defer-multiline t fontif= ied t) 81 360 (fontified t) 360 362 (font-lock-multiline t fontified t) 362= 363 (face nil font-lock-multiline t fontified t) 363 417 (fontified t) 417= 419 (font-lock-multiline t fontified t) 419 420 (face nil font-lock-multil= ine t fontified t) 420 469 (fontified t) 469 471 (font-lock-multiline t fon= tified t) 471 472 (face nil font-lock-multiline t fontified t) 472 513 (fon= tified t) 513 515 (font-lock-multiline t fontified t) 515 516 (face nil fon= t-lock-multiline t fontified t) 516 666 (fontified t) 666 668 (font-lock-mu= ltiline t fontified t) 668 669 (face nil font-lock-multiline t fontified t)= 669 698 (fontified t) 698 700 (font-lock-multiline t fontified t) 700 701 = (face nil font-lock-multiline t fontified t) 701 738 (fontified t) 738 740 = (font-lock-multiline t fontified t) 740 741 (face nil font-lock-multiline t= fontified t) 741 802 (fontified t) 802 804 (font-lock-multiline t fontifie= d t) 804 805 (face nil font-lock-multiline t fontified t) 805 1188 (fontifi= ed t) 1188 1190 (font-lock-multiline t fontified t) 1190 1191 (face nil fon= t-lock-multiline t fontified t) 1191 1476 (fontified t) 1476 1478 (font-loc= k-multiline t fontified t) 1478 1479 (face nil font-lock-multiline t fontif= ied t) 1479 1713 (fontified t) )) (let ((inhibit-message (eq (selected-window) (active-minibuffer-window)))= ) (message "Running in foreground: %s" full-command)) (progn (let ((inhibit-message (eq (selected-window) (active-minibuffer-wi= ndow)))) (message "Running in foreground: %s" full-command))) (if vc-command-messages (progn (let ((inhibit-message (eq (selected-windo= w) (active-minibuffer-window)))) (message "Running in foreground: %s" full-= command)))) (if (eq okstatus 'async) (let ((proc (let ((process-connection-type nil))= (apply #'start-file-process command (current-buffer) command squeezed)))) = (if vc-command-messages (progn (let ((inhibit-message (eq ... ...))) (messa= ge "Running in background: %s" full-command)))) (set-process-sentinel proc = #'ignore) (set-process-filter proc #'vc-process-filter) (setq status proc) = (if vc-command-messages (progn (vc-exec-after #'(lambda nil (let ... ...)))= ))) (if vc-command-messages (progn (let ((inhibit-message (eq (selected-win= dow) (active-minibuffer-window)))) (message "Running in foreground: %s" ful= l-command)))) (let ((buffer-undo-list t)) (setq status (apply #'process-fil= e command nil t nil squeezed))) (if (and (not (eq t okstatus)) (or (not (in= tegerp status)) (and okstatus (< okstatus status)))) (progn (if (eq 32 (are= f (buffer-name (current-buffer)) 0)) nil (pop-to-buffer (current-buffer)) (= goto-char (point-min)) (shrink-window-if-larger-than-buffer)) (error "Faile= d (%s): %s" (if (integerp status) (format "status %d" status) status) full-= command))) (if vc-command-messages (progn (let ((inhibit-message (eq (selec= ted-window) (active-minibuffer-window)))) (message "Done (status=3D%d): %s"= status full-command))))) (let ((process-environment (cons "LC_MESSAGES=3DC" process-environment)) = (w32-quote-process-args t)) (if (eq okstatus 'async) (let ((proc (let ((pro= cess-connection-type nil)) (apply #'start-file-process command (current-buf= fer) command squeezed)))) (if vc-command-messages (progn (let ((inhibit-mes= sage ...)) (message "Running in background: %s" full-command)))) (set-proce= ss-sentinel proc #'ignore) (set-process-filter proc #'vc-process-filter) (s= etq status proc) (if vc-command-messages (progn (vc-exec-after #'(lambda ni= l ...))))) (if vc-command-messages (progn (let ((inhibit-message (eq ... ..= .))) (message "Running in foreground: %s" full-command)))) (let ((buffer-un= do-list t)) (setq status (apply #'process-file command nil t nil squeezed))= ) (if (and (not (eq t okstatus)) (or (not (integerp status)) (and okstatus = (< okstatus status)))) (progn (if (eq 32 (aref (buffer-name ...) 0)) nil (p= op-to-buffer (current-buffer)) (goto-char (point-min)) (shrink-window-if-la= rger-than-buffer)) (error "Failed (%s): %s" (if (integerp status) (format "= status %d" status) status) full-command))) (if vc-command-messages (progn (= let ((inhibit-message (eq ... ...))) (message "Done (status=3D%d): %s" stat= us full-command)))))) (let ((squeezed (remq nil flags)) (inhibit-read-only t) (status 0)) (if f= iles (progn (setq squeezed (nconc squeezed files)))) (let ((process-environ= ment (cons "LC_MESSAGES=3DC" process-environment)) (w32-quote-process-args = t)) (if (eq okstatus 'async) (let ((proc (let (...) (apply ... command ... = command squeezed)))) (if vc-command-messages (progn (let (...) (message "Ru= nning in background: %s" full-command)))) (set-process-sentinel proc #'igno= re) (set-process-filter proc #'vc-process-filter) (setq status proc) (if vc= -command-messages (progn (vc-exec-after #'...)))) (if vc-command-messages (= progn (let ((inhibit-message ...)) (message "Running in foreground: %s" ful= l-command)))) (let ((buffer-undo-list t)) (setq status (apply #'process-fil= e command nil t nil squeezed))) (if (and (not (eq t okstatus)) (or (not (in= tegerp status)) (and okstatus (< okstatus status)))) (progn (if (eq 32 (are= f ... 0)) nil (pop-to-buffer (current-buffer)) (goto-char (point-min)) (shr= ink-window-if-larger-than-buffer)) (error "Failed (%s): %s" (if (integerp s= tatus) (format "status %d" status) status) full-command))) (if vc-command-m= essages (progn (let ((inhibit-message ...)) (message "Done (status=3D%d): %= s" status full-command)))))) (vc-exec-after #'(lambda nil (run-hook-with-ar= gs 'vc-post-command-functions command file-or-list flags))) status) (save-current-buffer (if (or (eq buffer t) (and (stringp buffer) (string= =3D (buffer-name) buffer)) (eq buffer (current-buffer))) nil (vc-setup-buff= er buffer)) (let ((squeezed (remq nil flags)) (inhibit-read-only t) (status= 0)) (if files (progn (setq squeezed (nconc squeezed files)))) (let ((proce= ss-environment (cons "LC_MESSAGES=3DC" process-environment)) (w32-quote-pro= cess-args t)) (if (eq okstatus 'async) (let ((proc (let ... ...))) (if vc-c= ommand-messages (progn (let ... ...))) (set-process-sentinel proc #'ignore)= (set-process-filter proc #'vc-process-filter) (setq status proc) (if vc-co= mmand-messages (progn (vc-exec-after ...)))) (if vc-command-messages (progn= (let (...) (message "Running in foreground: %s" full-command)))) (let ((bu= ffer-undo-list t)) (setq status (apply #'process-file command nil t nil squ= eezed))) (if (and (not (eq t okstatus)) (or (not ...) (and okstatus ...))) = (progn (if (eq 32 ...) nil (pop-to-buffer ...) (goto-char ...) (shrink-wind= ow-if-larger-than-buffer)) (error "Failed (%s): %s" (if ... ... status) ful= l-command))) (if vc-command-messages (progn (let (...) (message "Done (stat= us=3D%d): %s" status full-command)))))) (vc-exec-after #'(lambda nil (run-h= ook-with-args 'vc-post-command-functions command file-or-list flags))) stat= us)) (let* ((files (mapcar #'(lambda (f) (file-relative-name (expand-file-name= f))) (if (listp file-or-list) file-or-list (list file-or-list)))) (message= -truncate-lines t) (full-command (concat (if vc-tor "torsocks " "") (if (st= ring=3D (substring command -1) "\n") (substring command 0 -1) command) " " = (vc-delistify flags) " " (vc-delistify files)))) (save-current-buffer (if (= or (eq buffer t) (and (stringp buffer) (string=3D (buffer-name) buffer)) (e= q buffer (current-buffer))) nil (vc-setup-buffer buffer)) (let ((squeezed (= remq nil flags)) (inhibit-read-only t) (status 0)) (if files (progn (setq s= queezed (nconc squeezed files)))) (let ((process-environment (cons "LC_MESS= AGES=3DC" process-environment)) (w32-quote-process-args t)) (if (eq okstatu= s 'async) (let ((proc ...)) (if vc-command-messages (progn ...)) (set-proce= ss-sentinel proc #'ignore) (set-process-filter proc #'vc-process-filter) (s= etq status proc) (if vc-command-messages (progn ...))) (if vc-command-messa= ges (progn (let ... ...))) (let ((buffer-undo-list t)) (setq status (apply = ... command nil t nil squeezed))) (if (and (not ...) (or ... ...)) (progn (= if ... nil ... ... ...) (error "Failed (%s): %s" ... full-command))) (if vc= -command-messages (progn (let ... ...))))) (vc-exec-after #'(lambda nil (ru= n-hook-with-args 'vc-post-command-functions command file-or-list flags))) s= tatus))) vc-do-command("*vc*" 0 "git" (":(literal)/tmp/emacs/etc/NEWS" ":(literal)= /tmp/emacs/lisp/mouse.el" ":(literal)/tmp/emacs/lisp/tab-bar.el" ":(literal= )/tmp/emacs/src/dispextern.h" ":(literal)/tmp/emacs/src/keyboard.c" ":(lite= ral)/tmp/emacs/src/term.c" ":(literal)/tmp/emacs/src/termchar.h" ":(literal= )/tmp/emacs/src/w32inevt.c" ":(literal)/tmp/emacs/src/w32term.c" ":(literal= )/tmp/emacs/src/xdisp.c" ":(literal)/tmp/emacs/src/xterm.c") "--no-pager" "= commit" "-m" #("Redesign tab-bar event processing (bug#41342, bug#..." 0 56= (face log-edit-summary jit-lock-defer-multiline t fontified t) 56 335 (fon= tified t) 335 337 (font-lock-multiline t fontified t) 337 338 (face nil fon= t-lock-multiline t fontified t) 338 392 (fontified t) 392 394 (font-lock-mu= ltiline t fontified t) 394 395 (face nil font-lock-multiline t fontified t)= 395 444 (fontified t) 444 446 (font-lock-multiline t fontified t) 446 447 = (face nil font-lock-multiline t fontified t) 447 488 (fontified t) 488 490 = (font-lock-multiline t fontified t) 490 491 (face nil font-lock-multiline t= fontified t) 491 641 (fontified t) 641 643 (font-lock-multiline t fontifie= d t) 643 644 (face nil font-lock-multiline t fontified t) ...) "--only" "--= ") vc-git-command(nil 0 (":(literal)/tmp/emacs/etc/NEWS" ":(literal)/tmp/ema= cs/lisp/mouse.el" ":(literal)/tmp/emacs/lisp/tab-bar.el" ":(literal)/tmp/em= acs/src/dispextern.h" ":(literal)/tmp/emacs/src/keyboard.c" ":(literal)/tmp= /emacs/src/term.c" ":(literal)/tmp/emacs/src/termchar.h" ":(literal)/tmp/em= acs/src/w32inevt.c" ":(literal)/tmp/emacs/src/w32term.c" ":(literal)/tmp/em= acs/src/xdisp.c" ":(literal)/tmp/emacs/src/xterm.c") "commit" "-m" #("Redes= ign tab-bar event processing (bug#41342, bug#..." 0 56 (face log-edit-summa= ry jit-lock-defer-multiline t fontified t) 56 335 (fontified t) 335 337 (fo= nt-lock-multiline t fontified t) 337 338 (face nil font-lock-multiline t fo= ntified t) 338 392 (fontified t) 392 394 (font-lock-multiline t fontified t= ) 394 395 (face nil font-lock-multiline t fontified t) 395 444 (fontified t= ) 444 446 (font-lock-multiline t fontified t) 446 447 (face nil font-lock-m= ultiline t fontified t) 447 488 (fontified t) 488 490 (font-lock-multiline = t fontified t) 490 491 (face nil font-lock-multiline t fontified t) 491 641= (fontified t) 641 643 (font-lock-multiline t fontified t) 643 644 (face ni= l font-lock-multiline t fontified t) ...) "--only" "--") vc-git-checkin(("/tmp/emacs/etc/NEWS" "/tmp/emacs/lisp/mouse.el" "/tmp/em= acs/lisp/tab-bar.el" "/tmp/emacs/src/dispextern.h" "/tmp/emacs/src/keyboard= .c" "/tmp/emacs/src/term.c" "/tmp/emacs/src/termchar.h" "/tmp/emacs/src/w32= inevt.c" "/tmp/emacs/src/w32term.c" "/tmp/emacs/src/xdisp.c" "/tmp/emacs/sr= c/xterm.c") #("Redesign tab-bar event processing (bug#41342, bug#..." 0 56 = (face log-edit-summary jit-lock-defer-multiline t fontified t) 56 335 (font= ified t) 335 337 (font-lock-multiline t fontified t) 337 338 (face nil font= -lock-multiline t fontified t) 338 392 (fontified t) 392 394 (font-lock-mul= tiline t fontified t) 394 395 (face nil font-lock-multiline t fontified t) = 395 444 (fontified t) 444 446 (font-lock-multiline t fontified t) 446 447 (= face nil font-lock-multiline t fontified t) 447 488 (fontified t) 488 490 (= font-lock-multiline t fontified t) 490 491 (face nil font-lock-multiline t = fontified t) 491 641 (fontified t) 641 643 (font-lock-multiline t fontified= t) 643 644 (face nil font-lock-multiline t fontified t) ...) nil) apply(vc-git-checkin (("/tmp/emacs/etc/NEWS" "/tmp/emacs/lisp/mouse.el" "= /tmp/emacs/lisp/tab-bar.el" "/tmp/emacs/src/dispextern.h" "/tmp/emacs/src/k= eyboard.c" "/tmp/emacs/src/term.c" "/tmp/emacs/src/termchar.h" "/tmp/emacs/= src/w32inevt.c" "/tmp/emacs/src/w32term.c" "/tmp/emacs/src/xdisp.c" "/tmp/e= macs/src/xterm.c") #("Redesign tab-bar event processing (bug#41342, bug#...= " 0 56 (face log-edit-summary jit-lock-defer-multiline t fontified t) 56 33= 5 (fontified t) 335 337 (font-lock-multiline t fontified t) 337 338 (face n= il font-lock-multiline t fontified t) 338 392 (fontified t) 392 394 (font-l= ock-multiline t fontified t) 394 395 (face nil font-lock-multiline t fontif= ied t) 395 444 (fontified t) 444 446 (font-lock-multiline t fontified t) 44= 6 447 (face nil font-lock-multiline t fontified t) 447 488 (fontified t) 48= 8 490 (font-lock-multiline t fontified t) 490 491 (face nil font-lock-multi= line t fontified t) 491 641 (fontified t) 641 643 (font-lock-multiline t fo= ntified t) 643 644 (face nil font-lock-multiline t fontified t) ...) nil)) vc-call-backend(Git checkin ("/tmp/emacs/etc/NEWS" "/tmp/emacs/lisp/mouse= .el" "/tmp/emacs/lisp/tab-bar.el" "/tmp/emacs/src/dispextern.h" "/tmp/emacs= /src/keyboard.c" "/tmp/emacs/src/term.c" "/tmp/emacs/src/termchar.h" "/tmp/= emacs/src/w32inevt.c" "/tmp/emacs/src/w32term.c" "/tmp/emacs/src/xdisp.c" "= /tmp/emacs/src/xterm.c") #("Redesign tab-bar event processing (bug#41342, b= ug#..." 0 56 (face log-edit-summary jit-lock-defer-multiline t fontified t)= 56 335 (fontified t) 335 337 (font-lock-multiline t fontified t) 337 338 (= face nil font-lock-multiline t fontified t) 338 392 (fontified t) 392 394 (= font-lock-multiline t fontified t) 394 395 (face nil font-lock-multiline t = fontified t) 395 444 (fontified t) 444 446 (font-lock-multiline t fontified= t) 446 447 (face nil font-lock-multiline t fontified t) 447 488 (fontified= t) 488 490 (font-lock-multiline t fontified t) 490 491 (face nil font-lock= -multiline t fontified t) 491 641 (fontified t) 641 643 (font-lock-multilin= e t fontified t) 643 644 (face nil font-lock-multiline t fontified t) ...) = nil) #f(compiled-function (files comment) #)(("/= tmp/emacs/etc/NEWS" "/tmp/emacs/lisp/mouse.el" "/tmp/emacs/lisp/tab-bar.el"= "/tmp/emacs/src/dispextern.h" "/tmp/emacs/src/keyboard.c" "/tmp/emacs/src/= term.c" "/tmp/emacs/src/termchar.h" "/tmp/emacs/src/w32inevt.c" "/tmp/emacs= /src/w32term.c" "/tmp/emacs/src/xdisp.c" "/tmp/emacs/src/xterm.c") #("Redes= ign tab-bar event processing (bug#41342, bug#..." 0 56 (face log-edit-summa= ry jit-lock-defer-multiline t fontified t) 56 335 (fontified t) 335 337 (fo= nt-lock-multiline t fontified t) 337 338 (face nil font-lock-multiline t fo= ntified t) 338 392 (fontified t) 392 394 (font-lock-multiline t fontified t= ) 394 395 (face nil font-lock-multiline t fontified t) 395 444 (fontified t= ) 444 446 (font-lock-multiline t fontified t) 446 447 (face nil font-lock-m= ultiline t fontified t) 447 488 (fontified t) 488 490 (font-lock-multiline = t fontified t) 490 491 (face nil font-lock-multiline t fontified t) 491 641= (fontified t) 641 643 (font-lock-multiline t fontified t) 643 644 (face ni= l font-lock-multiline t fontified t) ...)) vc-finish-logentry() funcall-interactively(vc-finish-logentry) log-edit-done() funcall-interactively(log-edit-done) command-execute(log-edit-done) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 13:18:25 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 17:18:25 +0000 Received: from localhost ([127.0.0.1]:54000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2jJ-0004qb-Jv for submit@debbugs.gnu.org; Tue, 17 Aug 2021 13:18:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2jI-0004qN-5J for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 13:18:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38632) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG2jC-0000zU-8G; Tue, 17 Aug 2021 13:18:18 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3307 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 1mG2jB-0002h7-R4; Tue, 17 Aug 2021 13:18:18 -0400 Date: Tue, 17 Aug 2021 20:18:16 +0300 Message-Id: <83v94456sn.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87r1esys1a.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 17 Aug 2021 19:06:41 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Tue, 17 Aug 2021 19:06:41 +0300 > > I prepared a commit message for the tab-bar patch, everything was nice, > but suddenly the commit failed with an unexpected error: > > Debugger entered--Lisp error: (args-out-of-range 1737 1737) > redisplay_internal\ \(C\ function\)() > message("Running in foreground: %s" #("git --no-pager commit -m Redesign tab-bar event processing (bug#41342, bug#41343)\n\nInstead of emitting menu-item keys like [tab-1],\nemit normal mouse events like [mouse-1] and [mouse-2]\nfor Is this reproducible? If so, put a breakpoint on args_out_of_range, and show the C-level backtrace from the error. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 13:31:16 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 17:31:16 +0000 Received: from localhost ([127.0.0.1]:54023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2vj-0005Av-OF for submit@debbugs.gnu.org; Tue, 17 Aug 2021 13:31:16 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:53719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2ve-0005Ac-Sp for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 13:31:14 -0400 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 2D02A240006; Tue, 17 Aug 2021 17:31:03 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> Date: Tue, 17 Aug 2021 20:30:08 +0300 In-Reply-To: <83v94456sn.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Aug 2021 20:18:16 +0300") Message-ID: <87h7foyo67.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Debugger entered--Lisp error: (args-out-of-range 1737 1737) >> redisplay_internal\ \(C\ function\)() >> message("Running in foreground: %s" #("git --no-pager commit -m > > Is this reproducible? If so, put a breakpoint on args_out_of_range, > and show the C-level backtrace from the error. It's reproducible only in the optimized build and not with -Q. Here is the backtrace: (gdb) bt #0 args_out_of_range (a1=a1@entry=make_fixnum(1737), a2=a2@entry=make_fixnum(1737)) at data.c:154 #1 0x00005555555a7419 in validate_interval_range (object=XIL(0x7ffff02d2e75), begin=0x7fffffff8da8, end=, force=) at textprop.c:174 #2 0x000055555577f1e4 in Ftext_properties_at (position=, position@entry=make_fixnum(1737), object=) at textprop.c:576 #3 0x000055555577f250 in Fget_text_property (position=position@entry=make_fixnum(1737), prop=prop@entry=XIL(0x63c0), object=) at textprop.c:596 #4 0x0000555555660173 in face_at_buffer_position (w=0x55555603c1f8, pos=1737, endptr=0x7fffffff8f40, limit=1837, mouse=, base_face_id=0, attr_filter=0) at xfaces.c:6390 #5 0x00005555555c34c2 in face_at_pos (it=0x7fffffff9040, attr_filter=0) at xdisp.c:4379 #6 0x00005555555db662 in handle_face_prop (it=0x7fffffff9040) at xdisp.c:4475 #7 0x00005555555d5c15 in handle_stop (it=0x7fffffff9040) at xdisp.c:3854 #8 0x00005555555ec9f2 in init_from_display_pos (it=it@entry=0x7fffffff9040, w=w@entry=0x55555603c1f8, pos=pos@entry=0x555561f49460) at xdisp.c:3611 #9 0x00005555555ed094 in init_to_row_start (row=0x555561f49410, w=0x55555603c1f8, it=0x7fffffff9040) at xdisp.c:15032 #10 hscroll_window_tree (window=XIL(0x55555603c1fd), window@entry=XIL(0x55555e5df5bd)) at xdisp.c:15032 #11 0x00005555555ee041 in hscroll_windows (window=XIL(0x55555e5df5bd)) at xdisp.c:15124 #12 redisplay_internal () at xdisp.c:16093 #13 0x00005555555ef4bf in echo_area_display (update_frame_p=) at xdisp.c:12351 #14 0x00005555555ef7b1 in message3_nolog (m=) at xdisp.c:11274 #15 0x00005555555efaa8 in message3 (m=m@entry=XIL(0x55556286c2a4)) at xdisp.c:11204 #16 0x000055555570d2d4 in Fmessage (args=0x7fffffffc0a0, nargs=) at editfns.c:2876 #17 Fmessage (nargs=, args=0x7fffffffc0a0) at editfns.c:2844 #18 0x00005555557191b8 in eval_sub (form=) at lisp.h:2093 #19 0x000055555571a49d in Fprogn (body=XIL(0)) at eval.c:471 #20 Flet (args=) at eval.c:1057 #21 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #22 0x000055555571934d in Fprogn (body=XIL(0)) at eval.c:471 #23 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #24 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #25 0x000055555571988d in Fprogn (body=XIL(0x55555e3c0d73)) at eval.c:471 #26 Fif (args=) at eval.c:427 #27 Fif (args=) at eval.c:413 #28 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #29 0x000055555571a49d in Fprogn (body=XIL(0)) at eval.c:471 #30 Flet (args=) at eval.c:1057 #31 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #32 0x000055555571a49d in Fprogn (body=XIL(0x55555e3c9293)) at eval.c:471 #33 Flet (args=) at eval.c:1057 #34 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #35 0x000055555571934d in Fprogn (body=XIL(0), body@entry=XIL(0x55555e3c1a13)) at eval.c:471 #36 0x000055555570818e in Fsave_current_buffer (args=XIL(0x55555e3c1a13)) at editfns.c:867 #37 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #38 0x000055555571a6c5 in Fprogn (body=XIL(0)) at eval.c:471 #39 FletX (args=XIL(0x55555e3c9233)) at eval.c:989 #40 0x000055555571907f in eval_sub (form=) at lisp.h:2093 #41 0x0000555555719c3d in Fprogn (body=XIL(0)) at eval.c:471 #42 funcall_lambda (fun=XIL(0x55555e3c90c3), nargs=10, arg_vector=0x7fffffffcac8) at eval.c:3328 #43 0x00005555557164c7 in Ffuncall (nargs=11, args=0x7fffffffcac0) at eval.c:3067 #44 0x00005555557187b8 in Fapply (nargs=6, args=0x7fffffffcbd0) at eval.c:2681 #45 0x00007fffde61c76b in ?? () #46 0x0000000000000000 in ?? () Lisp Backtrace: "redisplay_internal (C function)" (0x0) "message" (0xffffc0a0) "let" (0xffffc220) "progn" (0xffffc300) "if" (0xffffc3c0) "if" (0xffffc4a0) "let" (0xffffc5f0) "let" (0xffffc740) "save-current-buffer" (0xffffc840) "let*" (0xffffc960) "vc-do-command" (0xffffcac8) "vc-git-command" (0xffffcc98) "vc-git-checkin" (0xffffcef8) "apply" (0xffffd010) "vc-call-backend" (0xffffd350) 0x619c10a0 PVEC_COMPILED "vc-finish-logentry" (0xffffd9c0) "funcall-interactively" (0xffffd9b8) "log-edit-done" (0xffffdd20) "funcall-interactively" (0xffffdd18) "command-execute" (0xffffde88) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 13:51:58 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 17:51:58 +0000 Received: from localhost ([127.0.0.1]:54066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG3Fm-0005q0-3B for submit@debbugs.gnu.org; Tue, 17 Aug 2021 13:51:58 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG3Fk-0005pm-HX for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 13:51:57 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 762FFC0003; Tue, 17 Aug 2021 17:51:49 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> Date: Tue, 17 Aug 2021 20:51:13 +0300 In-Reply-To: <87h7foyo67.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 17 Aug 2021 20:30:08 +0300") Message-ID: <87im04x8mm.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> Debugger entered--Lisp error: (args-out-of-range 1737 1737) >>> redisplay_internal\ \(C\ function\)() >>> message("Running in foreground: %s" #("git --no-pager commit -m >> >> Is this reproducible? If so, put a breakpoint on args_out_of_range, >> and show the C-level backtrace from the error. > > It's reproducible only in the optimized build and not with -Q. Actually, it fails in non-optimized build too with the next backtrace. It fails only after some commit was made after 2021-08-11. Should I bisect or do you have an idea what commit caused this? (gdb) bt #0 args_out_of_range (a1=XIL(0x7f71fab29710), a2=XIL(0x55c2daa33efc)) at data.c:154 #1 0x000055c2daa345d1 in validate_interval_range (object=XIL(0x7f71fab29715), begin=0x7ffdc316c408, end=0x7ffdc316c408, force=false) at textprop.c:159 #2 0x000055c2daa355bd in Ftext_properties_at (position=make_fixnum(1737), object=XIL(0x7f71fab29715)) at textprop.c:576 #3 0x000055c2daa35661 in Fget_text_property (position=make_fixnum(1737), prop=XIL(0x63c0), object=XIL(0x7f71fab29715)) at textprop.c:596 #4 0x000055c2da88604f in face_at_buffer_position (w=0x55c2dd062400, pos=1737, endptr=0x7ffdc316c630, limit=1837, mouse=false, base_face_id=0, attr_filter=0) at xfaces.c:6390 #5 0x000055c2da79d6ff in face_at_pos (it=0x7ffdc316c8c0, attr_filter=0) at xdisp.c:4379 #6 0x000055c2da79d9e4 in handle_face_prop (it=0x7ffdc316c8c0) at xdisp.c:4475 #7 0x000055c2da79c103 in handle_stop (it=0x7ffdc316c8c0) at xdisp.c:3854 #8 0x000055c2da7a535c in reseat (it=0x7ffdc316c8c0, pos=..., force_p=true) at xdisp.c:7098 #9 0x000055c2da79b4e0 in init_iterator (it=0x7ffdc316c8c0, w=0x55c2dd062400, charpos=1737, bytepos=1737, row=0x0, base_face_id=DEFAULT_FACE_ID) at xdisp.c:3455 #10 0x000055c2da79bae2 in init_from_display_pos (it=0x7ffdc316c8c0, w=0x55c2dd062400, pos=0x55c2e3f9fca0) at xdisp.c:3611 #11 0x000055c2da79bf2e in init_to_row_start (it=0x7ffdc316c8c0, w=0x55c2dd062400, row=0x55c2e3f9fc50) at xdisp.c:3735 #12 0x000055c2da7ba1cf in hscroll_window_tree (window=XIL(0x55c2dd062405)) at xdisp.c:15022 #13 0x000055c2da7ba640 in hscroll_windows (window=XIL(0x55c2e4356385)) at xdisp.c:15114 #14 0x000055c2da7bc889 in redisplay_internal () at xdisp.c:16083 #15 0x000055c2da7b5684 in echo_area_display (update_frame_p=true) at xdisp.c:12351 #16 0x000055c2da7b2103 in message3_nolog (m=XIL(0x55c2e158b524)) at xdisp.c:11274 #17 0x000055c2da7b1e58 in message3 (m=XIL(0x55c2e158b524)) at xdisp.c:11204 #18 0x000055c2da9934cf in Fmessage (nargs=2, args=0x7ffdc316faa0) at editfns.c:2876 #19 0x00007f71f22a9424 in F76632d646f2d636f6d6d616e64_vc_do_command_0 () at ~/.emacs.d/eln-cache/28.0.50-feb482d9/vc-dispatcher-d82eb341-5ade7cf9.eln #20 0x000055c2da9a2c20 in funcall_subr (subr=0x55c2e015eec8, numargs=10, args=0x7ffdc316fd48) at eval.c:3106 #21 0x000055c2da9a28c1 in Ffuncall (nargs=11, args=0x7ffdc316fd40) at eval.c:3051 #22 0x000055c2da9a1ac5 in Fapply (nargs=6, args=0x7ffdc316fe60) at eval.c:2681 #23 0x00007f71f1bcd76b in F76632d6769742d636f6d6d616e64_vc_git_command_0 () at ~/.emacs.d/eln-cache/28.0.50-feb482d9/vc-git-5d6756dc-9d3480db.eln #24 0x000055c2da9a2c20 in funcall_subr (subr=0x55c2e5153c50, numargs=8, args=0x7ffdc316ffe8) at eval.c:3106 #25 0x000055c2da9a28c1 in Ffuncall (nargs=9, args=0x7ffdc316ffe0) at eval.c:3051 #26 0x000055c2da9a1ac5 in Fapply (nargs=5, args=0x7ffdc3170190) at eval.c:2681 #27 0x00007f71f1bc7afa in F76632d6769742d636865636b696e_vc_git_checkin_0 () at ~/.emacs.d/eln-cache/28.0.50-feb482d9/vc-git-5d6756dc-9d3480db.eln #28 0x000055c2da9a2d76 in funcall_subr (subr=0x55c2e3c10ec0, numargs=3, args=0x7ffdc3170318) at eval.c:3131 #29 0x000055c2da9a28c1 in Ffuncall (nargs=4, args=0x7ffdc3170310) at eval.c:3051 #30 0x000055c2da9a1ac5 in Fapply (nargs=2, args=0x7ffdc3170500) at eval.c:2681 #31 0x000055c2da9a2c20 in funcall_subr (subr=0x55c2dae74d20 , numargs=2, args=0x7ffdc3170500) at eval.c:3106 #32 0x000055c2da9a28c1 in Ffuncall (nargs=3, args=0x7ffdc31704f8) at eval.c:3051 #33 0x000055c2da9f40a6 in exec_byte_code (bytestr=XIL(0x7f71fa66f174), vector=XIL(0x7f71fa66eb1d), maxdepth=make_fixnum(12), args_template=make_fixnum(642), nargs=5, args=0x7ffdc3170a40) at bytecode.c:632 #34 0x000055c2da9a2ff6 in fetch_and_exec_byte_code (fun=XIL(0x7f71fa66eaed), syms_left=make_fixnum(642), nargs=5, args=0x7ffdc3170a30) at eval.c:3175 #35 0x000055c2da9a3400 in funcall_lambda (fun=XIL(0x7f71fa66eaed), nargs=5, arg_vector=0x7ffdc3170a30) at eval.c:3256 #36 0x000055c2da9a2915 in Ffuncall (nargs=6, args=0x7ffdc3170a28) at eval.c:3055 #37 0x000055c2da9f40a6 in exec_byte_code (bytestr=XIL(0x55c2e2cbb484), vector=XIL(0x55c2e249c00d), maxdepth=make_fixnum(13), args_template=make_fixnum(514), nargs=2, args=0x7ffdc3171008) at bytecode.c:632 #38 0x000055c2da9a2ff6 in fetch_and_exec_byte_code (fun=XIL(0x55c2e249c0f5), syms_left=make_fixnum(514), nargs=2, args=0x7ffdc3170ff8) at eval.c:3175 #39 0x000055c2da9a3400 in funcall_lambda (fun=XIL(0x55c2e249c0f5), nargs=2, arg_vector=0x7ffdc3170ff8) at eval.c:3256 #40 0x000055c2da9a2915 in Ffuncall (nargs=3, args=0x7ffdc3170ff0) at eval.c:3055 #41 0x00007f71f22ab1cd in F76632d66696e6973682d6c6f67656e747279_vc_finish_logentry_0 () at ~/.emacs.d/eln-cache/28.0.50-feb482d9/vc-dispatcher-d82eb341-5ade7cf9.eln #42 0x000055c2da9a2d16 in funcall_subr (subr=0x55c2e015f3c8, numargs=0, args=0x7ffdc3171540) at eval.c:3126 #43 0x000055c2da9a28c1 in Ffuncall (nargs=1, args=0x7ffdc3171538) at eval.c:3051 #44 0x000055c2da998936 in Ffuncall_interactively (nargs=1, args=0x7ffdc3171538) at callint.c:260 #45 0x000055c2da9a2c20 in funcall_subr (subr=0x55c2dae74120 , numargs=1, args=0x7ffdc3171538) at eval.c:3106 #46 0x000055c2da9a28c1 in Ffuncall (nargs=2, args=0x7ffdc3171530) at eval.c:3051 #47 0x000055c2da9a1680 in Fapply (nargs=3, args=0x7ffdc3171530) at eval.c:2634 #48 0x000055c2da998d00 in Fcall_interactively (function=XIL(0x531da50), record_flag=XIL(0), keys=XIL(0x55c2e42b7705)) at callint.c:353 #49 0x00007f71f19884c2 in F6c6f672d656469742d646f6e65_log_edit_done_0 () at ~/.emacs.d/eln-cache/28.0.50-feb482d9/log-edit-bc58b2d4-166a3c0d.eln #50 0x000055c2da9a2cfa in funcall_subr (subr=0x55c2e2cc57d0, numargs=0, args=0x7ffdc3171b30) at eval.c:3124 #51 0x000055c2da9a28c1 in Ffuncall (nargs=1, args=0x7ffdc3171b28) at eval.c:3051 #52 0x000055c2da998936 in Ffuncall_interactively (nargs=1, args=0x7ffdc3171b28) at callint.c:260 #53 0x000055c2da9a2c20 in funcall_subr (subr=0x55c2dae74120 , numargs=1, args=0x7ffdc3171b28) at eval.c:3106 #54 0x000055c2da9a28c1 in Ffuncall (nargs=2, args=0x7ffdc3171b20) at eval.c:3051 #55 0x000055c2da9a1680 in Fapply (nargs=3, args=0x7ffdc3171b20) at eval.c:2634 #56 0x000055c2da998d00 in Fcall_interactively (function=XIL(0x8646290), record_flag=XIL(0), keys=XIL(0x55c2e262dd25)) at callint.c:353 #57 0x00007f71fa4c4031 in F636f6d6d616e642d65786563757465_command_execute_0 () at ./native-lisp/28.0.50-feb482d9/preloaded/simple-fab5b0cf-08afa05f.eln #58 0x000055c2da9a2db4 in funcall_subr (subr=0x7f71fa66ba90, numargs=1, args=0x7ffdc3171d48) at eval.c:3134 #59 0x000055c2da9a28c1 in Ffuncall (nargs=2, args=0x7ffdc3171d40) at eval.c:3051 #60 0x000055c2da9a2122 in call1 (fn=XIL(0x4560), arg1=XIL(0x8646290)) at eval.c:2911 #61 0x000055c2da8dd2fe in command_loop_1 () at keyboard.c:1489 #62 0x000055c2da99e8c2 in internal_condition_case (bfun=0x55c2da8dcaac , handlers=XIL(0x90), hfun=0x55c2da8dc0df ) at eval.c:1478 #63 0x000055c2da8dc750 in command_loop_2 (handlers=XIL(0x90)) at keyboard.c:1117 #64 0x000055c2da99de86 in internal_catch (tag=XIL(0xe6d0), func=0x55c2da8dc725 , arg=XIL(0x90)) at eval.c:1198 #65 0x000055c2da8dc6f1 in command_loop () at keyboard.c:1095 #66 0x000055c2da8dbc74 in recursive_edit_1 () at keyboard.c:720 #67 0x000055c2da8dbe1b in Frecursive_edit () at keyboard.c:792 #68 0x000055c2da8d84e2 in main (argc=1, argv=0x7ffdc3172248) at emacs.c:2310 Lisp Backtrace: "redisplay_internal (C function)" (0x0) "vc-do-command" (0xc316fd48) "vc-git-command" (0xc316ffe8) "vc-git-checkin" (0xc3170318) "apply" (0xc3170500) "vc-call-backend" (0xc3170a30) 0xe249c0f0 PVEC_COMPILED "vc-finish-logentry" (0xc3171540) "funcall-interactively" (0xc3171538) "log-edit-done" (0xc3171b30) "funcall-interactively" (0xc3171b28) "command-execute" (0xc3171d48) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 14:16:41 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 18:16:41 +0000 Received: from localhost ([127.0.0.1]:54096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG3dg-0006Ua-PD for submit@debbugs.gnu.org; Tue, 17 Aug 2021 14:16:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG3de-0006UJ-Ay for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 14:16:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41632) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG3dY-0001IK-HA; Tue, 17 Aug 2021 14:16:32 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2871 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 1mG3dX-0003el-J4; Tue, 17 Aug 2021 14:16:32 -0400 Date: Tue, 17 Aug 2021 21:16:27 +0300 Message-Id: <83sfz8543o.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87im04x8mm.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 17 Aug 2021 20:51:13 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Tue, 17 Aug 2021 20:51:13 +0300 > > >>> Debugger entered--Lisp error: (args-out-of-range 1737 1737) > >>> redisplay_internal\ \(C\ function\)() > >>> message("Running in foreground: %s" #("git --no-pager commit -m > >> > >> Is this reproducible? If so, put a breakpoint on args_out_of_range, > >> and show the C-level backtrace from the error. > > > > It's reproducible only in the optimized build and not with -Q. > > Actually, it fails in non-optimized build too with the next backtrace. > It fails only after some commit was made after 2021-08-11. > Should I bisect or do you have an idea what commit caused this? It's more interesting to understand first why does Emacs think these "args are out of range". What is 'object' here: > #1 0x000055c2daa345d1 in validate_interval_range (object=XIL(0x7f71fab29715), begin=0x7ffdc316c408, end=0x7ffdc316c408, force=false) at textprop.c:159 Ask GDB: (gdb) frame 1 (gdb) p object (gdb) xtype If 'object' is a buffer, then (gdb) p BUF_BEGV (XBUFFER (object)) (gdb) p BUF_ZV (XBUFFER (object)) If 'object' is a string, then (gdb) p SCHARS (object) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 14:25:52 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 18:25:52 +0000 Received: from localhost ([127.0.0.1]:54113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG3ma-0006lB-0I for submit@debbugs.gnu.org; Tue, 17 Aug 2021 14:25:52 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:51451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG3mX-0006kt-O0 for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 14:25:50 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id A0A53C0004; Tue, 17 Aug 2021 18:25:42 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> Date: Tue, 17 Aug 2021 21:24:29 +0300 In-Reply-To: <83sfz8543o.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Aug 2021 21:16:27 +0300") Message-ID: <874kbox736.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Should I bisect or do you have an idea what commit caused this? Meanwhile, I narrowed it down to some commit between 5d7b1d5fc7 and adb6c3f1a4. > It's more interesting to understand first why does Emacs think these > "args are out of range". What is 'object' here: > >> #1 0x000055c2daa345d1 in validate_interval_range >> (object=XIL(0x7f71fab29715), begin=0x7ffdc316c408, >> end=0x7ffdc316c408, force=false) at textprop.c:159 > > Ask GDB: > > (gdb) frame 1 > (gdb) p object > (gdb) xtype (gdb) frame 1 #1 0x000056533c3b51a8 in validate_interval_range (object=XIL(0x7f56134fb6bd), begin=0x7fff7e2e3448, end=0x7fff7e2e3448, force=false) at textprop.c:159 159 args_out_of_range (begin0, end0); (gdb) p object $1 = XIL(0x7f56134fb6bd) (gdb) xtype Lisp_Vectorlike PVEC_BUFFER > If 'object' is a buffer, then > > (gdb) p BUF_BEGV (XBUFFER (object)) > (gdb) p BUF_ZV (XBUFFER (object)) (gdb) p BUF_BEGV (XBUFFER (object)) $2 = 1 (gdb) p BUF_ZV (XBUFFER (object)) $3 = 1 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 14:41:09 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 18:41:09 +0000 Received: from localhost ([127.0.0.1]:54124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG41N-0007BY-2D for submit@debbugs.gnu.org; Tue, 17 Aug 2021 14:41:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG41K-0007BE-KE for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 14:41:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42938) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG41F-0001lu-6u; Tue, 17 Aug 2021 14:41:01 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4367 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 1mG41E-0007Ds-BJ; Tue, 17 Aug 2021 14:41:01 -0400 Date: Tue, 17 Aug 2021 21:40:56 +0300 Message-Id: <83mtpf6hjb.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <874kbox736.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 17 Aug 2021 21:24:29 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Tue, 17 Aug 2021 21:24:29 +0300 > > (gdb) p BUF_BEGV (XBUFFER (object)) > $2 = 1 > (gdb) p BUF_ZV (XBUFFER (object)) > $3 = 1 So we are in the wrong (empty) buffer? Or did someone delete the buffer's text under our feet? What does this show: (gdb) p object->name_ (gdb) xstring (gdb) p current_buffer->name_ (gdb) xstring From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 14:52:37 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 18:52:37 +0000 Received: from localhost ([127.0.0.1]:54128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG4CT-0007VA-4D for submit@debbugs.gnu.org; Tue, 17 Aug 2021 14:52:37 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:60673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG4CQ-0007Us-IW for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 14:52:36 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2DE1860002; Tue, 17 Aug 2021 18:52:26 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> Date: Tue, 17 Aug 2021 21:51:36 +0300 In-Reply-To: <83mtpf6hjb.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Aug 2021 21:40:56 +0300") Message-ID: <87eearx5tz.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > So we are in the wrong (empty) buffer? Or did someone delete the > buffer's text under our feet? What does this show: > > (gdb) p object->name_ > (gdb) xstring > (gdb) p current_buffer->name_ > (gdb) xstring (gdb) p XBUFFER (object)->name_ $7 = XIL(0x7f015341fb84) (gdb) xstring $8 = (struct Lisp_String *) 0x7f015341fb80 " *Minibuf-0*" (gdb) p current_buffer->name_ $9 = XIL(0x7f015341fb84) (gdb) xstring $10 = (struct Lisp_String *) 0x7f015341fb80 " *Minibuf-0*" PS: Some commit between e2eb58c487 and 31ab12e261 broke that, but maybe this is not important because these commits just changed the length of the git command by adding ":(literal)", and length change maybe exposed some other problem. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 15:00:50 2021 Received: (at 50096) by debbugs.gnu.org; 17 Aug 2021 19:00:51 +0000 Received: from localhost ([127.0.0.1]:54132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG4KM-0007jg-To for submit@debbugs.gnu.org; Tue, 17 Aug 2021 15:00:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG4KH-0007jL-GU for 50096@debbugs.gnu.org; Tue, 17 Aug 2021 15:00:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43662) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG4KB-0006Rw-SD; Tue, 17 Aug 2021 15:00:35 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1590 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 1mG4KB-0003ym-2N; Tue, 17 Aug 2021 15:00:35 -0400 Date: Tue, 17 Aug 2021 22:00:29 +0300 Message-Id: <83k0kj6gmq.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87eearx5tz.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 17 Aug 2021 21:51:36 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Tue, 17 Aug 2021 21:51:36 +0300 > > > So we are in the wrong (empty) buffer? Or did someone delete the > > buffer's text under our feet? What does this show: > > > > (gdb) p object->name_ > > (gdb) xstring > > (gdb) p current_buffer->name_ > > (gdb) xstring > > (gdb) p XBUFFER (object)->name_ > $7 = XIL(0x7f015341fb84) > (gdb) xstring > $8 = (struct Lisp_String *) 0x7f015341fb80 > " *Minibuf-0*" > (gdb) p current_buffer->name_ > $9 = XIL(0x7f015341fb84) > (gdb) xstring > $10 = (struct Lisp_String *) 0x7f015341fb80 > " *Minibuf-0*" Hm... something else is at work here. > PS: Some commit between e2eb58c487 and 31ab12e261 broke that, > but maybe this is not important because these commits > just changed the length of the git command by adding ":(literal)", > and length change maybe exposed some other problem. You are saying that if you remove the ":(literal)" part without changing anything else, the problem goes away? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 04:09:59 2021 Received: (at 50096) by debbugs.gnu.org; 18 Aug 2021 08:09:59 +0000 Received: from localhost ([127.0.0.1]:54774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGGe7-0004Qx-5W for submit@debbugs.gnu.org; Wed, 18 Aug 2021 04:09:59 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:59611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGGe5-0004Qi-2x for 50096@debbugs.gnu.org; Wed, 18 Aug 2021 04:09:57 -0400 Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C9F54240009; Wed, 18 Aug 2021 08:09:49 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> Date: Wed, 18 Aug 2021 10:42:23 +0300 In-Reply-To: <83k0kj6gmq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Aug 2021 22:00:29 +0300") Message-ID: <87im03tc6g.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> (gdb) xstring >> $8 = (struct Lisp_String *) 0x7f015341fb80 >> " *Minibuf-0*" > > Hm... something else is at work here. I don't understand how this is supposed to work. The buffer " *Minibuf-0*" is always empty at the time of calling message3_nolog, whereas the buffer " *Echo Area 0*" contains the message to display. The steps are following: 1. message3_nolog calls echo_area_display 2. echo_area_display calls redisplay_internal 3. redisplay_internal clears all matrices with clear_desired_matrices 4. redisplay_internal calls echo_area_display that temporarily changes mini_window's buffer from " *Minibuf-0*" to " *Echo Area 0*". This updates w->desired_matrix to contain information about " *Echo Area 0*" displayed in the mini_window. But unwind_with_echo_area_buffer immediately changes mini_window's buffer back to empty " *Minibuf-0*". 5. redisplay_internal calls hscroll_window_tree where cursor_row already contains information that was valid when " *Echo Area 0*" was temporarily displayed in mini_window: (gdb) l 14896 cursor_row = MATRIX_ROW (w->desired_matrix, w->cursor.vpos); (gdb) p *cursor_row ... start = { pos = { charpos = 1737, bytepos = 1737 }, ... end = { pos = { charpos = 2150, bytepos = 2150 These numbers are valid positions in " *Echo Area 0*" that was temporarily displayed in mini_window, but now mini_window's buffer is empty " *Minibuf-0*". >> PS: Some commit between e2eb58c487 and 31ab12e261 broke that, >> but maybe this is not important because these commits >> just changed the length of the git command by adding ":(literal)", >> and length change maybe exposed some other problem. > > You are saying that if you remove the ":(literal)" part without > changing anything else, the problem goes away? Indeed, it broke after the commit 3572613550. But after applying this patch it works again without errors: diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ffe1e6832c..0bea987a06 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -950,7 +950,7 @@ vc-git-checkin (lambda (value) (when (equal value "yes") (list argument))))) ;; When operating on the whole tree, better pass "-a" than ".", since "." ;; fails when we're committing a merge. - (apply #'vc-git-command nil 0 (if only (vc-git--literal-pathspecs files)) + (apply #'vc-git-command nil 0 (if only files) (nconc (if msg-file (list "commit" "-F" (file-local-name msg-file)) (list "commit" "-m")) I guess additional ":(literal)" string increases the length of the displayed message, and longer message triggers the bug. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 08:18:40 2021 Received: (at 50096) by debbugs.gnu.org; 18 Aug 2021 12:18:40 +0000 Received: from localhost ([127.0.0.1]:55063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGKWl-0004gk-Uu for submit@debbugs.gnu.org; Wed, 18 Aug 2021 08:18:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGKWg-0004gS-IU for 50096@debbugs.gnu.org; Wed, 18 Aug 2021 08:18:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44700) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGKWa-0007Vh-TE; Wed, 18 Aug 2021 08:18:28 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1208 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 1mGKWZ-0000Lb-Oe; Wed, 18 Aug 2021 08:18:28 -0400 Date: Wed, 18 Aug 2021 15:18:29 +0300 Message-Id: <834kbn54kq.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87im03tc6g.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 10:42:23 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Wed, 18 Aug 2021 10:42:23 +0300 > > >> (gdb) xstring > >> $8 = (struct Lisp_String *) 0x7f015341fb80 > >> " *Minibuf-0*" > > > > Hm... something else is at work here. > > I don't understand how this is supposed to work. The buffer " *Minibuf-0*" > is always empty at the time of calling message3_nolog, whereas the buffer > " *Echo Area 0*" contains the message to display. Yes, some code switches to another buffer at the wrong moment. > The steps are following: > > 1. message3_nolog calls echo_area_display > 2. echo_area_display calls redisplay_internal > 3. redisplay_internal clears all matrices with clear_desired_matrices > 4. redisplay_internal calls echo_area_display > that temporarily changes mini_window's buffer > from " *Minibuf-0*" to " *Echo Area 0*". > This updates w->desired_matrix to contain information > about " *Echo Area 0*" displayed in the mini_window. > But unwind_with_echo_area_buffer immediately > changes mini_window's buffer back to empty " *Minibuf-0*". > 5. redisplay_internal calls hscroll_window_tree > where cursor_row already contains information > that was valid when " *Echo Area 0*" was temporarily > displayed in mini_window: Any idea why we call hscroll_window_tree in this case? I'm guessing this is due to some customizations of yours, in which case I'd appreciate a reproduction recipe starting from "emacs -Q". It is very hard to debug such problems via email. > > You are saying that if you remove the ":(literal)" part without > > changing anything else, the problem goes away? > > Indeed, it broke after the commit 3572613550. > But after applying this patch it works again without errors: Does this patch work by preventing hscrolling? > I guess additional ":(literal)" string increases the length > of the displayed message, and longer message triggers the bug. How does it trigger it? via hscrolling or some other way? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 12:45:03 2021 Received: (at 50096) by debbugs.gnu.org; 18 Aug 2021 16:45:03 +0000 Received: from localhost ([127.0.0.1]:57439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOgZ-000284-38 for submit@debbugs.gnu.org; Wed, 18 Aug 2021 12:45:03 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:59391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOgU-00026S-01 for 50096@debbugs.gnu.org; Wed, 18 Aug 2021 12:44:58 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 054CB1BF207; Wed, 18 Aug 2021 16:44:50 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> Date: Wed, 18 Aug 2021 19:32:01 +0300 In-Reply-To: <834kbn54kq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Aug 2021 15:18:29 +0300") Message-ID: <87y28yspf2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I don't understand how this is supposed to work. The buffer " *Minibuf-0*" >> is always empty at the time of calling message3_nolog, whereas the buffer >> " *Echo Area 0*" contains the message to display. > > Yes, some code switches to another buffer at the wrong moment. There are no buffer switching involved neither in the successful case nor in the failing case. >> 5. redisplay_internal calls hscroll_window_tree >> where cursor_row already contains information >> that was valid when " *Echo Area 0*" was temporarily >> displayed in mini_window: > > Any idea why we call hscroll_window_tree in this case? Here are all differences in cursor_row between success and failure: @@ -1,8 +1,8 @@ (gdb) p *cursor_row { x = 0, y = 228, - pixel_width = 1610, + pixel_width = 1910, ascent = 15, height = 19, phys_ascent = 12, @@ -26,8 +26,8 @@ }, end = { pos = { - charpos = 1897, - bytepos = 1897 + charpos = 2150, + bytepos = 2150 }, overlay_string_index = -1, string_pos = { @@ -41,14 +41,14 @@ bytepos = 1737 }, maxpos = { - charpos = 1897, - bytepos = 1897 + charpos = 2150, + bytepos = 2150 }, overlay_arrow_bitmap = 0, left_user_fringe_bitmap = 0, right_user_fringe_bitmap = 0, left_fringe_bitmap = 0, - right_fringe_bitmap = 0, + right_fringe_bitmap = 31, left_user_fringe_face_id = 0, right_user_fringe_face_id = 0, left_fringe_face_id = 0, @@ -59,7 +59,7 @@ redraw_fringe_bitmaps_p = true, enabled_p = true, truncated_on_left_p = false, - truncated_on_right_p = false, + truncated_on_right_p = true, continued_p = false, displays_text_p = true, ends_at_zv_p = true, When it fails, truncated_on_right_p is true, that causes executing code block with init_to_row_start in hscroll_window_tree, that fails with truncated long miniwindow lines. In the successful case truncated_on_right_p=false allows hscroll_window_tree to skip the block with init_to_row_start, and other hscrolling. > I'm guessing this is due to some customizations of yours, in which > case I'd appreciate a reproduction recipe starting from "emacs -Q". > It is very hard to debug such problems via email. It's 100% reproducible for me, but I'm not sure how easy would be to create a test case for "emacs -Q". >> > You are saying that if you remove the ":(literal)" part without >> > changing anything else, the problem goes away? >> >> Indeed, it broke after the commit 3572613550. >> But after applying this patch it works again without errors: > > Does this patch work by preventing hscrolling? > >> I guess additional ":(literal)" string increases the length >> of the displayed message, and longer message triggers the bug. > > How does it trigger it? via hscrolling or some other way? It reduces the length of the displayed message, so there is no wrapped line and no hscrolling. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 13:02:10 2021 Received: (at 50096) by debbugs.gnu.org; 18 Aug 2021 17:02:10 +0000 Received: from localhost ([127.0.0.1]:57454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOx4-0002Z7-BA for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:02:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOwz-0002YX-HD for 50096@debbugs.gnu.org; Wed, 18 Aug 2021 13:02:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57134) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGOws-0003sX-GY; Wed, 18 Aug 2021 13:01:55 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2809 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 1mGOwr-0001l1-QS; Wed, 18 Aug 2021 13:01:54 -0400 Date: Wed, 18 Aug 2021 20:01:52 +0300 Message-Id: <838s0y4rgf.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87y28yspf2.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 19:32:01 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Wed, 18 Aug 2021 19:32:01 +0300 > > >> I don't understand how this is supposed to work. The buffer " *Minibuf-0*" > >> is always empty at the time of calling message3_nolog, whereas the buffer > >> " *Echo Area 0*" contains the message to display. > > > > Yes, some code switches to another buffer at the wrong moment. > > There are no buffer switching involved neither in the successful case > nor in the failing case. What is the "successful case" and what is the "failing case"? I think we've just established that the reason for failure is a longer line displayed in the mini-window with auto-hscrolling enabled. So the problem was probably there for quite some time, it just didn't happen because two conditions are needed to trigger it: . a relatively long line displayed in the mini-window (rare) . auto-hscroll enabled in that window (even more rare) As for switching buffers: how else can you explain that the window's glyph matrix is correct for another buffer? And, btw, what is the value of it->w->contents inside init_to_row_start? I mean here: > #11 0x000055c2da79bf2e in init_to_row_start (it=0x7ffdc316c8c0, w=0x55c2dd062400, row=0x55c2e3f9fc50) at xdisp.c:3735 it->w->contents should be a buffer, but what buffer is that? Also, what is the value of it->w->desired_matrix->buffer->name_ ? It's a Lisp string, but what's its Lisp value? > It's 100% reproducible for me, but I'm not sure how easy would be > to create a test case for "emacs -Q". I'd appreciate if you could try. > >> I guess additional ":(literal)" string increases the length > >> of the displayed message, and longer message triggers the bug. > > > > How does it trigger it? via hscrolling or some other way? > > It reduces the length of the displayed message, > so there is no wrapped line and no hscrolling. OK, thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:07:43 2021 Received: (at 50096) by debbugs.gnu.org; 18 Aug 2021 18:07:43 +0000 Received: from localhost ([127.0.0.1]:57564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPyZ-0004Jr-4G for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:07:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPyW-0004Jc-TS for 50096@debbugs.gnu.org; Wed, 18 Aug 2021 14:07:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60068) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPyR-00007T-Do; Wed, 18 Aug 2021 14:07:35 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2897 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 1mGPyR-0003D0-0V; Wed, 18 Aug 2021 14:07:35 -0400 Date: Wed, 18 Aug 2021 21:07:28 +0300 Message-Id: <83v94239un.fsf@gnu.org> From: Eli Zaretskii To: juri@linkov.net In-Reply-To: <838s0y4rgf.fsf@gnu.org> (message from Eli Zaretskii on Wed, 18 Aug 2021 20:01:52 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> <838s0y4rgf.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 18 Aug 2021 20:01:52 +0300 > From: Eli Zaretskii > Cc: 50096@debbugs.gnu.org > > > It's 100% reproducible for me, but I'm not sure how easy would be > > to create a test case for "emacs -Q". > > I'd appreciate if you could try. Or at least show how you arrange for auto-hscroll in the mini-window. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 03:22:16 2021 Received: (at 50096) by debbugs.gnu.org; 19 Aug 2021 07:22:16 +0000 Received: from localhost ([127.0.0.1]:58265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcNT-0001DP-Pk for submit@debbugs.gnu.org; Thu, 19 Aug 2021 03:22:16 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:55967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcNO-0001Cu-He for 50096@debbugs.gnu.org; Thu, 19 Aug 2021 03:22:14 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 0955BC0003; Thu, 19 Aug 2021 07:22:03 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> <838s0y4rgf.fsf@gnu.org> <83v94239un.fsf@gnu.org> Date: Thu, 19 Aug 2021 10:17:22 +0300 In-Reply-To: <83v94239un.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Aug 2021 21:07:28 +0300") Message-ID: <87h7flx5rx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> > It's 100% reproducible for me, but I'm not sure how easy would be >> > to create a test case for "emacs -Q". >>=20 >> I'd appreciate if you could try. > > Or at least show how you arrange for auto-hscroll in the mini-window. Fortunately, finally I found the shortest test case 100% reproducible in 'emacs -Q'. The line '(set-buffer (get-buffer-create "*test*"))' is not necessary, it just causes a slightly different error. Without 'set-buffer', the error is: (args-out-of-range 1737) With 'set-buffer', the error is: (args-out-of-range 1737 1737) Just eval in 'emacs -Q': (let ((message-truncate-lines t)) (set-buffer (get-buffer-create "*test*")) (message "%s" "Running in foreground: git --no-pager commit -m Redesign t= ab-bar event processing (bug#41342, bug#41343)\12\12Instead of emitting men= u-item keys like [tab-1],\12emit normal mouse events like [mouse-1] and [mo= use-2]\12for all mouse clicks issued on the tab-bar.\12\12* lisp/mouse.el (= mouse-posn-property): Handle 'tab-bar' posn-area.\12\12* lisp/tab-bar.el (t= ab--key-to-number): New internal function.\12(tab-bar-handle-mouse): Use ta= b key to select/close tab.\12(tab-bar-mouse-select-tab, tab-bar-mouse-close= -tab)\12(tab-bar-mouse-context-menu): New commands.\12(tab-bar-map): Bind [= down-mouse-1] to tab-bar-mouse-select-tab,\12[down-mouse-2] to tab-bar-mous= e-close-tab,\12[down-mouse-3] to tab-bar-mouse-context-menu.\12(tab-bar-key= map-cache): Remove.\12(tab-bar-make-keymap): Don't use cache.\12(tab-bar--f= ormat-tab): Remove default bindings from menu items.\12(tab-bar-make-keymap= -1): Prepend tab-bar-map.\12\12* src/keyboard.c (make_lispy_event): Append = event->arg to position\12for Qtab_bar.\12\12* src/term.c (handle_one_term_e= vent): Simplify to set event arg.\12\12* src/w32inevt.c (do_mouse_event): S= et emacs_ev->arg to the value\12returned from tty_handle_tab_bar_click.\12\= 12* src/w32term.c (w32_handle_tab_bar_click): Return value from\12handle_ta= b_bar_click.\12(w32_read_socket): Set tab_bar_key to value returned from\12= w32_handle_tab_bar_click, and set event arg from it.\12\12* src/xdisp.c (ha= ndle_tab_bar_click): Instead of emitting event,\12return a list with Qtab_b= ar and tab caption with text properties\12that contain Qmenu_item with key = and binding.\12(tty_handle_tab_bar_click): Simplify to return a list of Qta= b_bar,\12key and close_p, instead of emitting event.\12\12* src/xterm.c (ha= ndle_one_xevent): Set tab_bar_key to value\12returned from handle_tab_bar_c= lick, and set event arg from it.\12 --only -- :(literal)/tmp/1/emacs/etc/NE= WS :(literal)/tmp/1/emacs/lisp/mouse.el :(literal)/tmp/1/emacs/lisp/tab-bar= .el :(literal)/tmp/1/emacs/src/dispextern.h :(literal)/tmp/1/emacs/src/keyb= oard.c :(literal)/tmp/1/emacs/src/term.c :(literal)/tmp/1/emacs/src/termcha= r.h :(literal)/tmp/1/emacs/src/w32inevt.c :(literal)/tmp/1/emacs/src/w32ter= m.c :(literal)/tmp/1/emacs/src/xdisp.c :(literal)/tmp/1/emacs/src/xterm.c")) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 03:32:45 2021 Received: (at 50096) by debbugs.gnu.org; 19 Aug 2021 07:32:45 +0000 Received: from localhost ([127.0.0.1]:58311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcXc-0001WU-SJ for submit@debbugs.gnu.org; Thu, 19 Aug 2021 03:32:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcXY-0001W7-O2 for 50096@debbugs.gnu.org; Thu, 19 Aug 2021 03:32:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36088) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGcXT-0002zI-2T; Thu, 19 Aug 2021 03:32:35 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4427 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 1mGcXS-0002UN-M3; Thu, 19 Aug 2021 03:32:34 -0400 Date: Thu, 19 Aug 2021 10:32:14 +0300 Message-Id: <835yw13n5u.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87im03tc6g.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 10:42:23 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Wed, 18 Aug 2021 10:42:23 +0300 > > 1. message3_nolog calls echo_area_display > 2. echo_area_display calls redisplay_internal This step 2 happens only if display of the mini-window needs to resize the mini-window for some reason. When that happens, we need to perform a thorough redisplay (as opposed to just redisplaying the mini-window), because the bottom-most window needs to be resized as result of resizing the mini-window. > 3. redisplay_internal clears all matrices with clear_desired_matrices > 4. redisplay_internal calls echo_area_display > that temporarily changes mini_window's buffer > from " *Minibuf-0*" to " *Echo Area 0*". > This updates w->desired_matrix to contain information > about " *Echo Area 0*" displayed in the mini_window. > But unwind_with_echo_area_buffer immediately > changes mini_window's buffer back to empty " *Minibuf-0*". > 5. redisplay_internal calls hscroll_window_tree > where cursor_row already contains information > that was valid when " *Echo Area 0*" was temporarily > displayed in mini_window: And step 5 says that you have somehow set up auto-hscroll in the mini-window. Which means the lines in the mini-window are truncated? Does that also mean you set max-mini-window-height to 1? But if so, how come Emacs decided above that the mini-window needs to be resized? So please show your customizations that seem to be parts of this puzzle. I think if these customizations are set up, a simple call to 'message' with a long enough string should be able to reproduce the problem and allow debugging it. > (gdb) l > 14896 cursor_row = MATRIX_ROW (w->desired_matrix, w->cursor.vpos); > (gdb) p *cursor_row > ... > start = { > pos = { > charpos = 1737, > bytepos = 1737 > }, > ... > end = { > pos = { > charpos = 2150, > bytepos = 2150 > > These numbers are valid positions in " *Echo Area 0*" > that was temporarily displayed in mini_window, > but now mini_window's buffer is empty " *Minibuf-0*". This means that the window's desired_matrix was produced for another buffer, and is no longer valid. That buffer is supposed to be recorded in desired_matrix->buffer, please show it. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 04:12:33 2021 Received: (at 50096) by debbugs.gnu.org; 19 Aug 2021 08:12:33 +0000 Received: from localhost ([127.0.0.1]:58394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGdA9-0002cy-64 for submit@debbugs.gnu.org; Thu, 19 Aug 2021 04:12:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGdA6-0002ci-Ey for 50096@debbugs.gnu.org; Thu, 19 Aug 2021 04:12:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37154) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGdA0-0004hF-Lc; Thu, 19 Aug 2021 04:12:24 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2891 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 1mGdA0-00015P-5l; Thu, 19 Aug 2021 04:12:24 -0400 Date: Thu, 19 Aug 2021 11:12:07 +0300 Message-Id: <83wnoh26qw.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87h7flx5rx.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 19 Aug 2021 10:17:22 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> <838s0y4rgf.fsf@gnu.org> <83v94239un.fsf@gnu.org> <87h7flx5rx.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50096@debbugs.gnu.org > Date: Thu, 19 Aug 2021 10:17:22 +0300 > > Fortunately, finally I found the shortest test case 100% reproducible > in 'emacs -Q'. The line '(set-buffer (get-buffer-create "*test*"))' > is not necessary, it just causes a slightly different error. > Without 'set-buffer', the error is: (args-out-of-range 1737) > With 'set-buffer', the error is: (args-out-of-range 1737 1737) Thanks. This actually produces an assertion violation here (I guess your Emacs is compiled without --enable-checking). I'll work on this. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 08:40:17 2021 Received: (at 50096) by debbugs.gnu.org; 19 Aug 2021 12:40:17 +0000 Received: from localhost ([127.0.0.1]:58777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGhLF-0005GW-F0 for submit@debbugs.gnu.org; Thu, 19 Aug 2021 08:40:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGhLD-0005GH-P8 for 50096@debbugs.gnu.org; Thu, 19 Aug 2021 08:40:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42320) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGhL7-0007Ml-PY; Thu, 19 Aug 2021 08:40:09 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3437 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 1mGhKw-0006Kd-QZ; Thu, 19 Aug 2021 08:40:09 -0400 Date: Thu, 19 Aug 2021 15:39:38 +0300 Message-Id: <83tujl1ud1.fsf@gnu.org> From: Eli Zaretskii To: juri@linkov.net, Clemens In-Reply-To: <83wnoh26qw.fsf@gnu.org> (message from Eli Zaretskii on Thu, 19 Aug 2021 11:12:07 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> <838s0y4rgf.fsf@gnu.org> <83v94239un.fsf@gnu.org> <87h7flx5rx.fsf@mail.linkov.net> <83wnoh26qw.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 19 Aug 2021 11:12:07 +0300 > From: Eli Zaretskii > Cc: 50096@debbugs.gnu.org > > > From: Juri Linkov > > Cc: 50096@debbugs.gnu.org > > Date: Thu, 19 Aug 2021 10:17:22 +0300 > > > > Fortunately, finally I found the shortest test case 100% reproducible > > in 'emacs -Q'. The line '(set-buffer (get-buffer-create "*test*"))' > > is not necessary, it just causes a slightly different error. > > Without 'set-buffer', the error is: (args-out-of-range 1737) > > With 'set-buffer', the error is: (args-out-of-range 1737 1737) > > Thanks. This actually produces an assertion violation here (I guess > your Emacs is compiled without --enable-checking). I'll work on this. This problem is the side effect of fixing bug#46718. Before that fix, we never resized mini-windows when truncate-lines was non-nil in the buffer displayed in that window. And now we know why. Unfortunately, the best I could do to fix this is disable hscrolling in display of echo-area messages (but NOT in the minibuffer editing -- that should still work). Please see the latest master and tell if this is acceptable. If it isn't, the only alternative I see is to back out the fix for bug#46718, which I suspect Clemens won't like... Or maybe someone braver than myself will redesign and re-implement with_echo_area_buffer in a way that avoids creating this situation with glyph matrices in the first place. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 03:32:40 2021 Received: (at 50096) by debbugs.gnu.org; 20 Aug 2021 07:32:40 +0000 Received: from localhost ([127.0.0.1]:32891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGz13-0004Xb-1S for submit@debbugs.gnu.org; Fri, 20 Aug 2021 03:32:40 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:36513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGz12-0004XH-7A; Fri, 20 Aug 2021 03:32:36 -0400 Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id DB0A82000B; Fri, 20 Aug 2021 07:32:28 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50096: args-out-of-range in redisplay_internal Organization: LINKOV.NET References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> <838s0y4rgf.fsf@gnu.org> <83v94239un.fsf@gnu.org> <87h7flx5rx.fsf@mail.linkov.net> <83wnoh26qw.fsf@gnu.org> <83tujl1ud1.fsf@gnu.org> Date: Fri, 20 Aug 2021 10:09:34 +0300 In-Reply-To: <83tujl1ud1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Aug 2021 15:39:38 +0300") Message-ID: <87sfz4ll75.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org, Clemens X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 50096 fixed close 50096 28.0.50 thanks > Unfortunately, the best I could do to fix this is disable hscrolling > in display of echo-area messages (but NOT in the minibuffer editing -- > that should still work). Please see the latest master and tell if > this is acceptable. If it isn't, the only alternative I see is to > back out the fix for bug#46718, which I suspect Clemens won't like... > Or maybe someone braver than myself will redesign and re-implement > with_echo_area_buffer in a way that avoids creating this situation > with glyph matrices in the first place. Thanks, now everything works fine. I think mini-window doesn't need hscrolling, because it should display the beginning of the truncated echo-area message, not its end. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 03:49:59 2021 Received: (at 50096) by debbugs.gnu.org; 20 Aug 2021 07:49:59 +0000 Received: from localhost ([127.0.0.1]:32917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGzHr-0007AW-1x for submit@debbugs.gnu.org; Fri, 20 Aug 2021 03:49:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGzHo-0007AH-LU for 50096@debbugs.gnu.org; Fri, 20 Aug 2021 03:49:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50594) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGzHi-0002lM-6x; Fri, 20 Aug 2021 03:49:50 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2491 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 1mGzHh-0006p8-Ph; Fri, 20 Aug 2021 03:49:50 -0400 Date: Fri, 20 Aug 2021 10:49:31 +0300 Message-Id: <83fsv41rp0.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87sfz4ll75.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 20 Aug 2021 10:09:34 +0300) Subject: Re: bug#50096: args-out-of-range in redisplay_internal References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> <838s0y4rgf.fsf@gnu.org> <83v94239un.fsf@gnu.org> <87h7flx5rx.fsf@mail.linkov.net> <83wnoh26qw.fsf@gnu.org> <83tujl1ud1.fsf@gnu.org> <87sfz4ll75.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50096 Cc: 50096@debbugs.gnu.org, clemera@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: Clemens , 50096@debbugs.gnu.org > Date: Fri, 20 Aug 2021 10:09:34 +0300 > > tags 50096 fixed > close 50096 28.0.50 > thanks > > > Unfortunately, the best I could do to fix this is disable hscrolling > > in display of echo-area messages (but NOT in the minibuffer editing -- > > that should still work). Please see the latest master and tell if > > this is acceptable. If it isn't, the only alternative I see is to > > back out the fix for bug#46718, which I suspect Clemens won't like... > > Or maybe someone braver than myself will redesign and re-implement > > with_echo_area_buffer in a way that avoids creating this situation > > with glyph matrices in the first place. > > Thanks, now everything works fine. I think mini-window doesn't need > hscrolling, because it should display the beginning of the truncated > echo-area message, not its end. Yes, that was also my thinking, in general. Thanks. From unknown Sun Jun 22 04:36:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 17 Sep 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator