From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.bugs Subject: bug#24041: 25.1.50; xwidget + -nw mode gives segfault Date: Mon, 22 Aug 2016 21:52:58 +0200 Message-ID: References: <8760qwtxld.fsf@cochranmail.com> <83oa4ndhfw.fsf@gnu.org> <87lgzrm8ft.fsf@cochranmail.com> <8360qudeuj.fsf@gnu.org> <878tvpa6w6.fsf@cochranmail.com> <83k2f8c1cd.fsf@gnu.org> <87k2f87j2g.fsf@cochranmail.com> <83vaysfxk8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1471895666 30574 195.159.176.226 (22 Aug 2016 19:54:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Aug 2016 19:54:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: shanemhansen@gmail.com, 24041@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 22 21:54:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbvIV-0007Py-Id for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Aug 2016 21:54:15 +0200 Original-Received: from localhost ([::1]:42905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbvIS-0004Q8-WF for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Aug 2016 15:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbvIN-0004PA-3P for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2016 15:54:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbvII-00030W-S5 for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2016 15:54:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbvII-00030R-OK for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2016 15:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bbvII-00011J-Gs for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2016 15:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: joakim@verona.se Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Aug 2016 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24041 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24041-submit@debbugs.gnu.org id=B24041.14718956103878 (code B ref 24041); Mon, 22 Aug 2016 19:54:02 +0000 Original-Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 19:53:30 +0000 Original-Received: from localhost ([127.0.0.1]:37194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbvHm-00010T-2C for submit@debbugs.gnu.org; Mon, 22 Aug 2016 15:53:30 -0400 Original-Received: from mx1.bahnhof.se ([213.80.101.11]:22885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbvHk-00010L-Ru for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 15:53:29 -0400 Original-Received: from localhost (mf.bahnhof.se [213.80.101.20]) by mx1-reinject (Postfix) with ESMTP id 3FA9B40A70; Mon, 22 Aug 2016 21:53:27 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MF4) Original-Received: from mf4.bahnhof.se ([127.0.0.1]) by localhost (mf4.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OK9HNHNlmkia; Mon, 22 Aug 2016 21:53:25 +0200 (CEST) Original-Received: from mta.verona.se (h-235-62.a149.priv.bahnhof.se [85.24.235.62]) by mf4.bahnhof.se (Postfix) with ESMTP id 37A673D790E; Mon, 22 Aug 2016 21:53:16 +0200 (CEST) Original-Received: from localhost (unknown [127.0.0.1]) by mta.verona.se (Postfix) with ESMTP id C77414F8D5A; Mon, 22 Aug 2016 19:53:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at verona.se Original-Received: from mta.verona.se ([127.0.0.1]) by localhost (exodia.verona.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SmLUGFtf8wf0; Mon, 22 Aug 2016 21:52:58 +0200 (CEST) Original-Received: from exodia.verona.se (www.verona.se [192.168.200.15]) by mta.verona.se (Postfix) with ESMTP id 28BB24F8D56; Mon, 22 Aug 2016 21:52:58 +0200 (CEST) In-Reply-To: <83vaysfxk8.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 Aug 2016 21:49:59 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122523 Archived-At: Eli Zaretskii writes: >> From: Robert Cochran >> Cc: Robert Cochran , shanemhansen@gmail.com, 24041@debbugs.gnu.org >> Date: Mon, 22 Aug 2016 11:30:15 -0700 >> >> > My only comment is that you could call check_x_display_info with Qnil >> > as its argument. >> >> I did think about that. But then it arguably does the wrong thing: >> `check_x_display_info` with `Qnil` only signals an error when there have >> never been X windows, eg, opening and closing an X window satisfies the >> check from then on. It no longer crashes in that instance, but I >> personally don't think that's the right behavior; if my starting frame >> isn't capable of displaying an xwidget, say so! Hence checking with the >> current frame. > > Joakim, is it certain that the xwidget will always be shown in the > frame that is the selected one at the time make-xwidget is called? make-xwidget doesnt actualy show the widget. There is code like this in xwidget-insert: (put-text-property (point) (+ 1 (point)) 'display (list 'xwidget ':xwidget id)) > >> Thanks for your reassurance! My one gripe about this patch is that I >> didn't figure out how to kill the buffer after xwidget creation failure >> (leaving it seems rather ugly IMO), but I just now realized what I can >> do. As long as it's not considered wrong to kill a mode's buffer on >> error, would you also consider this patch to go along with it? > > I'm not sure if this is TRT. I'd rather erase-buffer at the beginning > of xwidget-webkit-new-session, and leave the buffer alone if we signal > an error. The buffer might have contents that the user will hate > losing, for diagnostic purposes if nothing else. > > Joakim, WDYT? I tried to model the code originaly after what the various emacs image modes did, mostly along the principle of least surprise. I think emacs normally works like Eli describes above, so I'd go with that yes. -- Joakim Verona