From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Several problems Date: Fri, 01 Aug 2014 15:06:51 +0200 Message-ID: <53DB90EB.9030808@gmx.at> References: <87d2cpbua7.fsf@fencepost.gnu.org> <53D642D8.4050502@gmx.at> <87fvhg1pxi.fsf@gateway.local.navru.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080800080602020108000607" X-Trace: ger.gmane.org 1406898524 32185 80.91.229.3 (1 Aug 2014 13:08:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Aug 2014 13:08:44 +0000 (UTC) Cc: David Kastrup , Faried Nawaz , emacs-devel@gnu.org To: Nicolas Avrutin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 01 15:08:40 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XDCZb-00085x-Gn for ged-emacs-devel@m.gmane.org; Fri, 01 Aug 2014 15:08:39 +0200 Original-Received: from localhost ([::1]:39053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDCZa-0004hw-FM for ged-emacs-devel@m.gmane.org; Fri, 01 Aug 2014 09:08:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDCZT-0004hA-53 for emacs-devel@gnu.org; Fri, 01 Aug 2014 09:08:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDCZO-0004ey-D4 for emacs-devel@gnu.org; Fri, 01 Aug 2014 09:08:31 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:56767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDCZO-0004eO-3q; Fri, 01 Aug 2014 09:08:26 -0400 Original-Received: from [178.191.137.113] ([178.191.137.113]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MFi1J-1XIRmH3fyX-00Ebjb; Fri, 01 Aug 2014 15:08:25 +0200 In-Reply-To: <87fvhg1pxi.fsf@gateway.local.navru.net> X-Provags-ID: V03:K0:xc7Ly3sGxwE3ucaxZtEhiS1Yui2PkcK10THRD/HkaP4XUw1l6va 9lqyAmuaXIfC98hXR2ZAM04sh3gtkkXaPXmxeR57Fd/f/QVqPxZ5Hx37S4z1VDJz3WF5TMw jRiiKI9nulzH1Jrvjarju2zaQ2oSuKOSEIzDguP4791VVwnaS75t3+pi8j5vLDvZbMRJ9RD ncV/3pyffMcYvKGWKuPew== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173352 Archived-At: This is a multi-part message in MIME format. --------------080800080602020108000607 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit David Kastrup wrote: > the horizontal scroll bar code crashing on me > whenever I restore the desktop (which involves restoring the window > configuration). > > _That_ crash would have been > > (gdb) bt > #0 0xb7fdd424 in __kernel_vsyscall () > #1 0xb69460c6 in raise (sig=sig@entry=6) > at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37 > #2 0x08124299 in terminate_due_to_signal (sig=sig@entry=6, > backtrace_limit=backtrace_limit@entry=40) at ../../emacs/src/emacs.c:387 > #3 0x0813cef7 in emacs_abort () at ../../emacs/src/sysdep.c:2198 > #4 0x080f3e38 in XTredeem_scroll_bar (w=0x8752f30) > at ../../emacs/src/xterm.c:5948 Nicolas Avrutin wrote: > I'm also experiencing this issue and would be happy to help you with > testing. I'm also using gtk3 and --without-toolkit-scroll-bars. I can > trigger the crash by running (sauron-start)[1] or > (jabber-connect-all)[2], in xmonad sending any emacs frame to a > different workspace, and then going to the workspace to which I sent the > frame. > > I have applied your patch and the crash still occurs. Here is my > backtrace after running it through addr2line[3]: > > emacs_backtrace at emacs-git/src/sysdep.c:2182 > terminate_due_to_signal at emacs-git/src/emacs.c:381 > emacs_open at emacs-git/src/sysdep.c:2211 > XTredeem_scroll_bar at emacs-git/src/xterm.c:5971 Faried Nawaz wrote: > I'm not on the mailing list, and I'm not sure where to report bugs, but I > ran into the same crash as David Kastrup today, after I pulled and built > from trunk. Your patch in > http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00373.html doesn't > fix the problem for me. > > I'm not sure how to reliably trigger the problem, but this usually works > for me. I start Emacs under gdb, with -Q, and then evaluate these lines: > > (require 'package) > (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") > ("marmalade" . "http://marmalade-repo.org/packages/ > ") > ("melpa" . "http://melpa.milkbox.net/packages/"))) > (package-initialize) > > I run M-x list-packages RET and switch away to another virtual desktop. > Some combination of switching away/switching back, or partially covering > the frame with an xterm before switching causes the crash for me. It might > be timer related, too -- it doesn't happen immediately, but after a while. > It takes a while to fetch the packages list. > > The backtrace is at https://gist.github.com/faried/f1a01fac78a790f32ebe > > I use Ubuntu 12.04 (fully updated, 32-bit) and I compile Emacs with > > ./configure --without-pop --with-x-toolkit=lucid \ > --prefix=/usr/local/src --without-toolkit-scroll-bars \ > --enable-link-time-optimization --without-compress-install \ > --with-file-notification=yes > > I hope this helps locate the cause of the problem. Please try the attached patch and tell me whether the problem persists. Thank you, martin --------------080800080602020108000607 Content-Type: text/plain; charset=windows-1252; name="gtk-non-toolkit-scroll-bars.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gtk-non-toolkit-scroll-bars.diff" === modified file 'src/frame.c' --- src/frame.c 2014-08-01 00:04:52 +0000 +++ src/frame.c 2014-08-01 12:25:36 +0000 @@ -3793,7 +3793,9 @@ void x_set_horizontal_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if defined (USE_X_TOOLKIT) \ + || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)) \ + || defined (HAVE_NTGUI) if ((NILP (arg) && FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)) || (!NILP (arg) && !FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))) { @@ -3844,7 +3846,9 @@ void x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if defined (USE_X_TOOLKIT) \ + || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)) \ + || defined (HAVE_NTGUI) int unit = FRAME_LINE_HEIGHT (f); if (NILP (arg)) === modified file 'src/frame.h' --- src/frame.h 2014-07-28 08:07:55 +0000 +++ src/frame.h 2014-08-01 12:56:37 +0000 @@ -852,11 +852,17 @@ #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ ((f)->vertical_scroll_bar_type != vertical_scroll_bar_none) -#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ +#if defined (USE_X_TOOLKIT) \ + || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)) \ + || defined (HAVE_NTGUI) +#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ ((f)->horizontal_scroll_bars) -#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) \ +#else +#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) false +#endif +#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) \ ((f)->vertical_scroll_bar_type == vertical_scroll_bar_left) -#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \ +#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \ ((f)->vertical_scroll_bar_type == vertical_scroll_bar_right) #else /* not HAVE_WINDOW_SYSTEM */ === modified file 'src/window.h' --- src/window.h 2014-07-27 13:21:30 +0000 +++ src/window.h 2014-08-01 12:26:58 +0000 @@ -787,7 +787,9 @@ /* Say whether horizontal scroll bars are currently enabled for window W. Horizontal scrollbars exist for toolkit versions only. */ -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if defined (USE_X_TOOLKIT) \ + || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)) \ + || defined (HAVE_NTGUI) #define WINDOW_HAS_HORIZONTAL_SCROLL_BAR(W) \ ((WINDOW_PSEUDO_P (W) || MINI_NON_ONLY_WINDOW_P (W)) \ ? false \ --------------080800080602020108000607--