GNU bug report logs - #70311
Crash when dnd-indicate-insertion-point is non-nil

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Greg Sexton <gregsexton@HIDDEN>; dated Tue, 9 Apr 2024 15:00:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Apr 2024 14:59:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 09 10:59:54 2024
Received: from localhost ([127.0.0.1]:51222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ruCwz-0002yK-MC
	for submit <at> debbugs.gnu.org; Tue, 09 Apr 2024 10:59:54 -0400
Received: from lists.gnu.org ([2001:470:142::17]:36484)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregsexton@HIDDEN>) id 1ru8h3-0002DO-VY
 for submit <at> debbugs.gnu.org; Tue, 09 Apr 2024 06:27:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gregsexton@HIDDEN>)
 id 1ru8gq-0002vU-Jd
 for bug-gnu-emacs@HIDDEN; Tue, 09 Apr 2024 06:26:56 -0400
Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gregsexton@HIDDEN>)
 id 1ru8gp-0006MN-3o
 for bug-gnu-emacs@HIDDEN; Tue, 09 Apr 2024 06:26:56 -0400
Received: by mail-lf1-x136.google.com with SMTP id
 2adb3069b0e04-516ab4b3251so6042916e87.0
 for <bug-gnu-emacs@HIDDEN>; Tue, 09 Apr 2024 03:26:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1712658412; x=1713263212; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=xdkXiLED4WSEuSrFBZUiHmpJoWU39qhXpLJJTipYE14=;
 b=BA3KyAR1zYx4Ed/j/65X6CVQsPZGRY+QFpZ+vESwm5r/tN3SqcmyMqJFlJkPycZr4z
 oY8EQOGVInwvy7gEWZy2ZXYqN7myrXAHSXkfmCmFacohiQ1LscQbXtaxbF9u3LEM5tfn
 WhZNMriOMpLGiVWZyP5en03vme/P3cPWFVlKH3IsLf2yzSWC8I9LnsLv3Anmna7wA1Yx
 wvSolDjJuoMAg2UiVeK2Zh19I+pIpQxuCor/oYB1EDMnuO9NWf/AUj68Klmw7D/6KLP+
 qPiPmspVjiAa4EcQ2bMlwfou/SZUCvrtq8yAUZicyTthMROP1s6g8ufVgD4T56m084bS
 Qquw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1712658412; x=1713263212;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=xdkXiLED4WSEuSrFBZUiHmpJoWU39qhXpLJJTipYE14=;
 b=mTwQFivEnt3zC1dti+ptkJHHOD8nOkCMDr0MhbTKj8ZCxgJJ1Pdmz64crzduNwS2sB
 IZE8q9YkVrKpW5QgXlPcqQm5e/AEBI7PxzRKGTrA4k0T/ffJLqiUHIkwaCLgnT5mIY47
 IrckIU/l8pFbHtovNmhWIxEQKcENZ/QWixR49UUyzaL3vq44lDdMuSTcmMOOaqTsiNzp
 RUFe8+V8YH8dA3oxcF1bmGgr/a5oooyZ/mues2UR1NKH2CtIr3wF1T2oEFdOrCW8DD9U
 7tni8hHHkaKU+M+3C41JLgE9qStt39CRYd3DuNWYr4zigzinlnt7FZzG5SoxUSUl1jey
 W8ww==
X-Gm-Message-State: AOJu0Yy/Tjpa7eCvmuEuKRgIYqETNi1jBueBsIYiHGLNzsbIf3EUrOYQ
 3wB2frmDRFswnuzjqfXhWXLWl1xs4tJDGPF4Ex4igUBuImvp38O5I0wlFpYbS2TnZuEkorSooc8
 SeI4RH03qkRiGsKLoSFiXqWQQmgyOyxDCsQM=
X-Google-Smtp-Source: AGHT+IE/CG0FWum+nP3uQsop8JP7oUmlO84cbassUPDuWxzo29MT39dHLAbp1BWylxT5/EtnwjpS6E9+qZ5reZ7u/MY=
X-Received: by 2002:a05:6512:23a2:b0:516:d538:d558 with SMTP id
 c34-20020a05651223a200b00516d538d558mr11482628lfv.29.1712658412481; Tue, 09
 Apr 2024 03:26:52 -0700 (PDT)
MIME-Version: 1.0
From: Greg Sexton <gregsexton@HIDDEN>
Date: Tue, 9 Apr 2024 11:26:41 +0100
Message-ID: <CAMOAacpH--ns2bqfRoSN-4XPC0y7uBT6-d+HPjTGk8RyAw00QQ@HIDDEN>
Subject: Crash when dnd-indicate-insertion-point is non-nil
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::136;
 envelope-from=gregsexton@HIDDEN; helo=mail-lf1-x136.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 09 Apr 2024 10:59:53 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Emacs (29.1.90) can crash on Mac OS X when dnd-indicate-insertion-point
is non-nil.

I'm not able to deterministically reproduce this, but I have a high
success rate dragging a file over the window and just randomly moving
it around without releasing the click.

This said, I attached a debugger and found the root cause.

There is code that looks like this in dnd-handle-movement:

  (when dnd-indicate-insertion-point
     (ignore-errors
       (goto-char (posn-point posn))))

posn-point can return nil, which causes goto-char to call
wrong_type_argument, this reaches signal_or_quit (eval.c), which calls
emacs_abort as waiting_for_input is true.

A quick fix might be to when-let the result of posn-point, but I'm
unsure if waiting_for_input being true points to a deeper issue.

--

Greg




Acknowledgement sent to Greg Sexton <gregsexton@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70311; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 9 Apr 2024 15:15:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.