From unknown Wed Jun 18 23:12:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24041 <24041@debbugs.gnu.org> To: bug#24041 <24041@debbugs.gnu.org> Subject: Status: 25.1.50; xwidget + -nw mode gives segfault Reply-To: bug#24041 <24041@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:12:55 +0000 retitle 24041 25.1.50; xwidget + -nw mode gives segfault reassign 24041 emacs submitter 24041 Shane Hansen severity 24041 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 20 12:07:44 2016 Received: (at submit) by debbugs.gnu.org; 20 Jul 2016 16:07:44 +0000 Received: from localhost ([127.0.0.1]:58838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPu2C-0003eY-0y for submit@debbugs.gnu.org; Wed, 20 Jul 2016 12:07:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPtzI-0003Zv-9u for submit@debbugs.gnu.org; Wed, 20 Jul 2016 12:04:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPtz8-000096-41 for submit@debbugs.gnu.org; Wed, 20 Jul 2016 12:04:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPtz8-000092-0X for submit@debbugs.gnu.org; Wed, 20 Jul 2016 12:04:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPtz4-0004uZ-Ob for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 12:04:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPtz2-00007v-Og for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 12:04:30 -0400 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:36207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPtz2-00007h-HZ for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 12:04:28 -0400 Received: by mail-oi0-x235.google.com with SMTP id w18so77921030oiw.3 for ; Wed, 20 Jul 2016 09:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=ioMp4qa1QDNFdG9VNyqO8dzfxny8IVrUoN6vomZZyDQ=; b=wl92jisiLOSANkwi0X/weC3cPzTkDmahZ796zcJmMXWsqN73vuptfuVAVRtmXFlmPq OwknIuX2L4cK83mDA62MziOJdRaQglJplbDwlx9gTLXXltEoM/2EQGAFXFCBQOwTJh2e KDVoQVcxmnd6sVhZipztxCMnnLIgFuk9e57NwoCmKdnivwwlpWz9n30Lvejf0G+sjcht GtY2qOfndh1atanzFNPs+nWEMEzzLw3Lm9/LvNVwM9rRsPR0K5mpsGoVYB5rrnExbRzj Q6tWshTCNmJb9L9iINRHWV91VrC8vPqzm3DnwQfRLspTuz5y5Agdt+tV29flqKU9uxon mQCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ioMp4qa1QDNFdG9VNyqO8dzfxny8IVrUoN6vomZZyDQ=; b=JSS6xx/bioV1Vmo/qU29CKSSSzYpJDX6YBDFpXLrXRNOTC9ny7OdGRPySkfnKtnpmV vGof/JuOa0Ahj+Sq98BrgnmKQIAhHgtSks5OIw8HRm89Mhtfn0fp/nHzNsGea9xaMJqc xvJahe0t4ITD9EVGg4vLqYaJZ7lqD2+YJUIRgP8gGlRW8pHFmT1wBrDsI4EdYiFkqCgy 5XL1OX82baomNUn6H6EGkPgHwLzBzrEzpwLNgI+ggWnsJn4aX5ofumc5vZTX3uIchdX1 FgZHsIOssv3Na0qSx7G2EHuT0E/LZbhEd1TwfU8jt0pyo6t7GbZ+NNwdi/S4Z5k/s4pG KuJQ== X-Gm-Message-State: ALyK8tIkyeAp+CP6ku9I+dH8FyR+dWxWBsY62KPjHzxkTCH5ZZjuFzzIB8SZjtk8STRAx7dcUdH3kHR2nEstXQ== X-Received: by 10.202.88.9 with SMTP id m9mr23881916oib.66.1469030667416; Wed, 20 Jul 2016 09:04:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.80.18 with HTTP; Wed, 20 Jul 2016 09:04:27 -0700 (PDT) From: Shane Hansen Date: Wed, 20 Jul 2016 10:04:27 -0600 Message-ID: Subject: 25.1.50; xwidget + -nw mode gives segfault To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 20 Jul 2016 12:07:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Segfault when attempting to open xwidget from terminal emacs (-nw). I expect this not to work, but I also don't expect a segfault. Steps to reproduce: 1. Build emacs 2. run emacs via emacs -nw 3. Type M-x xwidget-webkit-browse-url 4. http://www.google.com Expected behaviour: error message due to lack of x windowing system Actual behaviour: segfault begin bt: #0 0x00007ffff6df3349 in gtk_style_context_get_background_color () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #1 0x00007ffff6e27746 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #2 0x00007ffff6e2bc00 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #3 0x00007ffff6e2bdc8 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #4 0x00007ffff6e352f3 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #5 0x00007ffff5bf2789 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #6 0x00007ffff5bf410d in g_object_newv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #7 0x00007ffff5bf48bc in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #8 0x00007ffff22a3aa1 in ?? () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-3.0.so.0 #9 0x00007ffff218e272 in ?? () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-3.0.so.0 #10 0x00007ffff21bb073 in ?? () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-3.0.so.0 #11 0x00007ffff5c0de3b in g_type_create_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #12 0x00007ffff5bf2355 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #13 0x00007ffff5bf410d in g_object_newv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #14 0x00007ffff5bf48bc in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #15 0x00007ffff21b72c2 in webkit_web_view_new () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-3.0.so.0 #16 0x0000000000678951 in Fmake_xwidget (type=50400, title=34209780, width=4002, height=4002, arguments=0, buffer=0) at xwidget.c:139 #17 0x00000000005ffe63 in Ffuncall (nargs=6, args=0x7fffffffacc8) at eval.c:2722 #18 0x000000000064542e in exec_byte_code (bytestr=37473540, vector=38110277, maxdepth=58, args_template=6166, nargs=5, args=0x7fffffffb280) at bytecode.c:802 #19 0x00000000006005af in funcall_lambda (fun=38110325, nargs=5, arg_vector=0x7fffffffb258) at eval.c:2863 #20 0x00000000005fff9f in Ffuncall (nargs=6, args=0x7fffffffb250) at eval.c:2750 #21 0x000000000064542e in exec_byte_code (bytestr=34209940, vector=38102717, maxdepth=38, args_template=1030, nargs=1, args=0x7fffffffb7c0) at bytecode.c:802 #22 0x00000000006005af in funcall_lambda (fun=38102861, nargs=1, arg_vector=0x7fffffffb7b8) at eval.c:2863 #23 0x00000000005fff9f in Ffuncall (nargs=2, args=0x7fffffffb7b0) at eval.c:2750 #24 0x000000000064542e in exec_byte_code (bytestr=34195700, vector=38102909, maxdepth=18, args_template=1030, nargs=1, args=0x7fffffffbd18) at bytecode.c:802 #25 0x00000000006005af in funcall_lambda (fun=38102941, nargs=1, arg_vector=0x7fffffffbd10) at eval.c:2863 #26 0x00000000005fff9f in Ffuncall (nargs=2, args=0x7fffffffbd08) at eval.c:2750 #27 0x000000000064542e in exec_byte_code (bytestr=35946404, vector=38099989, maxdepth=18, args_template=2054, nargs=2, args=0x7fffffffc350) at bytecode.c:802 #28 0x00000000006005af in funcall_lambda (fun=38100085, nargs=2, arg_vector=0x7fffffffc340) at eval.c:2863 #29 0x00000000005fff9f in Ffuncall (nargs=3, args=0x7fffffffc338) at eval.c:2750 #30 0x00000000005f7c58 in Ffuncall_interactively (nargs=3, args=0x7fffffffc338) at callint.c:252 #31 0x00000000005ffbdc in Ffuncall (nargs=4, args=0x7fffffffc330) at eval.c:2681 #32 0x00000000005ff142 in Fapply (nargs=3, args=0x7fffffffc560) at eval.c:2329 #33 0x00000000005f80d3 in Fcall_interactively (function=4303704, record_flag=4857400, keys=13531957) at callint.c:389 #34 0x00000000005ffd67 in Ffuncall (nargs=4, args=0x7fffffffc6b8) at eval.c:2708 #35 0x000000000064542e in exec_byte_code (bytestr=10581756, vector=10581789, maxdepth=54, args_template=4102, nargs=2, args=0x7fffffffcc58) at bytecode.c:802 #36 0x00000000006005af in funcall_lambda (fun=10581709, nargs=2, arg_vector=0x7fffffffcc48) at eval.c:2863 #37 0x00000000005fff9f in Ffuncall (nargs=3, args=0x7fffffffcc40) at eval.c:2750 #38 0x000000000064542e in exec_byte_code (bytestr=10580948, vector=10580981, maxdepth=62, args_template=3078, nargs=3, args=0x7fffffffd2c8) at bytecode.c:802 #39 0x00000000006005af in funcall_lambda (fun=10580893, nargs=3, arg_vector=0x7fffffffd2b0) at eval.c:2863 #40 0x00000000005fff9f in Ffuncall (nargs=4, args=0x7fffffffd2a8) at eval.c:2750 #41 0x00000000005f7c58 in Ffuncall_interactively (nargs=4, args=0x7fffffffd2a8) at callint.c:252 #42 0x00000000005ffbdc in Ffuncall (nargs=5, args=0x7fffffffd2a0) at eval.c:2681 #43 0x00000000005ff142 in Fapply (nargs=3, args=0x7fffffffd4e0) at eval.c:2329 #44 0x00000000005f80d3 in Fcall_interactively (function=590280, record_flag=0, keys=13531957) at callint.c:389 #45 0x00000000005ffd67 in Ffuncall (nargs=4, args=0x7fffffffd638) at eval.c:2708 #46 0x000000000064542e in exec_byte_code (bytestr=10581756, vector=10581789, maxdepth=54, args_template=4102, nargs=1, args=0x7fffffffdbb0) at bytecode.c:802 #47 0x00000000006005af in funcall_lambda (fun=10581709, nargs=1, arg_vector=0x7fffffffdba8) at eval.c:2863 #48 0x00000000005fff9f in Ffuncall (nargs=2, args=0x7fffffffdba0) at eval.c:2750 #49 0x00000000005ff6e0 in call1 (fn=15168, arg1=590280) at eval.c:2560 #50 0x000000000055f10c in command_loop_1 () at keyboard.c:1484 #51 0x00000000005fc874 in internal_condition_case (bfun=0x55e91d , handlers=19488, hfun=0x55e0e1 ) at eval.c:1310 #52 0x000000000055e625 in command_loop_2 (ignore=0) at keyboard.c:1112 #53 0x00000000005fc1bb in internal_catch (tag=46368, func=0x55e5fc , arg=0) at eval.c:1075 #54 0x000000000055e5c5 in command_loop () at keyboard.c:1091 #55 0x000000000055dcb6 in recursive_edit_1 () at keyboard.c:697 #56 0x000000000055de43 in Frecursive_edit () at keyboard.c:768 #57 0x000000000055bba7 in main (argc=2, argv=0x7fffffffe058) at emacs.c:1658 end bt In GNU Emacs 25.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2016-07-20 built on saidin Repository revision: 30b3a842ec87d27cfe003b6d4323689d48b3fcd2 Windowing system distributor 'The X.Org Foundation', version 11.0.11501000 System Description: Linux Mint 17.2 Rafaela Configured using: 'configure --with-xwidgets --with-x-toolkit=gtk3 'CFLAGS= -g'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: shell-dirtrack-mode: t global-auto-complete-mode: t show-paren-mode: t save-place-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow sort mail-extr emacsbug message puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils warnings ox-md ox-confluence ox-latex ox-icalendar ox-html ox-ascii ox-publish ox org-element avl-tree org-clock windmove ob-dot ob-sh shell ob-go ob-python org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs format-spec cal-menu calendar cal-loaddefs go-oracle go-autocomplete s ucs-normalize flycheck find-func rx subr-x dash auto-complete-config auto-complete popup flymake-cursor flymake compile comint ansi-color go-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap find-file ffap thingatpt etags xref project ring cl async finder-inf async-autoloads better-defaults-autoloads paren edmacro kmacro saveplace ido cider-autoloads clojure-mode-autoloads docker-tramp-autoloads dockerfile-mode-autoloads flycheck-autoloads flymake-cursor-autoloads advice gh-md-autoloads gntp-autoloads go-autocomplete-autoloads auto-complete-autoloads go-mode-autoloads graphviz-dot-mode-autoloads htmlize-autoloads log4e-autoloads lua-mode-autoloads markdown-mode-autoloads ob-go-autoloads ob-lua-autoloads org-jira-autoloads org-plus-contrib-autoloads ox-reveal-autoloads org-autoloads popup-autoloads projectile-autoloads pkg-info-autoloads epl-autoloads dash-autoloads queue-autoloads s-autoloads salt-mode-autoloads mmm-jinja2-autoloads info mmm-mode-autoloads seq-autoloads speck-autoloads spinner-autoloads yaml-mode-autoloads package epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 403830 9738) (symbols 48 38346 0) (miscs 40 140 158) (strings 32 85566 14409) (string-bytes 1 2582019) (vectors 16 56565) (vector-slots 8 927530 4481) (floats 8 362 30) (intervals 56 339 0) (buffers 976 14) (heap 1024 44445 4484)) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 14:36:36 2016 Received: (at 24041) by debbugs.gnu.org; 19 Aug 2016 18:36:36 +0000 Received: from localhost ([127.0.0.1]:34464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baoei-0000az-6Q for submit@debbugs.gnu.org; Fri, 19 Aug 2016 14:36:36 -0400 Received: from mail.workgrouplinux.net ([207.195.177.82]:54262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baoeg-0000ap-Pw for 24041@debbugs.gnu.org; Fri, 19 Aug 2016 14:36:35 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to :cc:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=dkim1; bh=ai9QHTjLE72duiSyC34KIZn/904=; b=1KWN1 DXcL7brxoVz1AqTOIY0A4QdPjQo5tax0qwbjkyhgJylZQqd1Wjkmcv6PmmtChazB trHXq90haflGZpdcVpMTtqVJRVxTFfMZFdMu2TC2/uB8Pa6pXdVDyisbr+HoCOSy J18mAZteLgS8eH65jck4as3+DS7F4AmOAeACYL6mn7Y3LQyxtBWNRoALv/eKugAL mEWUtjGpoIKiDB/28pep+uPNJ+lAniB1szjWn/8lW9r1rF49n4Zi7CEcBnp4v9Gd J7Q0L/XNmdLiYOtGkw+OM2flK1wl/ei05sf43SyUnc+ZqXFhaLXWomcO/sCzI65I 96Nhojma4IvIo8qzA== Received: (qmail 8367 invoked by uid 0); 19 Aug 2016 18:36:31 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com; b=djusX83EOXqhULx/lq0KyH/xyF2ZDkzlS142wSi8/93T6BC9rQI7G1kjwRX0lqPBZml8KEkiY+1xoypTGmXpCQ==; Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop) (robert@cochranmail.com@131.191.86.130) by mail.cochrantribe.org with ESMTPA; 19 Aug 2016 18:36:31 -0000 From: Robert Cochran To: Shane Hansen Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: Date: Fri, 19 Aug 2016 11:36:30 -0700 In-Reply-To: (Shane Hansen's message of "Wed, 20 Jul 2016 10:04:27 -0600") Message-ID: <8760qwtxld.fsf@cochranmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) First, apologies for having left this alone this long. I meant to get to it earlier. Anyways, so the fix here is conceptually pretty simple: have a check in place to ensure (display-graphic-p) returns non-nil before doing any xwidgets stuff. Easy enough. What I want to solicit feedback on before I write a patch is this: who should be responsible for this check? Should the function provider (the xwidget C 'library') check for the proper support? Or should that be left to the user (the Lisp that calls the xwidget functions, in this case `xwidget-webkit-browse-url`)? Personal opinion is that xwidget should check: that way a Lisp caller can't forget to do so. But I'm largely unaware of the conventions on how to handle this, so I want to make sure I'm doing the correct thing before I make a style mistake. Thanks, -- ~Robert Cochran GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26 AD2D E5C3 EB36 4886 8871 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 03:32:06 2016 Received: (at 24041) by debbugs.gnu.org; 20 Aug 2016 07:32:06 +0000 Received: from localhost ([127.0.0.1]:34656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bb0lC-000293-Lx for submit@debbugs.gnu.org; Sat, 20 Aug 2016 03:32:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bb0lC-00028b-2j for 24041@debbugs.gnu.org; Sat, 20 Aug 2016 03:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bb0l2-0003Ak-3P for 24041@debbugs.gnu.org; Sat, 20 Aug 2016 03:32:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb0l2-0003Ag-0n; Sat, 20 Aug 2016 03:31:56 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bb0l0-0005Cq-6i; Sat, 20 Aug 2016 03:31:54 -0400 Date: Sat, 20 Aug 2016 10:32:03 +0300 Message-Id: <83oa4ndhfw.fsf@gnu.org> From: Eli Zaretskii To: Robert Cochran In-reply-to: <8760qwtxld.fsf@cochranmail.com> (message from Robert Cochran on Fri, 19 Aug 2016 11:36:30 -0700) Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: <8760qwtxld.fsf@cochranmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 24041 Cc: shanemhansen@gmail.com, 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) > From: Robert Cochran > Date: Fri, 19 Aug 2016 11:36:30 -0700 > Cc: 24041@debbugs.gnu.org > > Anyways, so the fix here is conceptually pretty simple: have a check in > place to ensure (display-graphic-p) returns non-nil before doing any > xwidgets stuff. Easy enough. display-graphic-p accepts argument, so if a function displays on another frame or display, it should be passed that frame or display. > What I want to solicit feedback on before I write a patch is this: who > should be responsible for this check? Should the function provider (the > xwidget C 'library') check for the proper support? Or should that be > left to the user (the Lisp that calls the xwidget functions, in this > case `xwidget-webkit-browse-url`)? IMO, the check should be on the C level where the xwidget primitives are implemented. One such place is make-xwidget; maybe there are more. (The proper way of testing this on the C level is not by calling display-graphic-p, but rather with check_x_display_info.) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 17:34:12 2016 Received: (at 24041) by debbugs.gnu.org; 20 Aug 2016 21:34:12 +0000 Received: from localhost ([127.0.0.1]:35386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbDu8-0000qy-HN for submit@debbugs.gnu.org; Sat, 20 Aug 2016 17:34:12 -0400 Received: from mail.workgrouplinux.net ([207.195.177.82]:58173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbDu7-0000qp-59 for 24041@debbugs.gnu.org; Sat, 20 Aug 2016 17:34:11 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to :cc:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=dkim1; bh=EbtXYhClyfOVg+USSGuLmPaIKqo=; b=pziSO 32ahfzsq2XeGbWneEPYNM6hKisrqE3PJSVeKREYvI6zN5VjE1eflUaCHox8sEYRo ufnWUYHx/R0rKqgA20IOKaXlKlJGd8I+9KyVxLafk3acXA+GxWlQpIK29l5EzIje kKwv+H91xqpw96dMrKcsGEArxlCY0PFbWc/xxPoP2ccXtkgWMr4UHcddx5hyPOoa n0/Bkn8HUixvjixLoXkO5tdX1dtJZryMvS9H1USGNI6FM95ndXEVnImJ/oazjGXn /AXQ4gGLco1d4iwNaywi6FMwl9uIDL1biru0u8gsYT3v6o+zNvdUG+n/+uNMiIuW h78vBGpsJKPr8LnNQ== Received: (qmail 20929 invoked by uid 0); 20 Aug 2016 21:34:07 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com; b=XYhoeTQDMr1EXmVFkC8cYXAhnDFVcmGp5KIKv8DM4IwF1bHgpG18MQH/gsLEtXpKjXpEg3iu8skK8MIng5ckug==; Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop) (robert@cochranmail.com@131.191.86.130) by mail.cochrantribe.org with ESMTPA; 20 Aug 2016 21:34:07 -0000 From: Robert Cochran To: Eli Zaretskii Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: <8760qwtxld.fsf@cochranmail.com> <83oa4ndhfw.fsf@gnu.org> Date: Sat, 20 Aug 2016 14:33:58 -0700 In-Reply-To: <83oa4ndhfw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 20 Aug 2016 10:32:03 +0300") Message-ID: <87lgzrm8ft.fsf@cochranmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org, shanemhansen@gmail.com, Robert Cochran X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> From: Robert Cochran >> Date: Fri, 19 Aug 2016 11:36:30 -0700 >> Cc: 24041@debbugs.gnu.org >> >> Anyways, so the fix here is conceptually pretty simple: have a check in >> place to ensure (display-graphic-p) returns non-nil before doing any >> xwidgets stuff. Easy enough. > > display-graphic-p accepts argument, so if a function displays on > another frame or display, it should be passed that frame or display. I guess I don't quite understand what you're trying to say here. In the particular case of `xwidget-webkit-browse-url`, the current frame is reused. I don't think it would be a particularly good idea to automatically redirect widget requests to a graphical frame. (Is that even possible? Start a graphical frame from a tty Emacs?) Again, I'm having trouble understanding what you mean. Apologies about my confusion. >> What I want to solicit feedback on before I write a patch is this: who >> should be responsible for this check? Should the function provider (the >> xwidget C 'library') check for the proper support? Or should that be >> left to the user (the Lisp that calls the xwidget functions, in this >> case `xwidget-webkit-browse-url`)? > > IMO, the check should be on the C level where the xwidget primitives > are implemented. One such place is make-xwidget; maybe there are > more. (The proper way of testing this on the C level is not by > calling display-graphic-p, but rather with check_x_display_info.) That's what my feeling was too. I'll go ahead and do it on the C level then. > Thanks. No problem. -- ~Robert Cochran GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26 AD2D E5C3 EB36 4886 8871 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 22:40:23 2016 Received: (at 24041) by debbugs.gnu.org; 21 Aug 2016 02:40:23 +0000 Received: from localhost ([127.0.0.1]:35454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbIgR-0001Co-GM for submit@debbugs.gnu.org; Sat, 20 Aug 2016 22:40:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbIgP-0001Cc-Pz for 24041@debbugs.gnu.org; Sat, 20 Aug 2016 22:40:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbIgF-0003p4-O6 for 24041@debbugs.gnu.org; Sat, 20 Aug 2016 22:40:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbIgF-0003oi-Ky; Sat, 20 Aug 2016 22:40:11 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2645 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bbIgD-0000BT-PC; Sat, 20 Aug 2016 22:40:10 -0400 Date: Sun, 21 Aug 2016 05:40:20 +0300 Message-Id: <8360qudeuj.fsf@gnu.org> From: Eli Zaretskii To: Robert Cochran In-reply-to: <87lgzrm8ft.fsf@cochranmail.com> (message from Robert Cochran on Sat, 20 Aug 2016 14:33:58 -0700) Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: <8760qwtxld.fsf@cochranmail.com> <83oa4ndhfw.fsf@gnu.org> <87lgzrm8ft.fsf@cochranmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 24041 Cc: shanemhansen@gmail.com, 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) > From: Robert Cochran > Cc: Robert Cochran , shanemhansen@gmail.com, 24041@debbugs.gnu.org > Date: Sat, 20 Aug 2016 14:33:58 -0700 > > Eli Zaretskii writes: > > >> From: Robert Cochran > >> Date: Fri, 19 Aug 2016 11:36:30 -0700 > >> Cc: 24041@debbugs.gnu.org > >> > >> Anyways, so the fix here is conceptually pretty simple: have a check in > >> place to ensure (display-graphic-p) returns non-nil before doing any > >> xwidgets stuff. Easy enough. > > > > display-graphic-p accepts argument, so if a function displays on > > another frame or display, it should be passed that frame or display. > > I guess I don't quite understand what you're trying to say here. I'm saying that display-graphic-p should be told the frame for which you are asking the question. > (Is that even possible? Start a graphical frame from a tty Emacs?) Of course, it is. emacsclient can do that. Assuming Emacs was built with GUI support, of course. We have this feature for several years now. > > IMO, the check should be on the C level where the xwidget primitives > > are implemented. One such place is make-xwidget; maybe there are > > more. (The proper way of testing this on the C level is not by > > calling display-graphic-p, but rather with check_x_display_info.) > > That's what my feeling was too. I'll go ahead and do it on the C level > then. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 22:12:54 2016 Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 02:12:54 +0000 Received: from localhost ([127.0.0.1]:36323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbejO-0007lr-5F for submit@debbugs.gnu.org; Sun, 21 Aug 2016 22:12:54 -0400 Received: from mail.workgrouplinux.net ([207.195.177.82]:33393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbejM-0007li-Bq for 24041@debbugs.gnu.org; Sun, 21 Aug 2016 22:12:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to :cc:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=dkim1; bh=/QsekyMleTpPgsPRfeq++zrV9WM=; b=K9vtJ +2CF3+a+nqCDrGNU9d9R/JGeaz50PMi1+dchG34dXn9IEytkhly17DE142Hgn7f+ WJ8M9tvlrBogEqaBipvE1AF47jXBbYxnzS6SI2ZkykYWNl9EZct09Y2HcHV0KC7W e12Cx2X7lAMODG8CLg+16KFtTJ1Wh4eYH+UCMIIJTBDmwOAswjekhhF8oGlVG+eC ieK42ce2dZCCicoGjhZ9r6TPfwggaYFutuRhZyV24LyUhOV3AEZyGMBsF/OqJQqG ToYdAnqN5ubu+03CYBqJf6QzcpW84otw3ygb8oLqZJ68oAakqel5Q61WT5YPXSgE 4Wk72Uakka1uxEhRg== Received: (qmail 9402 invoked by uid 0); 22 Aug 2016 02:12:50 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com; b=EKpAm2plOxKh1tG1BjtI0W82d9N3e4h2AcXwI8uzRuJ5ASrNabrxKZbEcUhgX5uh8Epb1r24Si/FzXj2WbNP4w==; Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop) (robert@cochranmail.com@131.191.86.130) by mail.cochrantribe.org with ESMTPA; 22 Aug 2016 02:12:50 -0000 From: Robert Cochran To: Eli Zaretskii Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: <8760qwtxld.fsf@cochranmail.com> <83oa4ndhfw.fsf@gnu.org> <87lgzrm8ft.fsf@cochranmail.com> <8360qudeuj.fsf@gnu.org> Date: Sun, 21 Aug 2016 19:12:41 -0700 In-Reply-To: <8360qudeuj.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 Aug 2016 05:40:20 +0300") Message-ID: <878tvpa6w6.fsf@cochranmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org, shanemhansen@gmail.com, Robert Cochran X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> (Is that even possible? Start a graphical frame from a tty Emacs?) > > Of course, it is. emacsclient can do that. Assuming Emacs was built > with GUI support, of course. We have this feature for several years > now. > Indeed it can. Never tried it before, and kinda assumed it wouldn't work. Silly me. Anyways, I have a patch, below, that's my first stab at solving the problem. All it does is call `check_x_display_info` with the current frame and allows any resulting error signals to propagate back up. Probably not the most elegant solution, but I'm not entirely clear what can and can't be done from within the Emacs C core. Suggestions are very welcome. ----- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Signal-an-error-when-a-TTY-frame-tries-to-create-an-.patch Content-Description: Patch to see if the frame is an X frame before creating xwidget >From 82532f657f7acc824745406e8917a1a4f49723d9 Mon Sep 17 00:00:00 2001 From: Robert Cochran Date: Sun, 21 Aug 2016 19:01:14 -0700 Subject: [PATCH] Signal an error when a TTY frame tries to create an xwidget * src/xwidget.c (make-xwidget): signal an error if current frame is a TTY frame. Trying to use a TTY frame to create an xwidget can cause a segfault. Check before hand that the frame is an X frame via check_x_display_info, which will signal an error if it is not. This fixes Bug#24041. --- src/xwidget.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xwidget.c b/src/xwidget.c index f5f4da0..0edfacc 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -99,8 +99,15 @@ Returns the newly constructed xwidget, or nil if construction fails. */) CHECK_NATNUM (width); CHECK_NATNUM (height); - struct xwidget *xw = allocate_xwidget (); + struct xwidget *xw; Lisp_Object val; + + /* Ensure that the current frame is an X frame before we try + creating any xwidgets. If it isn't, check_x_display_info will + signal an error. */ + check_x_display_info (Fselected_frame ()); + + xw = allocate_xwidget (); xw->type = type; xw->title = title; xw->buffer = NILP (buffer) ? Fcurrent_buffer () : Fget_buffer_create (buffer); -- 2.7.4 --=-=-= Content-Type: text/plain ----- HTH, -- ~Robert Cochran GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26 AD2D E5C3 EB36 4886 8871 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 10:41:55 2016 Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 14:41:55 +0000 Received: from localhost ([127.0.0.1]:37008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbqQF-0001wl-7D for submit@debbugs.gnu.org; Mon, 22 Aug 2016 10:41:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbqQC-0001wY-U8 for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 10:41:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbqQ2-0006W2-RZ for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 10:41:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbqQ2-0006Vv-P1; Mon, 22 Aug 2016 10:41:42 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1615 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bbqQ1-0000me-3k; Mon, 22 Aug 2016 10:41:41 -0400 Date: Mon, 22 Aug 2016 17:41:54 +0300 Message-Id: <83k2f8c1cd.fsf@gnu.org> From: Eli Zaretskii To: Robert Cochran In-reply-to: <878tvpa6w6.fsf@cochranmail.com> (message from Robert Cochran on Sun, 21 Aug 2016 19:12:41 -0700) Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: <8760qwtxld.fsf@cochranmail.com> <83oa4ndhfw.fsf@gnu.org> <87lgzrm8ft.fsf@cochranmail.com> <8360qudeuj.fsf@gnu.org> <878tvpa6w6.fsf@cochranmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24041 Cc: shanemhansen@gmail.com, 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Robert Cochran > Cc: Robert Cochran , shanemhansen@gmail.com, 24041@debbugs.gnu.org > Date: Sun, 21 Aug 2016 19:12:41 -0700 > > Anyways, I have a patch, below, that's my first stab at solving the > problem. All it does is call `check_x_display_info` with the current > frame and allows any resulting error signals to propagate back up. > > Probably not the most elegant solution, but I'm not entirely clear what > can and can't be done from within the Emacs C core. Suggestions are very > welcome. My only comment is that you could call check_x_display_info with Qnil as its argument. Otherwise, LGTM, thanks. And I see nothing inelegant in this patch. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 14:30:37 2016 Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 18:30:37 +0000 Received: from localhost ([127.0.0.1]:37160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbtzY-0007PQ-C7 for submit@debbugs.gnu.org; Mon, 22 Aug 2016 14:30:36 -0400 Received: from mail.workgrouplinux.net ([207.195.177.82]:35610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbtzS-0007PD-LX for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 14:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to :cc:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=dkim1; bh=xkRszA0SyOAsNIUunEPh/V4KW4A=; b=2TuKt OKhBSMQcamxQKq6svNssFJTanNPcpO9MoFFC0gl16EFoHm3dCBy4RR+e2jgr7wVg x1tJDDiKBZaTtvvLwj59GI0e71KgbN/Y8AM0zHZ1k1B3PCYj+i75Xe0A4nazx3pk clk0E+5h6w+WzghOPji9le/qM6MjuBdy0XxH/DNTNOeCFOlwv1tB473wWG9VBAUl CPOKCE44FkxlU+bYrJKvfI7RUWBsuUloXYbj5CF7aH7SW4BxqEuYqmQO8AQUpbsK 3byvXpNXx4C1ZVqHmVkbcbeHEwELNcMSqJy7lHMEdzqzdj0d0CXWHfPfjxZBBlZc eP+VunnOeJh8A3hCA== Received: (qmail 1076 invoked by uid 0); 22 Aug 2016 18:30:28 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com; b=eJ1Z7VlvBRQsmgcHCwPUmMN7pejnzv9hBS/SOv/4fPY7p09XwvnLlFD5pGeBF0Socgm5wZw3cMiGduWmepHAeg==; Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop) (robert@cochranmail.com@131.191.86.130) by mail.cochrantribe.org with ESMTPA; 22 Aug 2016 18:30:28 -0000 From: Robert Cochran To: Eli Zaretskii Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault 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> Date: Mon, 22 Aug 2016 11:30:15 -0700 In-Reply-To: <83k2f8c1cd.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 Aug 2016 17:41:54 +0300") Message-ID: <87k2f87j2g.fsf@cochranmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org, shanemhansen@gmail.com, Robert Cochran X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Robert Cochran >> Cc: Robert Cochran , shanemhansen@gmail.com, 24041@debbugs.gnu.org >> Date: Sun, 21 Aug 2016 19:12:41 -0700 >> >> Anyways, I have a patch, below, that's my first stab at solving the >> problem. All it does is call `check_x_display_info` with the current >> frame and allows any resulting error signals to propagate back up. >> >> Probably not the most elegant solution, but I'm not entirely clear what >> can and can't be done from within the Emacs C core. Suggestions are very >> welcome. > > 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. That, of course, is just my opinion. > Otherwise, LGTM, thanks. And I see nothing inelegant in this patch. 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? ----- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Kill-the-webkit-browser-buffer-if-an-error-occurs.patch Content-Description: Kill webkit browser window if error occurs >From e58ed09121969febde5bfc2206c14f4a7806c323 Mon Sep 17 00:00:00 2001 From: Robert Cochran Date: Mon, 22 Aug 2016 11:21:01 -0700 Subject: [PATCH] Kill the webkit browser buffer if an error occurs * lisp/xwidget.el (xwidget-webkit-new-session): kill webkit buffer on error --- lisp/xwidget.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 7a0ca8b..e925c9a 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -427,11 +427,16 @@ xwidget-webkit-new-session xw) (setq xwidget-webkit-last-session-buffer (switch-to-buffer (get-buffer-create bufname))) - (insert " 'a' adjusts the xwidget size.") - (setq xw (xwidget-insert 1 'webkit bufname 1000 1000)) - (xwidget-put xw 'callback 'xwidget-webkit-callback) - (xwidget-webkit-mode) - (xwidget-webkit-goto-uri (xwidget-webkit-last-session) url))) + (condition-case err + (progn + (insert " 'a' adjusts the xwidget size.") + (setq xw (xwidget-insert 1 'webkit bufname 1000 1000)) + (xwidget-put xw 'callback 'xwidget-webkit-callback) + (xwidget-webkit-mode) + (xwidget-webkit-goto-uri (xwidget-webkit-last-session) url)) + ;; On error, remove webkit buffer and resignal + (error (kill-buffer bufname) + (signal (car err) (cdr err)))))) (defun xwidget-webkit-goto-url (url) -- 2.7.4 --=-=-= Content-Type: text/plain ----- Otherwise, with or without the new patch, I have no issues if you have no issues. Thanks, -- ~Robert Cochran GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26 AD2D E5C3 EB36 4886 8871 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 14:50:10 2016 Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 18:50:10 +0000 Received: from localhost ([127.0.0.1]:37172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbuIU-0007ra-B9 for submit@debbugs.gnu.org; Mon, 22 Aug 2016 14:50:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbuIS-0007rO-Qj for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 14:50:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbuII-00059q-Ed for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 14:50:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbuII-00059I-Aw; Mon, 22 Aug 2016 14:49:58 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3331 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bbuIF-0001jP-HU; Mon, 22 Aug 2016 14:49:56 -0400 Date: Mon, 22 Aug 2016 21:49:59 +0300 Message-Id: <83vaysfxk8.fsf@gnu.org> From: Eli Zaretskii To: Robert Cochran , joakim@verona.se In-reply-to: <87k2f87j2g.fsf@cochranmail.com> (message from Robert Cochran on Mon, 22 Aug 2016 11:30:15 -0700) Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24041 Cc: shanemhansen@gmail.com, 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > 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? > 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? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 15:53:30 2016 Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 19:53:30 +0000 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 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 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) X-Spam-Score: 0.681 X-Spam-Level: X-Spam-Status: No, score=0.681 tagged_above=-99 required=5 tests=[AWL=-0.175, DNS_FROM_AHBL_RHSBL=0.306, NO_REAL_NAME=0.55] 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) 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) 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 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) 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) From: joakim@verona.se To: Eli Zaretskii Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault 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> Date: Mon, 22 Aug 2016 21:52:58 +0200 In-Reply-To: <83vaysfxk8.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 Aug 2016 21:49:59 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org, shanemhansen@gmail.com, Robert Cochran X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 16:29:04 2016 Received: (at 24041) by debbugs.gnu.org; 22 Aug 2016 20:29:04 +0000 Received: from localhost ([127.0.0.1]:37207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbvqC-0001ok-2r for submit@debbugs.gnu.org; Mon, 22 Aug 2016 16:29:04 -0400 Received: from mail.workgrouplinux.net ([207.195.177.82]:35956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bbvq9-0001oJ-TO for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 16:29:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to :cc:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=dkim1; bh=oV07uP5Bcgv1zNA03yJOZFb9k64=; b=eO21P qGGleoWtQiELUYXVy+mUF9AHZRRlK1MVxqCYGE9z1vr0/c3bakmTJOxY+tEP1IlT 25loLyt26BxIkn/FVpJHI6+WqZvyHlVmymRp+fnSARiIQAhX6yQ1zgViF3AwdmJ3 Uuv3LyXbcJp6QQxfGjaoI9eby17JMaWE1H8X0rmRg+8R/bSEh+kmZnJC+UEOzcWL upTVOvR+2fHcmC4ov6pjJBN9VTRphfj7lswxqpUpqMYBEOGrMldmaony8y5NteY7 uHQ7Fv905Zy/PSk/VxWA/SJJDVRUx85QW29EnlzTOEraQsesfZhyDm79oLtTrf6l 37SxGYGaU4Rb8L+hg== Received: (qmail 6761 invoked by uid 0); 22 Aug 2016 20:28:57 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com; b=eJUwfa3ZBBUsVrTmRwoWsDvBH2bkGy0I9E7nLx/g6XQUHDjJwOSp9hqMpQH1DWtkkuWKVIa8deVVMhJH5HkdJw==; Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop) (robert@cochranmail.com@131.191.86.130) by mail.cochrantribe.org with ESMTPA; 22 Aug 2016 20:28:57 -0000 From: Robert Cochran To: joakim@verona.se Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault 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> Date: Mon, 22 Aug 2016 13:28:51 -0700 In-Reply-To: (joakim's message of "Mon, 22 Aug 2016 21:52:58 +0200") Message-ID: <87lgzoeef0.fsf@cochranmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org, Eli Zaretskii , Robert Cochran , shanemhansen@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) joakim@verona.se writes: > 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)) I'm having trouble figuring out a workable compromise on this. While calling code can just be aware that the frame must be graphical, it probably isn't the optimal solution. I suppose I'm at a loss for a situation where you are using a tty and yet want a mode with xwidgets, although I have things set up in such a way that I never open a tty emacsclient unless I've logged in remotely or have chosen to forgo an X session (neither of which happen often in practice); I have fairly convenient ways across DE/WMs to open a graphical emacsclient. >>> 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. Fair enough. Again, merely my opinion that leaving dead buffers is ugly. If I'm deviating from Emacs standard practice in killing the buffer, then we're done here. Patch doesn't go in, life continues on. -- ~Robert Cochran GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26 AD2D E5C3 EB36 4886 8871 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 22:40:00 2016 Received: (at 24041) by debbugs.gnu.org; 23 Aug 2016 02:40:00 +0000 Received: from localhost ([127.0.0.1]:37366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bc1d9-0005M0-UD for submit@debbugs.gnu.org; Mon, 22 Aug 2016 22:40:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bc1d8-0005Ln-RF for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 22:39:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bc1cz-0008EG-3w for 24041@debbugs.gnu.org; Mon, 22 Aug 2016 22:39:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bc1cz-0008E2-0i; Mon, 22 Aug 2016 22:39:49 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3785 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bc1cx-0003JR-PA; Mon, 22 Aug 2016 22:39:48 -0400 Date: Tue, 23 Aug 2016 05:40:02 +0300 Message-Id: <83pop0fbst.fsf@gnu.org> From: Eli Zaretskii To: Robert Cochran In-reply-to: <87lgzoeef0.fsf@cochranmail.com> (message from Robert Cochran on Mon, 22 Aug 2016 13:28:51 -0700) Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault 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> <87lgzoeef0.fsf@cochranmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org, shanemhansen@gmail.com, robert-emacs@cochranmail.com, joakim@verona.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Robert Cochran > Cc: Eli Zaretskii , Robert Cochran , shanemhansen@gmail.com, 24041@debbugs.gnu.org > Date: Mon, 22 Aug 2016 13:28:51 -0700 > > I suppose I'm at a loss for a situation where you are using a tty and > yet want a mode with xwidgets, although I have things set up in such a > way that I never open a tty emacsclient unless I've logged in remotely > or have chosen to forgo an X session (neither of which happen often in > practice); I have fairly convenient ways across DE/WMs to open a > graphical emacsclient. Some code might prepare the xwidget first, and only later show it in a frame it creates for that. It's a valid use case, so I don't think we should preclude it if not necessary. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 16:04:31 2019 Received: (at 24041) by debbugs.gnu.org; 28 Aug 2019 20:04:31 +0000 Received: from localhost ([127.0.0.1]:51255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i34BC-00072s-Ou for submit@debbugs.gnu.org; Wed, 28 Aug 2019 16:04:30 -0400 Received: from quimby.gnus.org ([80.91.231.51]:38214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i34BA-00072h-T5 for 24041@debbugs.gnu.org; Wed, 28 Aug 2019 16:04:29 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i34B6-0002xt-ON; Wed, 28 Aug 2019 22:04:27 +0200 From: Lars Ingebrigtsen To: Shane Hansen Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: Date: Wed, 28 Aug 2019 22:04:24 +0200 In-Reply-To: (Shane Hansen's message of "Wed, 20 Jul 2016 10:04:27 -0600") Message-ID: <87d0gpkqev.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Shane Hansen writes: > Segfault when attempting to open xwidget from terminal emacs (-nw). I > expect this not to work, but I also don't expect a segfault. > > Steps to reproduce: > > 1. Build emacs > 2. run emacs via ema [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Shane Hansen writes: > Segfault when attempting to open xwidget from terminal emacs (-nw). I > expect this not to work, but I also don't expect a segfault. > > Steps to reproduce: > > 1. Build emacs > 2. run emacs via emacs -nw > 3. Type M-x xwidget-webkit-browse-url > 4. http://www.google.com > > Expected behaviour: > error message due to lack of x windowing system > > Actual behaviour: > segfault > > begin bt: > #0 0x00007ffff6df3349 in gtk_style_context_get_background_color () > from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 > #1 0x00007ffff6e27746 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 If I try this in Emacs 27, I just get the following error message: xwidget-insert: make-xwidget: GTK has not been initialized So I assume that this has been fixed in the years since this was reported, and am closing this bug report. If this problem is still present, please reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 16:04:39 2019 Received: (at control) by debbugs.gnu.org; 28 Aug 2019 20:04:39 +0000 Received: from localhost ([127.0.0.1]:51258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i34BL-00073K-1H for submit@debbugs.gnu.org; Wed, 28 Aug 2019 16:04:39 -0400 Received: from quimby.gnus.org ([80.91.231.51]:38228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i34BJ-00073C-Bf for control@debbugs.gnu.org; Wed, 28 Aug 2019 16:04:37 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i34BG-0002y0-Po for control@debbugs.gnu.org; Wed, 28 Aug 2019 22:04:36 +0200 Date: Wed, 28 Aug 2019 22:04:34 +0200 Message-Id: <87blw9kqel.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24041 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 24041 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 24041 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 07:01:02 2019 Received: (at 24041) by debbugs.gnu.org; 29 Aug 2019 11:01:02 +0000 Received: from localhost ([127.0.0.1]:51661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3IAo-00062D-IA for submit@debbugs.gnu.org; Thu, 29 Aug 2019 07:01:02 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:56105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3IAj-00061D-R8; Thu, 29 Aug 2019 07:00:58 -0400 Received: by mail-wm1-f51.google.com with SMTP id f72so3217971wmf.5; Thu, 29 Aug 2019 04:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version; bh=ooR3n9f2HB02UFrB2GFhJGDDv17+Q5hVXWaYoV6at7M=; b=NZE/6tTGGMsUcmdg6FIuKlnYv8DdIqVSS267rtuo58VYXPqNaZhNWq5SIddliPkR7a aJkYhy1FrczQjhwPhz5WNYJNyApeLk1ePMz0eywE0DdQA92SLhiGcqDJPYv1VHEUqqX2 A3dpA4ZgTMc4o6kiY94rHFDL6bN3LO7AvP76hq+gPJbkAR5Pl9imLnJL1W7sE1pr+ROU iNPOg/GL5MkvL+AN+PQXnrBN6zNAWCe7zaCm4rrBjyBrDLxiRcDeRpqUSZzjdfl+DVWD 1eq2yo8SQWAFQz6mMyHs4ibpuNiIGsYATDtZjl4FgKgHMPBZ/6IBH33dwp576bk65xNr +TGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=ooR3n9f2HB02UFrB2GFhJGDDv17+Q5hVXWaYoV6at7M=; b=teTU0JeT3Y9zjcysfRzSuM+fKt3rwk2b1oa7xkhwW73K4TdxS0t8NARzUPlVbMOSP9 7oJ1jfHlkurFs6oSS2Nyvnnnq4gWE/n5Jgz1aUY+SqNDOcGhb/OyFYsh/lfYVNbmwZH/ ptr0kg4kQ2rdpyXcjSAKYm5WVFRUqSFBRBN2C5NikY/z0+kFc34lGQmtt09exEnfleki YrtzRbUtd/xJRfwibCvz5QNzOKbOuHmO+A+zsOmaMldzPZll+BblOX8vyFZ49S2sw9xW 0p9aXT09UTRYpD/cFNcTlAZtoIxBDP+zVkeGn0DWYf2186MfHY3XK8cOYstrzHjb0z2r /eAA== X-Gm-Message-State: APjAAAWTgFn5JCx31oH2/fRQQ5ULsdnZhMWFenN/bGpTkyLhzhR8f8Uh SZHPGoPf2X1pEAXPL4d3Hz7mb9Am X-Google-Smtp-Source: APXvYqyzgCFkKO2VJRdFRkH6cg5Q86RTPnwY6LggP7Z3ez+1PV1muenbQHItUzjeLi1n3E+145iExw== X-Received: by 2002:a1c:1f89:: with SMTP id f131mr9180222wmf.140.1567076450721; Thu, 29 Aug 2019 04:00:50 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:9577:be17:24fb:1c46]) by smtp.gmail.com with ESMTPSA id b4sm3528157wma.5.2019.08.29.04.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 04:00:50 -0700 (PDT) From: Robert Pluim To: Lars Ingebrigtsen Subject: Re: bug#24041: 25.1.50; xwidget + -nw mode gives segfault References: <87d0gpkqev.fsf@gnus.org> X-Debbugs-No-Ack: yes Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Thu, 29 Aug 2019 13:00:46 +0200 In-Reply-To: <87d0gpkqev.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 28 Aug 2019 22:04:24 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24041 Cc: Shane Hansen , 24041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 33294 24041 quit >>>>> On Wed, 28 Aug 2019 22:04:24 +0200, Lars Ingebrigtsen said: >> begin bt: >> #0 0x00007ffff6df3349 in gtk_style_context_get_background_color () >> from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 >> #1 0x00007ffff6e27746 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 Lars> If I try this in Emacs 27, I just get the following error message: Lars> xwidget-insert: make-xwidget: GTK has not been initialized Lars> So I assume that this has been fixed in the years since this was Lars> reported, and am closing this bug report. If this problem is still Lars> present, please reopen. Yep, by a291f62428, which is in 26.2 Robert From unknown Wed Jun 18 23:12:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 Sep 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator