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#63589: [PATCH] 29.0.91; crash after creating graphical frames via emacsclient when compiled with cairo-xcb Date: Sun, 21 May 2023 21:40:45 +0800 Message-ID: <871qj9246a.fsf@yahoo.com> References: 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="8555"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63589@debbugs.gnu.org To: Thiago Melo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 21 15:42:16 2023 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 1q0jKC-00023B-4C for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 May 2023 15:42:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0jK2-0006si-Cw; Sun, 21 May 2023 09:42:06 -0400 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 1q0jJz-0006sY-DW for bug-gnu-emacs@gnu.org; Sun, 21 May 2023 09:42:03 -0400 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 1q0jJy-0000N4-6P for bug-gnu-emacs@gnu.org; Sun, 21 May 2023 09:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q0jJx-0005Up-NK for bug-gnu-emacs@gnu.org; Sun, 21 May 2023 09:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 May 2023 13:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63589 X-GNU-PR-Package: emacs Original-Received: via spool by 63589-submit@debbugs.gnu.org id=B63589.168467646221061 (code B ref 63589); Sun, 21 May 2023 13:42:01 +0000 Original-Received: (at 63589) by debbugs.gnu.org; 21 May 2023 13:41:02 +0000 Original-Received: from localhost ([127.0.0.1]:60197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0jIz-0005TR-Fv for submit@debbugs.gnu.org; Sun, 21 May 2023 09:41:01 -0400 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]:39407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0jIw-0005Sz-B0 for 63589@debbugs.gnu.org; Sun, 21 May 2023 09:40:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684676452; bh=iJS3bdb43PF4qBqIquxGp8Nwu19w84CV7immIrnw6Oo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ZGyqHpYRz7X8LbFlcJVvTW/HXTjsU+MPPnAbYIkYvlWaH0i4IkDJFnfl+o490iz9apwV5PBQd3Q7EhNxJ2NM6+Gnt411qXOIvwbsjgXiwy8udn1uP39ZisAoBGs9tQCv9RuDK/KBq9m8eQUrAgNIiRysL19ug9PmpMDsZMmJtLplNASyITVysS5H0HT2yfRWpF0ixBm8t8vtMh29ymjHbWyfcZvltGQZnlRhMybMT9xrAyp4rGFUsmVvJTpW94fu7Kcv+7cuvXSpLkkHQ2yezZ/Lk2V1Nk7AyXrEp82VWu+QvisWm0nOs7K8gC/VcMtyGc3X2EfEr6T6C4LeYaNzeg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684676452; bh=PSz/p/2tlPDpz9426oe79whqGBRg6F8OuHWlDzxkpxj=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=nMPApN77csr8toG9VQur9uJRAjzm3ug2s3QT1QT/aOSaSqaGZiAbhcyj0fUl6XHjBAk3tZnADLCXVSAJh0xS2AtkZF+PV3rqFGdoz2L5xZtNOnoaTE0KqB79oaaXnyyRKzaKFE4dyZqGyuej/qYwDss3mxqvz56OlgPFddOzUKK6bw78ltu+IflR4LC2t/aZhb3ESEvHV9zbiFOGhb7RtrFmYjEoahDTbK8d0YSI1EFf+NPn1QnanZMjy3f3yzkYzbvk/nbjCPVK0MQTNccOENgBK5VrlnRMFeoMn0zc+PZZhIT6/KYagatgDBo2BpTiE0cnA0YW9HUH3G9wvYnwVw== X-YMail-OSG: eXdjeZwVM1namv3jpbpAS0a4dDt4raUub0CMACsSDRHR1OjgkRxK.I1uUa.lb0b WJkWPmLAXrtEsRvYOH8ASIj7cuuZ7xxD06TRO584ddN1QEg.wCKca.rmY18wXeDiPxKUNvPBmt0W PD3E_Il55TKOJOaefoI2YFIhueHoGZ.d63f1TuD4poGt3tf6T5SuqLx1.R4zHU0EULB101Yj8Y43 1AwRthZo7055jHN0wjHLj_DtUlnV6EqbaS1kEmqUo9igjf4WOJdQGMX98Zkz9ACx629GCs4Zu2ul Qot36ui9fNHzG6MwJLcgdaUEN2kX_QPTWbGTZiB2WXawB1H0IHOa3sr5gLZ.IPvg3oehkYRhyabd vghU2yC2grXeKotJjZhv0Pk5YVa8MlbvyvJ2O3x66BJfkURUWe8f9xIPld.xM6iBv6HDe_AuEp8Z b3ADRhBSs1ZTJVRUrShsxZKre2_Sb0aqhHYwJ_gZHxsjXunLjiNXIhLOF1MmHDz97hkFmoXhM1yI t8WT7rtprbuS41czE2vemSpeDg5S.n.Kq8jSUlL3sc0c_BbHGgXN.b1aXLBMGbKZGYWWaGHmem.2 NU8VO7fu1Hp4_XQ7YisNSwoqknVXKebyvOr2zOV9efQg5BomzAWxzYI1wykbovWtliAuYvICcvzi 6Bsc16CWB056jzOmS17YZ_9Fm3HyWqQnoQ2pUYvCe5nlljGOdPjsOIaHXuseMNrDRN1HQxTBDWCf HYJG14Idle0cFCjE2ZhlVM9YWv.I54SvZTaSHkuWsx46z.4d6qH7Qb0ksQqRyPfeH5uzFgKMN3ZI EgA8Cur2KIxTR31B_D5q2zoSYIQ_pCGrCumunQmpxt X-Sonic-MF: X-Sonic-ID: 40114ec4-9d27-4c4a-93b4-004c5f440baf Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Sun, 21 May 2023 13:40:52 +0000 Original-Received: by hermes--production-sg3-748897c457-h6mnq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e852cf5880ab1b58cfddc29c6d13656d; Sun, 21 May 2023 13:40:49 +0000 (UTC) In-Reply-To: (Thiago Melo's message of "Sat, 20 May 2023 22:47:17 +0000") X-Mailer: WebService/1.1.21495 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:262102 Archived-At: Thiago Melo writes: > Here's a patch to fix this issue. It was created on top of the > emacs-29 branch, commit 6b60c81. > > It's based on the suggestion from the cairo mailing list (see the link > I sent in my original message here). It ensures that the cairo device > associated with the cairo-xcb surfaces in the display is destroyed > before closing the display. > > It can probably be improved. It could even be extended to handle > cairo-xlib. In the cairo mailing list, they mentioned one corner case > where the xlib device is not properly destroyed: when cairo is > unloaded before the X11 connection is closed. I would like to know the details of the X error that caused the display connection to be closed in the first place: this change is too large for the release branch, but we may be able to fix the X error. Also, please keep in mind that our policy is to place a space between the function identifier and the opening paren of its parameter list in function calls, and that the device should probably be destroyed even if the display no longer exists, which usually happens when x_delete_terminal is called in response to an IO error.