From: martin rudalics <rudalics@gmx.at>
To: Nicolas Avrutin <nicolasavru@gmail.com>
Cc: David Kastrup <dak@gnu.org>, Faried Nawaz <faried@gmail.com>,
emacs-devel@gnu.org
Subject: Re: Several problems
Date: Fri, 01 Aug 2014 15:06:51 +0200 [thread overview]
Message-ID: <53DB90EB.9030808@gmx.at> (raw)
In-Reply-To: <87fvhg1pxi.fsf@gateway.local.navru.net>
[-- Attachment #1: Type: text/plain, Size: 3006 bytes --]
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
[-- Attachment #2: gtk-non-toolkit-scroll-bars.diff --]
[-- Type: text/plain, Size: 2575 bytes --]
=== 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 \
next prev parent reply other threads:[~2014-08-01 13:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 11:24 Several problems David Kastrup
2014-07-28 12:09 ` Dmitry Antipov
2014-07-28 12:32 ` martin rudalics
2014-08-01 9:43 ` Nicolas Avrutin
2014-08-01 10:30 ` martin rudalics
2014-08-01 13:06 ` martin rudalics [this message]
2014-08-02 4:10 ` Nicolas Avrutin
2014-08-02 6:57 ` Eli Zaretskii
2014-08-02 7:28 ` Nicolas Avrutin
2014-08-02 7:39 ` Eli Zaretskii
2014-08-02 8:06 ` martin rudalics
2014-08-04 17:22 ` martin rudalics
2014-08-04 21:54 ` Nicolas Avrutin
2014-08-05 8:36 ` martin rudalics
2014-08-05 19:08 ` Faried Nawaz
2014-08-06 9:41 ` martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2014-07-30 20:02 Ted Zlatanov
2014-07-30 20:10 ` Ted Zlatanov
2014-07-31 4:22 ` Dmitry Antipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DB90EB.9030808@gmx.at \
--to=rudalics@gmx.at \
--cc=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=faried@gmail.com \
--cc=nicolasavru@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).