From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#45541: 28.0.50; Frequent crashes on ARM macOS Date: Wed, 30 Dec 2020 15:42:24 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29434"; mail-complaints-to="usenet@ciao.gmane.io" To: Alan Third , Philipp Stephani , 45541@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 30 15:43:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kucgx-0007QC-LN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Dec 2020 15:43:11 +0100 Original-Received: from localhost ([::1]:50446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kucgw-0005BB-8r for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Dec 2020 09:43:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kucgo-0005B2-NP for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2020 09:43:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kucgo-0007mA-FV for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2020 09:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kucgo-0004ZO-DW for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2020 09:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2020 14:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45541 X-GNU-PR-Package: emacs Original-Received: via spool by 45541-submit@debbugs.gnu.org id=B45541.160933936417519 (code B ref 45541); Wed, 30 Dec 2020 14:43:02 +0000 Original-Received: (at 45541) by debbugs.gnu.org; 30 Dec 2020 14:42:44 +0000 Original-Received: from localhost ([127.0.0.1]:48853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kucgV-0004YS-K8 for submit@debbugs.gnu.org; Wed, 30 Dec 2020 09:42:43 -0500 Original-Received: from mail-oi1-f176.google.com ([209.85.167.176]:37654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kucgT-0004Y7-HU for 45541@debbugs.gnu.org; Wed, 30 Dec 2020 09:42:42 -0500 Original-Received: by mail-oi1-f176.google.com with SMTP id l207so18843833oib.4 for <45541@debbugs.gnu.org>; Wed, 30 Dec 2020 06:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HgiwAs7biZG+b/2RT1YZ0MKiP6LbOITTe0iRXBWPk90=; b=iTG5F9bd8zxJLylCc5tIFKXepRVYWg4nG/gaI32/I9iKWkjE4T193yu99JQCYZl6Vs 4GfhTAPk7UPxneBr6EU+lpJMTICXkgfnJ1GXUimNwL+TYoeP3RvgQaxSbAbPGdnXIQ+P KTYKUknvjW+5NqpSm8yQ/f4RsehHCg6jhJzPnimy2BI+0J70tUXH/dZQDi1RKC21DmEF Dp3CC6Kvi3VY/lrFiloiuIR3BWm80euC3qghSG2ZES90aQegFZJ8fl48utFw1AUX6Y9d JFBXggJcKTOk0eibJZ7wduwLfWQutpB5ejC09l1/MhdHXJQdA+KjnE3qX/W3g2Q+Ujgi VAkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HgiwAs7biZG+b/2RT1YZ0MKiP6LbOITTe0iRXBWPk90=; b=iA2rRFEAi2tsfaa5zbc1g92jZ2FJaKRqe2iLm0L1FeefiXkibkgbm9RelEF7Y1dNB8 v/mw0t4n6paMkwcGuA9u/YE8vSgJPOvVOByy9gyfDiNCOPQaY2y5zjl8BBNSFFO/KcYr aoSEDKSI5kNs6Q9qvRHTZ8EgN/g8pZVKzjgsWy9Ko7JVGCAP4Yd0eGbnuT0A/GV3NRMb jua9ulzZZ3pxlc+fVFARmhGA1L3JF+o65I9ley4fRDlyceOqL5BtN0xGATm30TS/8ao3 zVphHjFpTyaombGuIZNJes9cl0ylOOQUtDAWsZd9Twk7J75MAEXyyPOTZ2KagOuXXpPx nVMQ== X-Gm-Message-State: AOAM532+Sn1rFLwd2OwrqqIDRsmnsW2rZDsBZvV/7cIUesZWySMUOWmO LbFOLLemufrvUunKRDZHbkO29ldyVcSIpBzwc0M= X-Google-Smtp-Source: ABdhPJwGN2+HFA1F17btF7gi3i4o4mBgqf4fwEcBMNBKWTgEf/Z3HoZj/HKIvAhP952lJrbZbiRRO7RzuA4dxhVhdmE= X-Received: by 2002:aca:3b03:: with SMTP id i3mr5396699oia.170.1609339355812; Wed, 30 Dec 2020 06:42:35 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197030 Archived-At: Am Mi., 30. Dez. 2020 um 15:05 Uhr schrieb Alan Third : > > On Wed, Dec 30, 2020 at 02:01:18PM +0100, Philipp Stephani wrote: > > Am Mi., 30. Dez. 2020 um 01:10 Uhr schrieb Alan Third : > > > > > > On Tue, Dec 29, 2020 at 11:32:43PM +0100, Philipp wrote: > > > > > > > > With an Emacs built from the emacs-27 branch I get frequent crashes on > > > > ARM64 macOS (Big Sur). I haven't managed to produce an Elisp stacktrace > > > > yet, but here's the crash report: > > > > > > > Looks like a crash in ns_mouse_position. > > > > > > Can you check that the build includes this? > > > > > > 6aa9fe3e1b4052b2acde86404a90e35893ebfa00? > > > Fix crash in ns_mouse_position (bug#44313) > > > > Yes, according to "git branch --contains" the commit is present. The > > exception report makes me think that NSApp is null or invalid, but how > > should that be possible? > > I have no idea... What's happening when the crash occurs? I take it > the mouse is being moved, but are frames opening and closing or > anything? I'm now able to reproduce this consistently. It happens when a tooltip appears and you hover over that tooltip (try M-x locate and move the mouse around). The crash is in the line if (f && FRAME_NS_P (f)) in nsterm.m in ns_mouse_position, so apparently "f" is not NULL, but also not valid. Interestingly I can only reproduce the issue in optimized builds. The LLDB backtrace is: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x38d0) frame #0: 0x00000001001d87fc emacs`ns_mouse_position(fp=, insist=, bar_window=, part=, x=, y=, time=) at nsterm.m:2538:12 [opt] 2535 && FRAME_LIVE_P (dpyinfo->last_mouse_frame)) 2536 f = dpyinfo->last_mouse_frame; 2537 -> 2538 if (f && FRAME_NS_P (f)) 2539 { 2540 view = FRAME_NS_VIEW (f); 2541 Target 0: (emacs) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x38d0) * frame #0: 0x00000001001d87fc emacs`ns_mouse_position(fp=, insist=, bar_window=, part=, x=, y=, time=) at nsterm.m:2538:12 [opt] frame #1: 0x00000001000112c8 emacs`Fmouse_pixel_position at frame.c:2498:7 [opt] frame #2: 0x000000010013fe48 emacs`funcall_subr(subr=0x0000000100251778, numargs=, args=) at eval.c:2866:19 [opt] frame #3: 0x000000010013f420 emacs`Ffuncall(nargs=, args=) at eval.c:2795:11 [opt] frame #4: 0x0000000100180208 emacs`exec_byte_code(bytestr=, vector=, maxdepth=, args_template=, nargs=4611686018813263872, args=) at bytecode.c:633:12 [opt] frame #5: 0x00000001001403c0 emacs`funcall_lambda(fun=, nargs=, arg_vector=) at eval.c:2990:11 [opt] [artificial] frame #6: 0x000000010013f3a8 emacs`Ffuncall(nargs=, args=) at eval.c:0 [opt] frame #7: 0x000000010013fb0c emacs`call1(fn=0x00000000000094b0, arg1=0x00000001160244d4) at eval.c:2655:10 [opt] frame #8: 0x00000001000c0c1c emacs`show_help_echo(help=0x00000001160244d4, window=, object=, pos=) at keyboard.c:2093:14 [opt] frame #9: 0x00000001000c130c emacs`read_char(commandflag=, map=, prev_event=0x0000000000000000, used_mouse_menu=, end_time=) at keyboard.c:3117:7 [opt] frame #10: 0x00000001000bf220 emacs`read_key_sequence(keybuf=0x000000016fdff1e0, prompt=0x0000000000000000, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=) at keyboard.c:9554:12 [opt] frame #11: 0x00000001000bdcd0 emacs`command_loop_1 at keyboard.c:1350:15 [opt] frame #12: 0x000000010013da6c 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:1356:25 [opt] frame #13: 0x00000001000cc6ac emacs`command_loop_2(ignore=0x0000000000000000) at keyboard.c:1091:11 [opt] frame #14: 0x000000010013d354 emacs`internal_catch(tag=, func=(emacs`command_loop_2 at keyboard.c:1087), arg=0x0000000000000000) at eval.c:1117:25 [opt] frame #15: 0x00000001001fe690 emacs`recursive_edit_1.cold.1 at keyboard.c:1070:2 [opt] frame #16: 0x00000001000bcdc0 emacs`recursive_edit_1 [inlined] command_loop at keyboard.c:1067:5 [opt] frame #17: 0x00000001000bcdbc emacs`recursive_edit_1 at keyboard.c:714 [opt] frame #18: 0x00000001000bcf68 emacs`Frecursive_edit at keyboard.c:786:3 [opt] frame #19: 0x00000001000bc3b0 emacs`main(argc=, argv=) at emacs.c:2066:3 [opt] frame #20: 0x000000018d25cf34 libdyld.dylib`start + 4