Subject: Re: bug#60144: 30.0.50; PGTK Emacs crashes after signal

From: Po Lu <[email-masked]>
Date: Sun, 18 Dec 2022 14:22:04 +0800

Eli Zaretskii <[email-masked]> writes:

> You cannot require that from note_mouse_highlight, since it looks up
> text and overlay properties, and those can signal an error if the
> position is outside the valid/reachable range of buffer positions.

How about simply wrapping those calls in
internal_catch_all/internal_condition_case?

> Do you understand why note_mouse_highlight was called in this
> scenario?  The backtrace seems strange: why should GTK care about our
> mouse highlight?

What happens here is that Emacs is reading input through GTK, either
inside xg_select or the read_socket_hook.  GTK then detects some mouse
motion and calls the motion event handler for the frame's widget, which
in turn calls note_mouse_movement.