From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60144: 30.0.50; PGTK Emacs crashes after signal Date: Sun, 18 Dec 2022 17:52:42 +0800 Message-ID: <875ye9f385.fsf@yahoo.com> References: <87edsxfop0.fsf@yahoo.com> <83359dgt7v.fsf@gnu.org> <87a63lfcz7.fsf@yahoo.com> <83y1r5f6lh.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9888"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 60144@debbugs.gnu.org, karl@karlotness.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 18 10:54:26 2022 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 1p6qNG-0002Ow-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Dec 2022 10:54:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6qMu-0005kH-Mr; Sun, 18 Dec 2022 04:54:04 -0500 Original-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 ) id 1p6qMs-0005jr-Rd for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 04:54:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6qMs-0008IF-AJ for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 04:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6qMr-0006dg-Sg for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 04:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2022 09:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60144 X-GNU-PR-Package: emacs Original-Received: via spool by 60144-submit@debbugs.gnu.org id=B60144.167135718425497 (code B ref 60144); Sun, 18 Dec 2022 09:54:01 +0000 Original-Received: (at 60144) by debbugs.gnu.org; 18 Dec 2022 09:53:04 +0000 Original-Received: from localhost ([127.0.0.1]:32993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6qLw-0006dB-E2 for submit@debbugs.gnu.org; Sun, 18 Dec 2022 04:53:04 -0500 Original-Received: from sonic302-21.consmr.mail.ne1.yahoo.com ([66.163.186.147]:35392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6qLu-0006cn-EZ for 60144@debbugs.gnu.org; Sun, 18 Dec 2022 04:53:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1671357174; bh=ZVPAeaf2Uv4O3B+ilbAFAkVC9TDMZBJ83Wv9bpgxhlg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Ei22aO5yP5zhjc6CsHDmZjDQ1j2VDFYCZAeMuB0nm1UcI2QrxOV6x78e6ZzZlHjkU0aRFlax83bGTDn7wkm/NhBX+gsmjhY/0NhogJRKipl3w8G1O4Zwq01uKS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.SCnb35YoZAwWSJvIG PpXzim15j1bGZ7q8RqKRx5KqFZR1cNcNlZfq0onGhoRV7a_BCjot5XIzo2Flc0k5bWH3mbTCaZ1T hTQAIFxMXOW2RqTZmPtjxxpg8AQvscdvn7_X333ezsJy.4OqcCieSOslJ_7Bx.7qtJWOgm.P6FnV .VQFmcdcoK.QGvqUA6puPvqBl1zAVqIpdgUSHtp3ZQfvMrhNOz98h3ItD15.KiIgJCkzlCeYAlbk QcVVuL3pp8hS6NxMj_t.NUvn0tEUq.BzjxDkzVNu8IW68pKStzNVoaR96kOzEpsywbTtn0MfFDig Zjw_RcRAYZeHIfpoIqVS6Y7EQ4gUfJs156WR3oHBd85YaSbwfsYEr8ymjCUbsBKj5wNCPOPuT.0u LzAVmR2T.S4_yVUIO0O0AgHBe63cYaeV7ffwKKhaVCocR9FgQeYIY0M_PqpdUyxb7AAOAkp4Nejs YRPqKzEbjGQS9JB7Hhmkoc8IK9.ci2tWtARDQk4fTS X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Sun, 18 Dec 2022 09:52:54 +0000 Original-Received: by hermes--production-sg3-b666c6484-bdtvh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6d612d45437ae2b1c159801a7c890e5a; Sun, 18 Dec 2022 09:52:48 +0000 (UTC) In-Reply-To: <83y1r5f6lh.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Dec 2022 10:39:54 +0200") X-Mailer: WebService/1.1.20982 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251346 Archived-At: Eli Zaretskii writes: >> > 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. > > Why this fragile architecture of reading input events? Calling > functions of our Lisp machine from context where those functions > cannot signal an error is very dangerous, and cannot work well in > Emacs. Why cannot we have the reads through GTK only deliver events > to us, which we enqueue to our own event queue, and then we could > process that queue in the safe context of the Lisp machine, as (AFAIK) > we do on other platforms? No, signalling there is equally unsafe on the other platforms, where note_mouse_highlight is called from the same place(s): read_socket_hook, event_handler_gdk, et cetera. Just look at the callers of x_note_mouse_movement in xterm.c, or [EmacsView mouseMoved:] in nsterm.m. But I see you already fixed the bug. Thanks.