GNU bug report logs -
#70311
Crash when dnd-indicate-insertion-point is non-nil
Previous Next
Full log
Message #11 received at 70311 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Greg Sexton <gregsexton <at> gmail.com>
>> Date: Tue, 9 Apr 2024 11:26:41 +0100
>>
>> 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.
>
> Po Lu, any comments or suggestions?
As regards suggestions, none at present. It's not clear to me why
waiting_for_input should continue to exist, but neither am I especially
satisfied with the present arrangements for calling drag-and-drop
callbacks in nsterm.m: some means should be devised of returning to the
event loop during a DND session, rather than calling Lisp and parts of
redisplay from non-reentrant input handlers that the toolkit can call at
will.
Come to think of it, at the time this kludge was written, I never quite
understood why DND events were never received on Mac OS, when the same
was smooth sailing on GNUstep.
This bug report was last modified 1 year and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.