From unknown Mon Jun 16 23:40:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#38564 <38564@debbugs.gnu.org> To: bug#38564 <38564@debbugs.gnu.org> Subject: Status: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Reply-To: bug#38564 <38564@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:40:47 +0000 retitle 38564 27.0.50; macOS "emacs -nw" git-gutter-mode segfault reassign 38564 emacs submitter 38564 Mike Hamrick severity 38564 normal tag 38564 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 10 21:17:01 2019 Received: (at submit) by debbugs.gnu.org; 11 Dec 2019 02:17:01 +0000 Received: from localhost ([127.0.0.1]:56781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ierYi-0000bi-Lw for submit@debbugs.gnu.org; Tue, 10 Dec 2019 21:17:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:55286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieqtH-0007n1-LI for submit@debbugs.gnu.org; Tue, 10 Dec 2019 20:34:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39632) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieqtF-0007hz-B4 for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2019 20:34:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieqtC-0007fE-6a for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2019 20:34:07 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]:40450) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ieqtA-0007On-9w for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2019 20:34:05 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]) by eidolon.muppetlabs.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ieqsj-0006R9-OP for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2019 17:33:46 -0800 From: Mike Hamrick To: bug-gnu-emacs@gnu.org Subject: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Date: Tue, 10 Dec 2019 17:33:37 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam_score: -19.8 X-Spam_score_int: -197 X-Spam_bar: ------------------- X-Spam_report: Spam detection software, running on the system "eidolon.muppetlabs.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi there, Here is how I got emacs to segfault and drop be back to the shell: - compile emacs 27.0.50 under macOS - install the git-gutter package - set up an after-init-hook for global-git-gutter-mode - emacs - [...] Content analysis details: (-19.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -20 SC_HAM No description available. -0.0 BAYES_20 BODY: Bayes spam probability is 5 to 20% [score: 0.0679] 0.8 DICT_DUMP_CUSTOM02 BODY: Text in non-English syntax-5X7 1.2 DICT_DUMP_CUSTOM03 BODY: Text in non-English syntax-5X8 1.0 DICT_DUMP_CUSTOM01 BODY: Text in non-English syntax-4X7 1.1 FVGT_m_MULTI_ODD2 Contains multiple odd letter combinations -2.9 AWL AWL: Adjusted score from AWL reputation of From: address X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.66.255.52 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 10 Dec 2019 21:16:57 -0500 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.3 (--) Hi there, Here is how I got emacs to segfault and drop be back to the shell: - compile emacs 27.0.50 under macOS - install the git-gutter package - set up an after-init-hook for global-git-gutter-mode - emacs -nw /some/file/under/version/control The relevant part of my init.el looks like: > (use-package git-gutter > :ensure t > :init > (add-hook 'after-init-hook 'global-git-gutter-mode)) I built emacs with debugging symbols, and ran it in the lldb debugger, here is the stack trace: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40) frame #0: 0x000000010416ab3e emacs`ns_lookup_indexed_color(idx=18446744073709551613, f=0x00007facab80e210) at nsterm.m:2097:64 2094 NSColor * 2095 ns_lookup_indexed_color (unsigned long idx, struct frame *f) 2096 { -> 2097 struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table; 2098 if (idx < 1 || idx >= color_table->avail) 2099 return nil; 2100 return color_table->colors[idx]; Likely cause: f->output_data.tty[29]->display_info->terminal accessed 0x40 (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40) * frame #0: 0x000000010416ab3e emacs`ns_lookup_indexed_color(idx=18446744073709551613, f=0x00007facab80e210) at nsterm.m:2097:64 frame #1: 0x000000010416b5fc emacs`ns_color_index_to_rgba(idx=-3, f=0x00007facab80e210) at nsterm.m:2299:9 frame #2: 0x0000000103e88e23 emacs`extend_face_to_end_of_line(it=0x00007ffeebdf5800) at xdisp.c:21833:7 frame #3: 0x0000000103e5783a emacs`display_line(it=0x00007ffeebdf5800, cursor_vpos=3) at xdisp.c:23478:4 frame #4: 0x0000000103e5468b emacs`try_window(window=0x00007facab80e445, pos=(charpos = 1, bytepos = 1), flags=1) at xdisp.c:19005:11 frame #5: 0x0000000103e92e6f emacs`redisplay_window(window=0x00007facab80e445, just_this_one_p=false) at xdisp.c:18426:8 frame #6: 0x0000000103e90f8d emacs`redisplay_window_0(window=0x00007facab80e445) at xdisp.c:16147:5 frame #7: 0x000000010406083a emacs`internal_condition_case_1(bfun=(emacs`redisplay_window_0 at xdisp.c:16145), arg=0x00007facab80e445, handlers=0x00000001060f9d6b, hfun=(emacs`redisplay_window_error at xdisp.c:16138)) at eval.c:1379:25 frame #8: 0x0000000103e8f87b emacs`redisplay_windows(window=0x00007facab80e445) at xdisp.c:16127:4 frame #9: 0x0000000103e4f012 emacs`redisplay_internal at xdisp.c:15595:5 frame #10: 0x0000000103e53110 emacs`redisplay_preserve_echo_area(from_where=2) at xdisp.c:15948:5 frame #11: 0x0000000103e0914a emacs`Fredisplay(force=0x0000000000000000) at dispnew.c:6066:3 frame #12: 0x0000000104068003 emacs`funcall_subr(subr=0x0000000104209680, numargs=0, args=0x00007ffeebdfc398) at eval.c:2867:19 frame #13: 0x0000000104066e24 emacs`Ffuncall(nargs=1, args=0x00007ffeebdfc390) at eval.c:2794:11 frame #14: 0x00000001040d7ef8 emacs`exec_byte_code(bytestr=0x0000000105c2125c, vector=0x0000000105c21015, maxdepth=0x000000000000001e, args_template=0x0000000000000c06, nargs=1, args=0x00007ffeebdfcad0) at bytecode.c:633:12 frame #15: 0x000000010406847c emacs`funcall_lambda(fun=0x0000000105c20fe5, nargs=1, arg_vector=0x00007ffeebdfcac8) at eval.c:2989:11 frame #16: 0x0000000104066e6e emacs`Ffuncall(nargs=2, args=0x00007ffeebdfcac0) at eval.c:2796:11 frame #17: 0x00000001040d7ef8 emacs`exec_byte_code(bytestr=0x0000000105d67b44, vector=0x0000000105d67645, maxdepth=0x000000000000003e, args_template=0x0000000000000c06, nargs=3, args=0x00007ffeebdfd478) at bytecode.c:633:12 frame #18: 0x000000010406847c emacs`funcall_lambda(fun=0x0000000105d664ed, nargs=3, arg_vector=0x00007ffeebdfd460) at eval.c:2989:11 frame #19: 0x0000000104066e6e emacs`Ffuncall(nargs=4, args=0x00007ffeebdfd458) at eval.c:2796:11 frame #20: 0x0000000104055bda emacs`Ffuncall_interactively(nargs=4, args=0x00007ffeebdfd458) at callint.c:254:32 frame #21: 0x0000000104067f2b emacs`funcall_subr(subr=0x0000000104212f20, numargs=4, args=0x00007ffeebdfd458) at eval.c:2847:12 frame #22: 0x0000000104066e24 emacs`Ffuncall(nargs=5, args=0x00007ffeebdfd450) at eval.c:2794:11 frame #23: 0x0000000104066c04 emacs`Fapply(nargs=3, args=0x00007ffeebdfdc70) at eval.c:2424:24 frame #24: 0x000000010405600e emacs`Fcall_interactively(function=0x000000000173af88, record_flag=0x0000000000000000, keys=0x00000001064ffb35) at callint.c:342:36 frame #25: 0x000000010406805e emacs`funcall_subr(subr=0x0000000104212ef0, numargs=3, args=0x00007ffeebdfde40) at eval.c:2872:19 frame #26: 0x0000000104066e24 emacs`Ffuncall(nargs=4, args=0x00007ffeebdfde38) at eval.c:2794:11 frame #27: 0x00000001040d7ef8 emacs`exec_byte_code(bytestr=0x0000000105d1d5fc, vector=0x0000000105d1d09d, maxdepth=0x0000000000000036, args_template=0x0000000000001006, nargs=1, args=0x00007ffeebdfe5a8) at bytecode.c:633:12 frame #28: 0x000000010406847c emacs`funcall_lambda(fun=0x0000000105d1d06d, nargs=1, arg_vector=0x00007ffeebdfe5a0) at eval.c:2989:11 frame #29: 0x0000000104066e6e emacs`Ffuncall(nargs=2, args=0x00007ffeebdfe598) at eval.c:2796:11 frame #30: 0x000000010406794f emacs`call1(fn=0x0000000000003ae0, arg1=0x000000000173af88) at eval.c:2654:10 frame #31: 0x0000000103f643e9 emacs`command_loop_1 at keyboard.c:1458:13 frame #32: 0x000000010406077f emacs`internal_condition_case(bfun=(emacs`command_loop_1 at keyboard.c:1236), handlers=0x0000000000000090, hfun=(emacs`cmd_error at keyboard.c:919)) at eval.c:1355:25 frame #33: 0x0000000103f7bbcc emacs`command_loop_2(ignore=0x0000000000000000) at keyboard.c:1091:11 frame #34: 0x00000001040600ea emacs`internal_catch(tag=0x000000000000c8a0, func=(emacs`command_loop_2 at keyboard.c:1087), arg=0x0000000000000000) at eval.c:1116:25 frame #35: 0x0000000103f62ee8 emacs`command_loop at keyboard.c:1070:2 frame #36: 0x0000000103f62d20 emacs`recursive_edit_1 at keyboard.c:714:9 frame #37: 0x0000000103f630b9 emacs`Frecursive_edit at keyboard.c:786:3 frame #38: 0x0000000103f60531 emacs`main(argc=3, argv=0x00007ffeebdfed58) at emacs.c:2054:3 frame #39: 0x00007fff5cf7e3d5 libdyld.dylib`start + 1 frame #40: 0x00007fff5cf7e3d5 libdyld.dylib`start + 1 I was able to prevent emacs from crashing with this rather naive patch. diff --git a/src/nsterm.m b/src/nsterm.m index c415159890..ea2b141d95 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2094,6 +2094,8 @@ so some key presses (TAB) are swallowed by the system. */ NSColor * ns_lookup_indexed_color (unsigned long idx, struct frame *f) { + if (FRAME_DISPLAY_INFO (f) == nil) + return nil; struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table; if (idx < 1 || idx >= color_table->avail) return nil; Here is more information about my setup post patch: In GNU Emacs 27.0.50 (build 2, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G1012)) of 2019-12-10 built on st-mikeh1 Repository revision: ea93326cc046cb1beb7535cdf6d69b216b767685 Repository branch: master System Description: Mac OS X 10.14.6 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/Users/mikeh' Configured features: RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: global-git-gutter-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/xterm xterm git-gutter advice cl-extra help-mode use-package-ensure use-package-core finder-inf info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 80357 7586) (symbols 48 9267 1) (strings 32 27500 1423) (string-bytes 1 893518) (vectors 16 12896) (vector-slots 8 135599 5856) (floats 8 39 323) (intervals 56 179 0) (buffers 1000 12)) From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 05:12:52 2019 Received: (at 38564) by debbugs.gnu.org; 11 Dec 2019 10:12:52 +0000 Received: from localhost ([127.0.0.1]:56917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieyzD-0006OP-Ok for submit@debbugs.gnu.org; Wed, 11 Dec 2019 05:12:52 -0500 Received: from mail-wm1-f45.google.com ([209.85.128.45]:53251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieyzB-0006OC-Pw for 38564@debbugs.gnu.org; Wed, 11 Dec 2019 05:12:50 -0500 Received: by mail-wm1-f45.google.com with SMTP id n9so6403465wmd.3 for <38564@debbugs.gnu.org>; Wed, 11 Dec 2019 02:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:message-id :mime-version:content-transfer-encoding; bh=yRAit1IdBPWLVLOOFMXVP2maSjztaO/F5effBxkpBm8=; b=WxSYRCJBKFgoXplbohNfsFboAN1L762naFZSHVJLqBBmsd7eFV4eln410QvhEFHEA0 dtC+p7Pa+yVsjsF9bZwR7n9diWCTSxTiGuseCv4JOI9mzuGfz4jd8MYOjlkDKVXWThh5 HfB2r9ldk1q8Hq2pEcm1dUuYG5fY5FCF024hHyKwi00yf3QWl2LA2pofCQIXupfBFP7h /94HcbDiPhw/cv8zZaQdilOcor1R3EVkrARRGfkPDEJgw5/9yWIbrC2KyMJXH+dVcgX7 OQiYs26jjDpsZcYv/XwOmHfSvhDjFKXk37zFoPwf4M4h/+QgqUIm01pI+larjZ7B2cXx A60Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=yRAit1IdBPWLVLOOFMXVP2maSjztaO/F5effBxkpBm8=; b=pGqWJ9AIbcUNMMSh9CKYehlXMzMdOP70eo+FrveU2COrTX1YaP1QxGm9Biwznf+hMz yi8+2FMWy4ud+NhBEME1NnysGMCHerFW7KItux5yC7RFbjdAiboh3K7pVyzkVK6z97GO 8Cy+tsWB6fw0+tKXiaFmDcFjLLpxFHYDorde8GfOJvPSOkWFMkcv54hk4jH4hc2A37Z+ MW2fGr90oDFHDNQHVUuLZ3txhofiZ2z37KpGKlcZG6ASNI/jsq9TC2IMeaa2xm4ks1iE J1IyYLOmaBcXsA/ChjwFA3hp8hHwWnlCArsXd889X2ff7jxDxBpuXtEAZ6GOBfSg16Pu 1c4Q== X-Gm-Message-State: APjAAAUyzf1UbNm6yOPvi/L5rLoWghHqrTFe5iW3lWMTfqzNrrOiAx2y f8VRyZNEfm9BLdbCMWc+IFBj83azslM= X-Google-Smtp-Source: APXvYqyhxM2Im+Hw7ZUJcyvBzVzjSunsDyJEoC69EsafCnkIjqLU4PjVpDnjlIdbHrXAfLIb16jAeA== X-Received: by 2002:a7b:cf2d:: with SMTP id m13mr2675841wmg.163.1576059163232; Wed, 11 Dec 2019 02:12:43 -0800 (PST) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id s65sm1735450wmf.48.2019.12.11.02.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 02:12:42 -0800 (PST) From: Robert Pluim To: Mike Hamrick Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault References: X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Wed, 11 Dec 2019 11:12:41 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: 38564@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.0 (-) >>>>> On Tue, 10 Dec 2019 17:33:37 -0800, Mike Hamrick said: Mike> Hi there, Mike> Here is how I got emacs to segfault and drop be back to the shell: Mike> - compile emacs 27.0.50 under macOS Mike> - install the git-gutter package Mike> - set up an after-init-hook for global-git-gutter-mode Mike> - emacs -nw /some/file/under/version/control I=CA=BCm surprised nobody's seen this before. Mike> The relevant part of my init.el looks like: >> (use-package git-gutter >> :ensure t >> :init >> (add-hook 'after-init-hook 'global-git-gutter-mode)) Mike> * frame #0: 0x000000010416ab3e emacs`ns_lookup_indexed_color(id= x=3D18446744073709551613, f=3D0x00007facab80e210) at nsterm.m:2097:64 Mike> frame #1: 0x000000010416b5fc emacs`ns_color_index_to_rgba(idx= =3D-3, f=3D0x00007facab80e210) at nsterm.m:2299:9 Mike> diff --git a/src/nsterm.m b/src/nsterm.m Mike> index c415159890..ea2b141d95 100644 Mike> --- a/src/nsterm.m Mike> +++ b/src/nsterm.m Mike> @@ -2094,6 +2094,8 @@ so some key presses (TAB) are swallowed by = the system. */ Mike> NSColor * Mike> ns_lookup_indexed_color (unsigned long idx, struct frame *f) Mike> { Mike> + if (FRAME_DISPLAY_INFO (f) =3D=3D nil) Mike> + return nil; Mike> struct ns_color_table *color_table =3D FRAME_DISPLAY_INFO (f)-= >color_table; Mike> if (idx < 1 || idx >=3D color_table->avail) Mike> return nil; Right idea, but one layer lower than needed. ns_color_index_to_rgba should not be calling ns_lookup_indexed_color in non-gui mode. Try this instead: diff --git a/src/nsterm.m b/src/nsterm.m index 52a9830be8..814a090370 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2290,19 +2290,24 @@ so some key presses (TAB) are swallowed by the syst= em. */ =20 /* Convert an index into the color table into an RGBA value. Used in xdisp.c:extend_face_to_end_of_line when comparing faces and frame - color values. */ + color values. No-op on non-gui frames*/ =20 unsigned long ns_color_index_to_rgba(int idx, struct frame *f) { - NSColor *col; - col =3D ns_lookup_indexed_color (idx, f); + if (FRAME_DISPLAY_INFO (f)) + { + NSColor *col; + col =3D ns_lookup_indexed_color (idx, f); =20 - EmacsCGFloat r, g, b, a; - [col getRed: &r green: &g blue: &b alpha: &a]; + EmacsCGFloat r, g, b, a; + [col getRed: &r green: &g blue: &b alpha: &a]; =20 - return ARGB_TO_ULONG((int)(a*255), - (int)(r*255), (int)(g*255), (int)(b*255)); + return ARGB_TO_ULONG((int)(a*255), + (int)(r*255), (int)(g*255), (int)(b*255)); + } + else + return idx; } =20 void From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 10:16:11 2019 Received: (at 38564) by debbugs.gnu.org; 11 Dec 2019 15:16:11 +0000 Received: from localhost ([127.0.0.1]:58446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1if3ik-0001TL-CD for submit@debbugs.gnu.org; Wed, 11 Dec 2019 10:16:10 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]:53967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1if3ih-0001SR-IG for 38564@debbugs.gnu.org; Wed, 11 Dec 2019 10:16:08 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]) by eidolon.muppetlabs.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1if3iW-00064f-3G; Wed, 11 Dec 2019 07:16:01 -0800 References: User-agent: mu4e 1.0; emacs 25.3.1 From: Mike Hamrick To: Robert Pluim Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault In-reply-to: Date: Wed, 11 Dec 2019 07:15:56 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam_score: -22.2 X-Spam_score_int: -221 X-Spam_bar: ---------------------- X-Spam_report: Spam detection software, running on the system "eidolon.muppetlabs.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Robert Pluim writes: > Iʼm surprised nobody's seen this before. I was able to find a couple of references to the bug that were reported downstream. https://github.com/d12frosted/homebrew-emacs-plus/issues/112 https://github.com/hlissner/doom-emacs/issues/1170 Content analysis details: (-22.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -20 SC_HAM No description available. -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.7 AWL AWL: Adjusted score from AWL reputation of From: address X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: 38564@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.0 (-) Robert Pluim writes: > Iʼm surprised nobody's seen this before. I was able to find a couple of references to the bug that were reported downstream. https://github.com/d12frosted/homebrew-emacs-plus/issues/112 https://github.com/hlissner/doom-emacs/issues/1170 > Right idea, but one layer lower than needed. ns_color_index_to_rgba > should not be calling ns_lookup_indexed_color in non-gui mode. Try > this instead: Your patch does indeed fix the bug for me! It also explains why this issue doesn't exist in 26.2, as the ns_color_index_to_rgba function was added a little over a year ago. I'm a bit shocked at how quickly my bug report reached someone intimately familiar with the underlying code. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 10:35:44 2019 Received: (at 38564) by debbugs.gnu.org; 11 Dec 2019 15:35:44 +0000 Received: from localhost ([127.0.0.1]:58515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1if41g-00021X-6C for submit@debbugs.gnu.org; Wed, 11 Dec 2019 10:35:44 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:41790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1if41d-000215-Vu; Wed, 11 Dec 2019 10:35:42 -0500 Received: by mail-wr1-f49.google.com with SMTP id c9so24524773wrw.8; Wed, 11 Dec 2019 07:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=fA5BafuKN7SK5vQnwYLHnbSggfQShhdRZ4DzQ1LBPXk=; b=eYEJTzAdMBDYNv3IB88YA8qTiqNfpxzjIuYmKARj2JKDA4BWJYCBN/DwsDsMrb3CjB IbFZTBNisqdX7PMY0gll3rtKBAlx/iDGoH42TgAr3cEpi8c5fFVJhvJrjp0N5IgA5gb7 hua/RqWK7hI4UB+3rfv0pAKYUBvlL9P/bjN1OwwyHXxwQVTlPCMjCiAqPpP+g0HZ/o/1 m9kbhNYDwii53MOHvGfEAvlpV9RJGFE0KlwXZjV0wz5EZORx7cs6JAE6tJ/KzBLZw1+9 Mnt5meN5FwUF/pgJ39kPkqB6rOru9oFnVUVLMkinF0GWbb9DgppXAtC+pkrYiqssxwNi /Fhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=fA5BafuKN7SK5vQnwYLHnbSggfQShhdRZ4DzQ1LBPXk=; b=rtqZAIX+VaAgK1lxyIWOSNHecTsl7BdlNilz19KwuPVAGGybzY4+6UyFazu1bqjDOF jeOx+QNSth6ovkKjL6LJBtMsJAyQy/2MGlDzOISQFNM1vgxDi0Jjdc4B+pHojwpH9XmH ghut3mRwTuU+6x/CubhfnAJXFTezjJ6MBwicSC2NeOCNCzQ5LBUwDGloh0dDfyrkBVYW vBBXZIMVGiVjShJQ0whitVFIbbZHLZuwS1r2iOGJF4GCErI7ytMFX9MvSxqUSsRHv77d lGfHzvLbCP0QJ98NlKc+I9KU7uBiOVP8JyPuR/7WMp3XzT653+1U03NT7z8diTozwXNd jI6A== X-Gm-Message-State: APjAAAWcQSRrPiw99Mbf43wbrFOcJK+TfVbimiJ53gAfp8vfePz5CCDd ynfp6GKvf8hrgR818v0BqiBn4jakNMo= X-Google-Smtp-Source: APXvYqznSbIYbtzzVpwZilnZY9Hy0INk+H+FkpR7RIysY0zivnjRE3du/MLOeql8GTKjYsAJxid0Dw== X-Received: by 2002:adf:82e7:: with SMTP id 94mr468482wrc.60.1576078535378; Wed, 11 Dec 2019 07:35:35 -0800 (PST) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id x10sm2612836wrv.60.2019.12.11.07.35.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:35:34 -0800 (PST) From: Robert Pluim To: Mike Hamrick Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault References: X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Wed, 11 Dec 2019 16:35:33 +0100 In-Reply-To: (Mike Hamrick's message of "Wed, 11 Dec 2019 07:15:56 -0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: 38564@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.0 (-) tags 38564 fixed close 38564 27.1 quit >>>>> On Wed, 11 Dec 2019 07:15:56 -0800, Mike Hamrick said: Mike> Robert Pluim writes: >> I=CA=BCm surprised nobody's seen this before. Mike> I was able to find a couple of references to the bug that were re= ported Mike> downstream. Mike> https://github.com/d12frosted/homebrew-emacs-plus/issues/112 Mike> https://github.com/hlissner/doom-emacs/issues/1170 Ah. I=CA=BCm a bit sad they didn=CA=BCt report that back to us. Adding it to 'known upstream bugs' on github doesn=CA=BCt really help get things fixed. >> Right idea, but one layer lower than needed. ns_color_index_to_rgba >> should not be calling ns_lookup_indexed_color in non-gui mode. Try >> this instead: Mike> Your patch does indeed fix the bug for me! It also explains why t= his Mike> issue doesn't exist in 26.2, as the ns_color_index_to_rgba functi= on was Mike> added a little over a year ago. I'm a bit shocked at how quickly = my bug Mike> report reached someone intimately familiar with the underlying co= de. I added it, so as the guilty party I=CA=BCm obligated to fix it forever :-) Thanks for the testing, committed to master as ea84a95bd8 , closing the bug. Robert From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 14:37:45 2019 Received: (at 38564) by debbugs.gnu.org; 11 Dec 2019 19:37:45 +0000 Received: from localhost ([127.0.0.1]:58689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1if7nt-0005Pf-JQ for submit@debbugs.gnu.org; Wed, 11 Dec 2019 14:37:45 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:41362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1if7nr-0005PR-OG for 38564@debbugs.gnu.org; Wed, 11 Dec 2019 14:37:44 -0500 Received: by mail-wr1-f53.google.com with SMTP id c9so25395927wrw.8 for <38564@debbugs.gnu.org>; Wed, 11 Dec 2019 11:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3Io8U7KiIMRPX2ydOtfIed2t+X324Us952re7DR2t1c=; b=E0X7pgiSIaV0BJamyHtZhKFCqXgIT2Ol43cNNrq5zVdIqMUjMkk1mSZ1N/cNO/8KAW lc5/BjPKW/qZmrfRb/YJQuziXR3vzWB63wpUAxLeUfxNTB8Gp1ky6Ew67EDALkOgVa0k 7SQIKXdU6zm3CC2o/pSrVADbA5r4h+KZGxFNcNq8w0WcTEFeLM7l3LIcTSbklNiSN8ey FzN8hHlqePpvqTQU6EzKpwJqER+yNbLz632RnpXak6XPJ2MC5/wY4KNT6iog8YcaCjG8 xzCf169qnwLa3YnRKuJRH82dulmQEvBno44arsxJfvvaFhYk40TiY/AsA1sVZyEKdXSn LvJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=3Io8U7KiIMRPX2ydOtfIed2t+X324Us952re7DR2t1c=; b=cEiwuaN5x/wi1AYoQvDy99z9QiyGNU/RFG8GpwkuQnvfID6k9/4vOr5MVTZgoCPgLl 9zPED8JgZj53YD8yOhWo5w0y0II3gJ/3pKK6v1h4B/hyHWpDKplLYDOmd9uPmP/5OMpr YLZRhYmoy9bgrLzx1vbQd9iectam/3fKxUaccRvsibOhVEOyQHH7OiYzu+dg0OkXx8pM zBRxQ5XoZ33C79MnchpPSlxdkiFeuZQdMGN5EL+sJw/oLafKD3Tvvryn1W0gvCzhKZ8l 7VnNccFkVdmCaZLwnHubOkm7bxX5QuxNb/Qjx3InSCwku4+Mqt/Yeh9b7V1v26biipD2 KRDg== X-Gm-Message-State: APjAAAUkmE+a+qkRZfXhRzQYGAZa6iozzkZK3eZ+qEkjIV6jpsHlQW8/ djkxgDoynYifD9wK7lcw7qQ= X-Google-Smtp-Source: APXvYqyGh390sYxyrd+KyZBThQrUo6krdu/+SDoPBdUfSiCK1LN/8ZBclOi++kd7QXXl7ymCh8du7A== X-Received: by 2002:adf:a308:: with SMTP id c8mr1600332wrb.240.1576093057485; Wed, 11 Dec 2019 11:37:37 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-0d9a-e711-75bf-e162.holly.idiocy.org. [2001:8b0:3f8:8129:d9a:e711:75bf:e162]) by smtp.gmail.com with ESMTPSA id c17sm3243589wrr.87.2019.12.11.11.37.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 11:37:36 -0800 (PST) Date: Wed, 11 Dec 2019 19:37:34 +0000 From: Alan Third To: Robert Pluim Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Message-ID: <20191211193734.GA2806@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38564 Cc: Mike Hamrick , 38564@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: -0.5 (/) On Wed, Dec 11, 2019 at 11:12:41AM +0100, Robert Pluim wrote: > Right idea, but one layer lower than needed. ns_color_index_to_rgba > should not be calling ns_lookup_indexed_color in non-gui mode. Try > this instead: Hi Robert, thanks for sorting this. One thing... > + if (FRAME_DISPLAY_INFO (f)) Would it not be better to use FRAME_NS_P? -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 02:45:20 2019 Received: (at 38564) by debbugs.gnu.org; 12 Dec 2019 07:45:21 +0000 Received: from localhost ([127.0.0.1]:58991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ifJA0-0004F0-Kx for submit@debbugs.gnu.org; Thu, 12 Dec 2019 02:45:20 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:42987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ifJ9z-00049v-R9 for 38564@debbugs.gnu.org; Thu, 12 Dec 2019 02:45:20 -0500 Received: by mail-wr1-f48.google.com with SMTP id q6so1547985wro.9 for <38564@debbugs.gnu.org>; Wed, 11 Dec 2019 23:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=aacGvNecjAmbPiA1B4aof3HJ1Q3kZOy0XORSwLpVguc=; b=SOz25xFLv6ODpGJf4Vml9806gdKlawW6xXXjacygXNcjMj/CRrwyiJK6cJPyaEA8Vq KK4Mz9GE5jWpHJJvIShGENg3b0OW2D/yVVKyeWHyyIbuCLaPJjK40t1PWz74siuG8qt1 kA09S+OA+hFFFdvMI+MMN1ufp5xV6dcsSO9a2CVdFY9o7r8If1YJUOk9LXYwuJAdzwfE yGtmSIUAQ49LMgAcvLk13MiWP6xmpItjF5ZMPajo4JvC0u5VHvhkNkVsdGZHuVif7jkK cSl+1gshVhDleEVcFrjHmsg2laOhFvz9H3n9B7cYJTMIl93HTnTNGUAEChRZiL8BM+pk zc9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=aacGvNecjAmbPiA1B4aof3HJ1Q3kZOy0XORSwLpVguc=; b=B2Yb9gmFz7w2j58wtqqkE4mA94AdZ1ZkrDyDHgwsoNITLKVgnv6eaWDTfn8I2D9g7v oGn0jSdNxkegJ+fdhu16zOku26ferh51P3xdXooAviohLmcqwejkuIvT5FvLU6HqupgU Q+5+QBBNdcf6WNaLQeIVFVYGwgPbtpJzKDgxB5GDywFPkKHsn+nIbUW4NYTsA8Lw1jXX 3RG6uD7YLqUL2P58W5x0dk6gfJHaaERAwVAwkPNuwNvvi2UreUKjZpwueOfMYY3iIo+3 MNdr5U9i1xhHT3tlHvq1OOHUERxxQiBOa8dD4JX9BhSNetUMKN7ZC/KM5XSUoaUL39cn mTEg== X-Gm-Message-State: APjAAAXdpv8e4mx1S301TabJfLrYqgowLBAghETyZTgydnKxxfWhjBN8 vmNJIvCBEB3M6P39Qs3r+lUmrXwgLIY= X-Google-Smtp-Source: APXvYqyOSifO2f8V2/jrI4cnWa7ic7qOEvXRwkQ9m/IRQHd8U9uj+Zt/zG3Cf2tHSbOhWQ58G76l5g== X-Received: by 2002:a5d:6551:: with SMTP id z17mr4789311wrv.269.1576136713436; Wed, 11 Dec 2019 23:45:13 -0800 (PST) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id m7sm5119878wma.39.2019.12.11.23.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 23:45:12 -0800 (PST) From: Robert Pluim To: Alan Third Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault References: <20191211193734.GA2806@breton.holly.idiocy.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Thu, 12 Dec 2019 08:45:11 +0100 In-Reply-To: <20191211193734.GA2806@breton.holly.idiocy.org> (Alan Third's message of "Wed, 11 Dec 2019 19:37:34 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: Mike Hamrick , 38564@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.0 (-) >>>>> On Wed, 11 Dec 2019 19:37:34 +0000, Alan Third said: Alan> On Wed, Dec 11, 2019 at 11:12:41AM +0100, Robert Pluim wrote: >> Right idea, but one layer lower than needed. ns_color_index_to_rgba >> should not be calling ns_lookup_indexed_color in non-gui mode. Try >> this instead: Alan> Hi Robert, thanks for sorting this. One thing... >> + if (FRAME_DISPLAY_INFO (f)) Alan> Would it not be better to use FRAME_NS_P? Yes. In fact, how about reverting my change to ns_color_index_to_rgba and doing this instead (you can=CA=BCt use FRAME_DISPLAY_INFO in dispextern.h without much bigger changes): diff --git i/src/dispextern.h w/src/dispextern.h index 0615b16d71..4bf9f39cd0 100644 --- i/src/dispextern.h +++ w/src/dispextern.h @@ -123,7 +123,9 @@ #define NativeRectangle XRectangle #ifdef HAVE_NS #include "nsgui.h" -#define FACE_COLOR_TO_PIXEL(face_color, frame) ns_color_index_to_rgba(face= _color, frame) +#define FACE_COLOR_TO_PIXEL(face_color, frame) (FRAME_NS_P (frame) \ + ? ns_color_index_to_rgba (= face_color, frame) \ + : face_color) /* Following typedef needed to accommodate the MSDOS port, believe it or n= ot. */ typedef struct ns_display_info Display_Info; typedef Emacs_Pixmap Emacs_Pix_Container; From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 19 13:04:21 2019 Received: (at submit) by debbugs.gnu.org; 19 Dec 2019 18:04:21 +0000 Received: from localhost ([127.0.0.1]:45494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii09s-0007wT-T9 for submit@debbugs.gnu.org; Thu, 19 Dec 2019 13:04:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:43628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii09q-0007wL-SM for submit@debbugs.gnu.org; Thu, 19 Dec 2019 13:04:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49646) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ii09o-0006PM-KQ for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 13:04:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ii09m-0001qW-CC for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 13:04:15 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]:55078) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ii09m-0000o9-46 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 13:04:14 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]) by eidolon.muppetlabs.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ii09S-0003Ch-2b for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 10:03:59 -0800 User-agent: mu4e 1.0; emacs 25.3.1 From: Mike Hamrick To: bug-gnu-emacs@gnu.org Subject: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Date: Thu, 19 Dec 2019 10:03:53 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam_score: -21.8 X-Spam_score_int: -217 X-Spam_bar: --------------------- X-Spam_report: Spam detection software, running on the system "eidolon.muppetlabs.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Heya folks, I believe I'm still experiencing a version of this same bug. I'm not always able to reproduce it unfortunately, but it often happens when viewing git logs in Magit with 'll'. Again, terminal frame wit [...] Content analysis details: (-21.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -20 SC_HAM No description available. -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.1 AWL AWL: Adjusted score from AWL reputation of From: address X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.66.255.52 X-Spam-Score: -1.3 (-) 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.3 (--) Heya folks, I believe I'm still experiencing a version of this same bug. I'm not always able to reproduce it unfortunately, but it often happens when viewing git logs in Magit with 'll'. Again, terminal frame with the 'ns' version of emacs 27. In GNU Emacs 27.0.50 (build 6, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G2022)) of 2019-12-18 built on st-mikeh1 Repository revision: d55f2f74f53910c4416be1e023771dc3a8142727 Repository branch: master System Description: Mac OS X 10.14.6 Here's my stack trace: frame #0: 0x0000000104038b3e Emacs`ns_lookup_indexed_color(idx=18446744073709551613, f=0x00007fb0c801ae10) at nsterm.m:2097:64 2094 NSColor * 2095 ns_lookup_indexed_color (unsigned long idx, struct frame *f) 2096 { -> 2097 struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table; 2098 if (idx < 1 || idx >= color_table->avail) 2099 return nil; 2100 return color_table->colors[idx]; (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffffff00000044) * frame #0: 0x0000000104038b3e Emacs`ns_lookup_indexed_color(idx=18446744073709551613, f=0x00007fb0c801ae10) at nsterm.m:2097:64 frame #1: 0x0000000104039615 Emacs`ns_color_index_to_rgba(idx=-3, f=0x00007fb0c801ae10) at nsterm.m:2301:13 frame #2: 0x0000000103d576f3 Emacs`extend_face_to_end_of_line(it=0x00007ffeebf29110) at xdisp.c:21896:7 frame #3: 0x0000000103d25afa Emacs`display_line(it=0x00007ffeebf29110, cursor_vpos=4) at xdisp.c:23478:4 frame #4: 0x0000000103d2294b Emacs`try_window(window=0x00007fb09aa19705, pos=(charpos = 1, bytepos = 1), flags=1) at xdisp.c:19005:11 frame #5: 0x0000000103d6112f Emacs`redisplay_window(window=0x00007fb09aa19705, just_this_one_p=false) at xdisp.c:18426:8 frame #6: 0x0000000103d5f24d Emacs`redisplay_window_0(window=0x00007fb09aa19705) at xdisp.c:16147:5 frame #7: 0x0000000103f2e83a Emacs`internal_condition_case_1(bfun=(Emacs`redisplay_window_0 at xdisp.c:16145), arg=0x00007fb09aa19705, handlers=0x0000000105fe3e9b, hfun=(Emacs`redisplay_window_error at xdisp.c:16138)) at eval.c:1379:25 frame #8: 0x0000000103d5db3b Emacs`redisplay_windows(window=0x00007fb09aa19705) at xdisp.c:16127:4 frame #9: 0x0000000103d5daea Emacs`redisplay_windows(window=0x00007fb09aa194f5) at xdisp.c:16121:2 frame #10: 0x0000000103d1d2d2 Emacs`redisplay_internal at xdisp.c:15595:5 frame #11: 0x0000000103d21349 Emacs`redisplay at xdisp.c:14822:3 frame #12: 0x0000000103e379d5 Emacs`read_char(commandflag=1, map=0x00007fb0999ae4e3, prev_event=0x0000000000000000, used_mouse_menu=0x00007ffeebf3054f, end_time=0x0000000000000000) at keyboard.c:2488:6 frame #13: 0x0000000103e337e9 Emacs`read_key_sequence(keybuf=0x00007ffeebf30850, prompt=0x0000000000000000, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9536:12 frame #14: 0x0000000103e3220a Emacs`command_loop_1 at keyboard.c:1345:15 frame #15: 0x0000000103f2e77f Emacs`internal_condition_case(bfun=(Emacs`command_loop_1 at keyboard.c:1236), handlers=0x0000000000000090, hfun=(Emacs`cmd_error at keyboard.c:919)) at eval.c:1355:25 frame #16: 0x0000000103e49e9c Emacs`command_loop_2(ignore=0x0000000000000000) at keyboard.c:1091:11 frame #17: 0x0000000103f2e0ea Emacs`internal_catch(tag=0x000000000000c870, func=(Emacs`command_loop_2 at keyboard.c:1087), arg=0x0000000000000000) at eval.c:1116:25 frame #18: 0x0000000103e311b8 Emacs`command_loop at keyboard.c:1070:2 frame #19: 0x0000000103e30ff0 Emacs`recursive_edit_1 at keyboard.c:714:9 frame #20: 0x0000000103e31389 Emacs`Frecursive_edit at keyboard.c:786:3 frame #21: 0x0000000103e2e801 Emacs`main(argc=3, argv=0x00007ffeebf30e08) at emacs.c:2054:3 frame #22: 0x00007fff631363d5 libdyld.dylib`start + 1 frame #23: 0x00007fff631363d5 libdyld.dylib`start + 1 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 19 14:14:32 2019 Received: (at 38564) by debbugs.gnu.org; 19 Dec 2019 19:14:32 +0000 Received: from localhost ([127.0.0.1]:45526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii1Fo-0001Bl-K3 for submit@debbugs.gnu.org; Thu, 19 Dec 2019 14:14:32 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:51715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii1Fk-0001BX-Pr for 38564@debbugs.gnu.org; Thu, 19 Dec 2019 14:14:31 -0500 Received: by mail-wm1-f44.google.com with SMTP id d73so6590800wmd.1 for <38564@debbugs.gnu.org>; Thu, 19 Dec 2019 11:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ygMUCdv9OXyDO8wfvg1r/7FuIDlWF5nC/eQ5UUZXLfY=; b=NpGYwe3Zl8DmCCnrU2Qr5vB/titEurFnJTMFlRrQYekhnKrPRcUBA9iVOtp+fRpIe3 efNM98mYniWWZCcgic4gLGk0qe7IxfZdc993dP0LHEeXjpaJtH5jnzcEwA1x4cVv3iIg JQkoU0SAyLOlwXk7qW2R6VBatOfyZfsqNHUf3FykxrbPF55uxC17bfzVEE/yq4YJyZR+ +qOMlyhJ4EdveXPNcRClpbTczrkkW04A7J5tYJXj7LMgjhOp2Ed/M2lWCmBWwi4ICohS Rs/wa+5qBVCy3hd37NCXDV+5uN/BtV/5OcEv+VkxAJVkKCcvqTNiwIJ++7R5j3EsNCUT eo5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=ygMUCdv9OXyDO8wfvg1r/7FuIDlWF5nC/eQ5UUZXLfY=; b=ib/pYEvxvw+fRjvExqVp4BXSVcEwWEsWspAWulmsIIRMLTagFZ9AUdkqCP7ttJUDdU l9wHEnl+ci2686KFVlgDYLvBRUECsINmcWIscG3yS23/CFaruCy7w+tZYWtszbBGYEB6 W/mGqlbSBzYINloOJ9NBsjZaxm8dPaOEcJOzhddgYNRhBKUxot99v7ZQB0snrWUQmIxZ CoS2OTIsa4txgkG4jRT7sqhRxyNKdZZFa4mwa6ONa3ngl+MYWh+0wMBkAq6aS3QpBezJ PY1VN4UmYsNwRM36MVXPJE2OaxD5w2Gt9NvLjvmuIRazMYexyC4Ak0x2ohEDrE1Q1aZM S3/w== X-Gm-Message-State: APjAAAX4RMElqZjlWZoaqSZmntYI53Ug9vyma20R+XSKvNC+CgulVtgA bpYsp7UDKdPVSoH2oRrQIxTJv7PzFvo= X-Google-Smtp-Source: APXvYqwdCRMqE450xeilEP47dFlnEuErHMUBXcAPw18QD7mDTGbaZzTt/fL+gKdeREYjes7oDkOS0Q== X-Received: by 2002:a1c:1dd7:: with SMTP id d206mr11581334wmd.5.1576782862713; Thu, 19 Dec 2019 11:14:22 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-0d9a-e711-75bf-e162.holly.idiocy.org. [2001:8b0:3f8:8129:d9a:e711:75bf:e162]) by smtp.gmail.com with ESMTPSA id y6sm7182321wrl.17.2019.12.19.11.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 11:14:17 -0800 (PST) Date: Thu, 19 Dec 2019 19:14:16 +0000 From: Alan Third To: Mike Hamrick Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Message-ID: <20191219191416.GA23983@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38564 Cc: 38564@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: -0.5 (/) On Thu, Dec 19, 2019 at 10:03:53AM -0800, Mike Hamrick wrote: > Heya folks, > > I believe I'm still experiencing a version of this same bug. I'm not > always able to reproduce it unfortunately, but it often happens when > viewing git logs in Magit with 'll'. Again, terminal frame with the 'ns' > version of emacs 27. Robert hasn’t pushed his updated version of this fix, and it now occurs to me that he may have been waiting for me to review it... -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 19 14:21:01 2019 Received: (at 38564) by debbugs.gnu.org; 19 Dec 2019 19:21:02 +0000 Received: from localhost ([127.0.0.1]:45533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii1M5-0001Ld-Im for submit@debbugs.gnu.org; Thu, 19 Dec 2019 14:21:01 -0500 Received: from mail-wr1-f41.google.com ([209.85.221.41]:43868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ii1M3-0001LD-Tf for 38564@debbugs.gnu.org; Thu, 19 Dec 2019 14:21:00 -0500 Received: by mail-wr1-f41.google.com with SMTP id d16so7104062wre.10 for <38564@debbugs.gnu.org>; Thu, 19 Dec 2019 11:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=FL/G4lBOxVeCvG9lpxFYXlfqynfJ4KtAprVPQdhx2Pg=; b=AoUiH6LaAwwt5reqvtr75vUrvDsdnvQkykmkir0ldkmRaU+QEFaSU5JLswXa5NPedg RnuOKMQlOSBnAw7WNDU/9YNKROBFk79ivY3rMrxchxqYuMfbwtA/pfAfTpQCySBodSjr kwEOVV8rpp/3ABSU6+hDvdHt/ekAi14PbtDSXDj+Yw6R1z09zgjMNNQ8x5OzjZVpCt8e GyO/y4571vctyhTj4WsfvJ/5uuOtoSXJ9zfylYDYjWh+GKkyJ5SVKL5rZf6FUZAJxS5k tZOOhezAdpq+MxThBaJqhkCQ5zvuA9iz2C9DzTxWlf8BIqmLLaW98BXMbEFascxm+i+G utkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=FL/G4lBOxVeCvG9lpxFYXlfqynfJ4KtAprVPQdhx2Pg=; b=q1cbjACaPaRHXjEKkUC9suxY22yW8YCRsAnLRUYHg5ra+OxKgCI0R2sxKfvdJvP2u1 GGtqeiu+0poQBFC+X2+HTRW1EXD8bg+/ZY5ZvWdFOrmnZrkmDl2XJbG8c6AhqKRTzaG4 4LAKifdaQnl/GccxHFMn7HrTn/dSy2H1986KDnGOl85TwUVMaFsqdSdf/3tIIjg04ccI bZELiZMmw5/OJahUc3AHH2SDWK7XZrJHG7DVpqsewOOFv0Rc2rEPbVq5M981DGFt3qAs irpCLPInkz2GBvjBbBPUlYET17G9Mhsub0hrQe3HmlrTeY2sxQ4LJRnGsCI0NyzHknF4 93mg== X-Gm-Message-State: APjAAAU6RLYZMX15FmIlXIU6UIjRx8qpbUvGvHNxLRduyiOSoQXinyWK eEirYT5hmZQbgsFbLKCQido= X-Google-Smtp-Source: APXvYqzATPx7blMryc37ku+FPLRMKz2+Z2h1K3ihd2190fQ9ir7fbgHT9OpLftV1DZpIHHK3QWUAeA== X-Received: by 2002:adf:e6c6:: with SMTP id y6mr11316399wrm.284.1576783254046; Thu, 19 Dec 2019 11:20:54 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-0d9a-e711-75bf-e162.holly.idiocy.org. [2001:8b0:3f8:8129:d9a:e711:75bf:e162]) by smtp.gmail.com with ESMTPSA id g199sm7621048wmg.12.2019.12.19.11.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 11:20:53 -0800 (PST) Date: Thu, 19 Dec 2019 19:20:50 +0000 From: Alan Third To: Robert Pluim Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Message-ID: <20191219192050.GB23983@breton.holly.idiocy.org> References: <20191211193734.GA2806@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38564 Cc: Mike Hamrick , 38564@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: -0.5 (/) On Thu, Dec 12, 2019 at 08:45:11AM +0100, Robert Pluim wrote: > >>>>> On Wed, 11 Dec 2019 19:37:34 +0000, Alan Third said: > > Alan> On Wed, Dec 11, 2019 at 11:12:41AM +0100, Robert Pluim wrote: > >> Right idea, but one layer lower than needed. ns_color_index_to_rgba > >> should not be calling ns_lookup_indexed_color in non-gui mode. Try > >> this instead: > > Alan> Hi Robert, thanks for sorting this. One thing... > > >> + if (FRAME_DISPLAY_INFO (f)) > > Alan> Would it not be better to use FRAME_NS_P? > > Yes. In fact, how about reverting my change to ns_color_index_to_rgba > and doing this instead (you canʼt use FRAME_DISPLAY_INFO in > dispextern.h without much bigger changes): Hi Robert, I’m not sure if you were waiting for me, but I’m happy with either approach. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 20 06:47:58 2019 Received: (at 38564) by debbugs.gnu.org; 20 Dec 2019 11:47:58 +0000 Received: from localhost ([127.0.0.1]:45980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiGlC-0000bs-3x for submit@debbugs.gnu.org; Fri, 20 Dec 2019 06:47:58 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiGlA-0000bg-Pe for 38564@debbugs.gnu.org; Fri, 20 Dec 2019 06:47:57 -0500 Received: by mail-wm1-f65.google.com with SMTP id p9so8642375wmc.2 for <38564@debbugs.gnu.org>; Fri, 20 Dec 2019 03:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=ZJ5gGq/2KpSFZxLG6/FTdcTQuFeEznPqWmU+1ccv0jY=; b=BofN425NZz83SFvw/2nmpN47l6OsUGnxv3a/yTTrJ3Vlc9pIrWaHSTaBFkeqn3qbUv OLFIe4FRC3F2GgJK4OW0d3iPlOoJtMFM8+oCJQnfBXQHZR1dRhdGyCWyxEa2QZQlWZoh hV0cP2NG3FH7sjIyAp2v8XzKeE9P1iD05U3w6u+MLpW0huHUA9pHTOiiiYGo6AyX2DoU Eago4eARrnK2z7m6s5s7aS6pWfZlUkbFiCoYrmiiZA9YwdpQBOIBJN5kew9d6xiNqa3P vfsZQzQmKcejYNCEzyxzF7eYeBGgPtqnS0z23GDx5+DyhkPBn6LcGcr6EMce5tSb9ft+ 3AbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=ZJ5gGq/2KpSFZxLG6/FTdcTQuFeEznPqWmU+1ccv0jY=; b=Vax/SexKciBTQsGOroK4ctSN62n4mbUyXbsCECaIkNAK/HT+4YDYics/gkdWn3l/Uj kiK9jqva1dLPIYuzds05v4gXxcnWKXRg7eP5akxZmMJix6/HkDQycVO0gBbyKbS5kQxN VF48xpVlcwjWamXnTchodn/+UPBz1y1uZHxGQMX5CAy1F5fqrlwzTmL66wbYZyfC45LN roWpAkJu4RPYuqap+elWaZjE9bJrl92G0Fp1LhbHBOqvyUMGdRhFDPbgqiLOGK9xTpaw V5UdR5ollJgYZjP+/CgZrid6YAuJ5+jR6PRZILLwRtKr64vhAsTL1lh9eNzOrPja955a HiaA== X-Gm-Message-State: APjAAAW4AeMGB1g735imJLyuTC0RmyZua+HgnTegHi5QnTMpqKfZl+Fg ZZiZVbGK+F/9+grBgGCW6MjYYBKQ0BY= X-Google-Smtp-Source: APXvYqwBi5OWRaYdDFCZF58D1vQEWICm8Zanwe4jMiXczkGVEWALwWbSXdDrUKDKrB0q2RxuSUYPKA== X-Received: by 2002:a1c:9c08:: with SMTP id f8mr16343905wme.171.1576842470286; Fri, 20 Dec 2019 03:47:50 -0800 (PST) Received: from rpluim-mac ([2a01:e34:ecfc:a860:e5ef:3495:ab64:be0e]) by smtp.gmail.com with ESMTPSA id u18sm9877892wrt.26.2019.12.20.03.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 03:47:49 -0800 (PST) From: Robert Pluim To: Alan Third Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault References: <20191219191416.GA23983@breton.holly.idiocy.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Fri, 20 Dec 2019 12:47:48 +0100 In-Reply-To: <20191219191416.GA23983@breton.holly.idiocy.org> (Alan Third's message of "Thu, 19 Dec 2019 19:14:16 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: Mike Hamrick , 38564@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.0 (-) >>>>> On Thu, 19 Dec 2019 19:14:16 +0000, Alan Third said: Alan> On Thu, Dec 19, 2019 at 10:03:53AM -0800, Mike Hamrick wrote: >> Heya folks, >>=20 >> I believe I'm still experiencing a version of this same bug. I'm not >> always able to reproduce it unfortunately, but it often happens when >> viewing git logs in Magit with 'll'. Again, terminal frame with the = 'ns' >> version of emacs 27. Alan> Robert hasn=E2=80=99t pushed his updated version of this fix, and= it now Alan> occurs to me that he may have been waiting for me to review it... I was, but I thought the previous version should work as well. Hmm, is FRAME_DISPLAY_INFO guaranteed to be initialized? Mike, could you try the following? diff --git i/src/dispextern.h w/src/dispextern.h index 0615b16d71..4bf9f39cd0 100644 --- i/src/dispextern.h +++ w/src/dispextern.h @@ -123,7 +123,9 @@ #define NativeRectangle XRectangle =20 #ifdef HAVE_NS #include "nsgui.h" -#define FACE_COLOR_TO_PIXEL(face_color, frame) ns_color_index_to_rgba(face= _color, frame) +#define FACE_COLOR_TO_PIXEL(face_color, frame) (FRAME_NS_P (frame) \ + ? ns_color_index_to_rgba (= face_color, frame) \ + : face_color) /* Following typedef needed to accommodate the MSDOS port, believe it or n= ot. */ typedef struct ns_display_info Display_Info; typedef Emacs_Pixmap Emacs_Pix_Container; diff --git i/src/nsterm.m w/src/nsterm.m index 6995577920..c415159890 100644 --- i/src/nsterm.m +++ w/src/nsterm.m @@ -2290,24 +2290,19 @@ so some key presses (TAB) are swallowed by the syst= em. */ =20 /* Convert an index into the color table into an RGBA value. Used in xdisp.c:extend_face_to_end_of_line when comparing faces and frame - color values. No-op on non-gui frames. */ + color values. */ =20 unsigned long ns_color_index_to_rgba(int idx, struct frame *f) { - if (FRAME_DISPLAY_INFO (f)) - { - NSColor *col; - col =3D ns_lookup_indexed_color (idx, f); + NSColor *col; + col =3D ns_lookup_indexed_color (idx, f); =20 - EmacsCGFloat r, g, b, a; - [col getRed: &r green: &g blue: &b alpha: &a]; + EmacsCGFloat r, g, b, a; + [col getRed: &r green: &g blue: &b alpha: &a]; =20 - return ARGB_TO_ULONG((int)(a*255), - (int)(r*255), (int)(g*255), (int)(b*255)); - } - else - return idx; + return ARGB_TO_ULONG((int)(a*255), + (int)(r*255), (int)(g*255), (int)(b*255)); } =20 void From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 20 15:21:56 2019 Received: (at 38564) by debbugs.gnu.org; 20 Dec 2019 20:21:56 +0000 Received: from localhost ([127.0.0.1]:47279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiOmZ-0007Q1-Qn for submit@debbugs.gnu.org; Fri, 20 Dec 2019 15:21:55 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]:51264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiOmX-0007Pm-0F for 38564@debbugs.gnu.org; Fri, 20 Dec 2019 15:21:54 -0500 Received: from eidolon.muppetlabs.com ([207.66.255.52]) by eidolon.muppetlabs.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1iiOmK-0004uH-Ic; Fri, 20 Dec 2019 12:21:45 -0800 References: <20191219191416.GA23983@breton.holly.idiocy.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Mike Hamrick To: Robert Pluim Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault In-reply-to: Date: Fri, 20 Dec 2019 12:21:40 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam_score: -21.9 X-Spam_score_int: -218 X-Spam_bar: --------------------- X-Spam_report: Spam detection software, running on the system "eidolon.muppetlabs.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Robert Pluim writes: > I was, but I thought the previous version should work as well. Hmm, is > FRAME_DISPLAY_INFO guaranteed to be initialized? The stack trace I posted on Thursday the 19th, was built from d55f2f7, which is a number of commits after your commit ea84a95 which updated ns_color_index_to_rbga() to test for a non-null FRAME_DISPLA [...] Content analysis details: (-21.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -20 SC_HAM No description available. -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: Alan Third , Mike Hamrick , 38564@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.0 (-) Robert Pluim writes: > I was, but I thought the previous version should work as well. Hmm, is > FRAME_DISPLAY_INFO guaranteed to be initialized? The stack trace I posted on Thursday the 19th, was built from d55f2f7, which is a number of commits after your commit ea84a95 which updated ns_color_index_to_rbga() to test for a non-null FRAME_DISPLAY_INFO pointer. I think the problem here is that FRAME_DISPLAY_INFO references f->output_data which is a union. #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) union output_data { struct tty_output *tty; /* From termchar.h. */ struct x_output *x; /* From xterm.h. */ struct w32_output *w32; /* From w32term.h. */ struct ns_output *ns; /* From nsterm.h. */ } In the case of a tty frame, we're going to be dereferencing a struct tty_output *, rather than a struct ns_ouput *, and when that happens sometimes the "display_info" offset into the tty_output struct may or my not luckily land on patch of NULL bytes. Robert Pluim also wrote: > Mike, could you try the following? Yup, I'm running with that patch now. This should stop the function extend_face_to_end_of_line() from ever calling ns_color_index_to_rgba() when you're in a tty frame, which I think will fix this for good. I've taken to running my emacs 27 server process in the debugger, so if I get any more crashes I should have more stack traces for ya. Thanks! Mike From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 15:41:41 2019 Received: (at 38564) by debbugs.gnu.org; 29 Dec 2019 20:41:42 +0000 Received: from localhost ([127.0.0.1]:60281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilfNd-0001Yh-Ma for submit@debbugs.gnu.org; Sun, 29 Dec 2019 15:41:41 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:33891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilfNb-0001YP-HF; Sun, 29 Dec 2019 15:41:40 -0500 Received: by mail-wm1-f46.google.com with SMTP id c127so10423129wme.1; Sun, 29 Dec 2019 12:41:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=D5G3z4hTRtXWTtm3v6oUTVc0JFlhF/maZ7GF5bKi7jo=; b=sH1gI8t/cJOWNf6ijoe6q/qsz8UOnhpAH7GdoucbBobVhe6CT2PWnFLr/1VjbMJLrL 15O8VESvXuEQPtkhYzBMZA4vP2FqtkdmAkhrG9aahekUZrbJWNUIXr2Lsam/L9Qjz+W2 M8I6Cxd4bK/Z04rU3FvJitZYyRORUu691qAK4wUtTaY93x8tzExNOm/kKlKP8ajlUNiN BwQdhD56LAcbxaykQtoEcBqoZOYauhN2CHBEWuA0qlcBiXckzd7NM132V4heYywcZYsq aRcVrCRQSJApsdCL8yjlkK8qRQaXRuTb4kbh2OkZmNnyMW3cnxP5q2QDNAAh5UkynqRY Ok7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=D5G3z4hTRtXWTtm3v6oUTVc0JFlhF/maZ7GF5bKi7jo=; b=NN1d7vEZMjCwVHHpXgPHRmRZZU38+GQeZUDNt0suVYy82t90lmjNWIZhxGfpj9C1l3 1xL08PEXRvVqUDYxAzT5/8r5gE16DaBLU2X05x/iPSonG+br/3syA79g1hzSkLUBIj9J 7YoYYcWR/34lVtLXvRgScqYykokATfRIrNCJqT9rbod2MvR0N9xM5gdPtx7E2izgybJu 6d5OMafpD13ybIWrPR5tGnq9N7aaVm5MJv8S58SrASssJD35P58eHy6xKV9HNBfVw51o XzZfKchpthuxTfe76XwTBTTbUKKLWmbi1sBFAs6n1yrwY2blnI8TtfjEcSk/TlaSOR+q To6g== X-Gm-Message-State: APjAAAWqcgI2zm3V+u92FTRdzl1NssK4IVBwsI7AIPoXBalDyzilRio3 UH6xmOizpAhMnDNfi1ZkmxesMMOlXQI= X-Google-Smtp-Source: APXvYqwjKNvtbAru8T63rG3zU9SrBrXdu4ojwq28xV1oLIRW1i4pANKIpCLx/RExM0lOOkVyxRy2FQ== X-Received: by 2002:a1c:3dc3:: with SMTP id k186mr29642885wma.95.1577652093335; Sun, 29 Dec 2019 12:41:33 -0800 (PST) Received: from rpluim-mac ([2a01:e34:ecfc:a860:f526:2fc9:7a9e:3937]) by smtp.gmail.com with ESMTPSA id q15sm44551705wrr.11.2019.12.29.12.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2019 12:41:32 -0800 (PST) From: Robert Pluim To: Mike Hamrick Subject: Re: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault References: <20191219191416.GA23983@breton.holly.idiocy.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Sun, 29 Dec 2019 21:41:31 +0100 In-Reply-To: (Mike Hamrick's message of "Fri, 20 Dec 2019 12:21:40 -0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38564 Cc: Alan Third , 38564@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.0 (-) tags 38564 fixed close 38564 27.1 quit >>>>> On Fri, 20 Dec 2019 12:21:40 -0800, Mike Hamrick said: Mike> Yup, I'm running with that patch now. This should stop the functi= on Mike> extend_face_to_end_of_line() from ever calling ns_color_index_to_= rgba() Mike> when you're in a tty frame, which I think will fix this for good. I=CA=BCve now pushed this to the emacs-27 branch. Closing. Committed as 81b697d106. Robert From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 10:12:38 2020 Received: (at control) by debbugs.gnu.org; 6 Jan 2020 15:12:38 +0000 Received: from localhost ([127.0.0.1]:46499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioU3a-0001Rf-3O for submit@debbugs.gnu.org; Mon, 06 Jan 2020 10:12:38 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:36751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioU3Y-0001RO-HM for control@debbugs.gnu.org; Mon, 06 Jan 2020 10:12:37 -0500 Received: by mail-wr1-f50.google.com with SMTP id z3so50022444wru.3 for ; Mon, 06 Jan 2020 07:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=v95fJEFd3YtKdMlA7L5hl7U9cyNP6LzE87Hj1usnZUc=; b=e1wDXfRPr/gMgHmuzOtu++G/5VPMYqCUDgW2I0A6FUSJJHkxhEMdndRpW8x6v7a5dW y9B9z7xrY3D4VpCAUkWw+yQImZNM6BEXkSy+WB/tu8r2ZjpaECb1/BVuXQmVhq0/Cx/u ZWBbqB0AWjbCYZMcOt/vUBA9U0z7OtH7o+DmjK55D5LFbaamGT3NrMkR5w9QFvgz4sY9 +Thwxft93lC57vE8nAdmT9agNLJshqMdfFLF4C2R8uao0hFw9rIGTvgSihhyckwKOiRV VIxFN/H+UDrcmWPRRc2Thm+3CIan/sYODjqkoDz3WuYUcbu1k0+4AEAWmPjzEKMmb2tp gk7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=v95fJEFd3YtKdMlA7L5hl7U9cyNP6LzE87Hj1usnZUc=; b=ak9NBebmgVoDdig3OKq6aVOoNyNoYxlj+PDqYJiirONZu7lc12sqzGeNGnzidNttft Zdoy9lKfuBLeXf/xHENmZPYeaMUZBG2rHC/Ss7sZ8eeZRBy4Fsu1he6yDmcMl/WLFEk7 ldjdL3cDoRozJwIWVp+UtZ5/8aEeo7S3nqX1qWgTolTE7ud2rWDc8rKzfZGMh6hvk+Oz figdqHqRAR4uGa4j47aezN0YD7zXkyeGz4vi9CzjJPuvoC7H61UZeFcV8ZqQtaJg5Xci r4Q93Ftd3cWtEJ9jJZlIJTP9jx6JKLk6V2ZRZM0AwFR+zpkHCOsIEwjIlagfapobzq+l ChdA== X-Gm-Message-State: APjAAAVbcaLY78tJdI4+HM1zyXngRA+RXAHwq7aK0naO0rMXwiip9J9i G5y8+ySukcfIhb29psPObdqdSE6S X-Google-Smtp-Source: APXvYqwh/9g7pcgAJgjXwTOspjkPWR1uU0bK9ZmaVcCIXfo/1FLhmrHWwftb2IDBvmIS84/89oWcpg== X-Received: by 2002:adf:f1cb:: with SMTP id z11mr100986150wro.375.1578323550426; Mon, 06 Jan 2020 07:12:30 -0800 (PST) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id t1sm23446024wma.43.2020.01.06.07.12.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 07:12:29 -0800 (PST) Date: Mon, 06 Jan 2020 16:12:28 +0100 Message-Id: To: control@debbugs.gnu.org From: Robert Pluim Subject: control message for bug #38757 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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.0 (-) merge 38757 38564 quit From unknown Mon Jun 16 23:40:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Feb 2020 12:24:05 +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