From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#44313: 27.1.50; ns_mouse_position EXC_BAD_ACCESS crash Date: Fri, 30 Oct 2020 10:54:56 -0500 Message-ID: References: <83o8kkb2vr.fsf@gnu.org> <83a6w4ar50.fsf@gnu.org> 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="23683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44313@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 16:56:16 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 1kYWlB-00063R-PK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 16:56:13 +0100 Original-Received: from localhost ([::1]:42850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYWlA-000751-QD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 11:56:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYWl0-00073O-UT for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 11:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYWl0-0004X2-IU for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 11:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYWl0-00063x-II for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 11:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44313 X-GNU-PR-Package: emacs Original-Received: via spool by 44313-submit@debbugs.gnu.org id=B44313.160407331523216 (code B ref 44313); Fri, 30 Oct 2020 15:56:02 +0000 Original-Received: (at 44313) by debbugs.gnu.org; 30 Oct 2020 15:55:15 +0000 Original-Received: from localhost ([127.0.0.1]:59368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYWkE-00062O-OC for submit@debbugs.gnu.org; Fri, 30 Oct 2020 11:55:15 -0400 Original-Received: from mail-yb1-f182.google.com ([209.85.219.182]:45649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYWkD-00062B-Cx for 44313@debbugs.gnu.org; Fri, 30 Oct 2020 11:55:13 -0400 Original-Received: by mail-yb1-f182.google.com with SMTP id s89so5480706ybi.12 for <44313@debbugs.gnu.org>; Fri, 30 Oct 2020 08:55:13 -0700 (PDT) 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 :cc; bh=9fCnZ6tsmwztEXyocUCPEzh+uUHSf0QWeW+8SpX4qFw=; b=s5OrNZEJnxT4OUl9IFzrjkD/VcPm2WPo63AOXeGLQgiUu7kRNpvaMkXarsXfzFkkhQ 0HXE0008TUYFG2eBs7V47l2EAA73L78SN77Q/PSnGSdbpCcdIuHlmATmjEpXr5iLjUfl eBoFYyNU2aPK7rm/1PAaiDCVuhz3D34uFSBTDySyEcYiDL5sYvdiNlm37pU7igyApoaX LUSYR1C33V+4SJsjWRNuxOF831iLz+KIQ7iQp7CYG8yrKJiOj0C9S2tbRpomquMKKF+/ 324tlo6q4a9gbKgvPPX7kP/XWL7omyK59pg3DOT3TburFlzkyQmiM115ZffADwobIsVc FbxQ== 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:cc; bh=9fCnZ6tsmwztEXyocUCPEzh+uUHSf0QWeW+8SpX4qFw=; b=glIYoccFKz7TV/V0J4adw4W6/C1bcZlHhE9uN5/bPbyHojX24+cRjQgUcVLYjE8Cfo C3bPc0Aje4egqN8goGwl0At/K7h0/+SWMuTXUUUBdz+tH3umwUnnDdmChkuYYoxEOpCB +bTo15zS7PJnLwkn1PkeZYm39LMpWeRspuRrrsy3+R+uCSMiJbrfGza2XmB3qRDooGTp rgo4RGXLY/kZwvjH37st9DnTPzs648bQkobbw5rQ4uPJxh3uSMhK78zrdkbC3aTMmeUk c/0eeYqHuAg6KUWTmf19xGRtObhtvg8DlN2tUbObt1eZ27Mhn5LZg9qhPSDtxtD41hms NNcg== X-Gm-Message-State: AOAM532A3zeM67z0xjs9EuyZtST5QX3L3c4/w6WVVZPKUH7bOz1tMzdD +5JMH7A0itD1YOun/bR9kXUzdBHx9/hErK+lZVs= X-Google-Smtp-Source: ABdhPJzNzKCmGyl4O/yMhGYbtrte9SG0ArBVPOkQY4zOdPhXILrx5G4kQXoAT+0tRctFKXNWI5RPRY9NcbyGMLDRLG0= X-Received: by 2002:a25:ac23:: with SMTP id w35mr4745310ybi.171.1604073307714; Fri, 30 Oct 2020 08:55:07 -0700 (PDT) In-Reply-To: <83a6w4ar50.fsf@gnu.org> 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:192142 Archived-At: On Fri, Oct 30, 2020 at 6:29 AM Eli Zaretskii wrote: > If f is non-NULL, I don't think it could case EXC_BAD_ACCESS, unless f > is garbled and points outside of the process's address space. Which > is why we need to see the value of f and whether the address it points > to could be accessed. Looks like it's non-NULL and it can't be accessed. (lldb) p f (frame *) $12 = 0x00000009040f6c5d (lldb) p *f error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory (lldb) p (f)->output_method error: supposed to interpret, but failed: Interpreter couldn't read from memory > For this, we need to see the Lisp-level backtrace at the crash. > Sadly, AFAIK lldb doesn't support the commands in src/.gdbinit, so the > only way to generate this I know of is to manually show the function > called by each Funcall in the C backtrace. Which is quite tedious. Here is the lisp trace, deepest first: (unsigned char *) $14 = 0x00000001003f413d "mouse-fixup-help-message" (unsigned char *) $15 = 0x00000001003e2c94 "mouse-pixel-position" And the whole trace: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x9040f6d4d) * frame #0: 0x0000000100378558 emacs`ns_mouse_position(fp=0x00007ffeefbfd3e8, insist=-1, bar_window=0x00007ffeefbfd3e0, part=0x00007ffeefbfd3c4, x=0x00007ffeefbfd3d8, y=0x00007ffeefbfd3d0, time=0x00007ffeefbfd3b8) at nsterm.m:2536:12 frame #1: 0x000000010001fefc emacs`Fmouse_pixel_position at frame.c:2494:7 frame #2: 0x00000001002693c6 emacs`funcall_subr(subr=0x0000000100412bc8, numargs=0, args=0x00007ffeefbfd588) at eval.c:2866:19 frame #3: 0x0000000100268204 emacs`Ffuncall(nargs=1, args=0x00007ffeefbfd580) at eval.c:2795:11 frame #4: 0x00000001002d951e emacs`exec_byte_code(bytestr=0x0000000104a2a0a4, vector=0x0000000104a29fa5, maxdepth=0x000000000000002a, args_template=0x0000000000000406, nargs=1, args=0x00007ffeefbfdcf8) at bytecode.c:633:12 frame #5: 0x000000010026985c emacs`funcall_lambda(fun=0x0000000104a29f75, nargs=1, arg_vector=0x00007ffeefbfdcf0) at eval.c:2990:11 frame #6: 0x000000010026824e emacs`Ffuncall(nargs=2, args=0x00007ffeefbfdce8) at eval.c:2797:11 frame #7: 0x0000000100268d2f emacs`call1(fn=0x00000000000094b0, arg1=0x00000001497f07f4) at eval.c:2655:10 frame #8: 0x0000000100169ebf emacs`show_help_echo(help=0x00000001497f07f4, window=0x000000028c2d1c05, object=0x00000001b3a638e5, pos=0x00000000000007ce) at keyboard.c:2093:14 frame #9: 0x000000010016cb33 emacs`read_char(commandflag=1, map=0x000000029d82b233, prev_event=0x0000000000000000, used_mouse_menu=0x00007ffeefbfe7ef, end_time=0x0000000000000000) at keyboard.c:3117:7 frame #10: 0x0000000100166719 emacs`read_key_sequence(keybuf=0x00007ffeefbfeaf0, prompt=0x0000000000000000, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9554:12 frame #11: 0x0000000100165139 emacs`command_loop_1 at keyboard.c:1350:15 frame #12: 0x0000000100261b4f 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 frame #13: 0x000000010017ce8c emacs`command_loop_2(ignore=0x0000000000000000) at keyboard.c:1091:11 frame #14: 0x00000001002614ba emacs`internal_catch(tag=0x000000000000c840, func=(emacs`command_loop_2 at keyboard.c:1087), arg=0x0000000000000000) at eval.c:1117:25 frame #15: 0x00000001001640ca emacs`command_loop at keyboard.c:1070:2 frame #16: 0x0000000100163f50 emacs`recursive_edit_1 at keyboard.c:714:9 frame #17: 0x0000000100164299 emacs`Frecursive_edit at keyboard.c:786:3 frame #18: 0x0000000100161764 emacs`main(argc=1, argv=0x00007ffeefbff0a0) at emacs.c:2066:3 frame #19: 0x00007fff6a33dcc9 libdyld.dylib`start + 1