Subject: bug#32992: closed (Re: bug#32992: 27.0.50; Malfunctioning Cursor display)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 09 Oct 2018 16:52:02 +0000

Your bug report

#32992: 27.0.50; Malfunctioning Cursor display

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
32992: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32992
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#32992: 27.0.50; Malfunctioning Cursor display
From: Paul Eggert <[email-masked]>
To: Eli Zaretskii <[email-masked]>, Mauro Aranda <[email-masked]>
Cc: [email-masked]
Date: Tue, 9 Oct 2018 09:51:29 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii wrote:

> Paul, could you please take a look?  Thanks.

I took a look, reproduced the problem on 32-bit Ubuntu 18.04, and installed the 
attached patch. Thanks, Mauro, for reporting it.
From 6111d2b972db9df8251a5649b162f8404c632ee4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Tue, 9 Oct 2018 09:47:28 -0700
Subject: [PATCH] Fix malfunctioning cursor display on 32-bit Gtk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This bug on 32-bit platforms was caused by the timespec_hz
definition going haywire because the C expression
FIXNUM_OVERFLOW_P (MOST_POSITIVE_FIXNUM) did not work in #if.
Eventually the numeric problem showed up as a malfunctioning
cursor (Bug#32992).  Fix the problem with MOST_POSITIVE_FIXNUM.
By the way, make_fixnum should check for integer overflow when
debugging; this would have made it easier to track this bug down.
But one fix at a time.
* src/lisp.h (INTTYPEBITS): Now a macro, so usable in #if.
(MOST_POSITIVE_FIXNUM): Mention it’s used in #if.
---
 src/lisp.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/lisp.h b/src/lisp.h
index ae329268dc..2c20b483ca 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -236,13 +236,15 @@ enum Lisp_Bits
     /* Number of bits in a Lisp_Object value, not counting the tag.  */
     VALBITS = EMACS_INT_WIDTH - GCTYPEBITS,
 
-    /* Number of bits in a Lisp fixnum tag.  */
-    INTTYPEBITS = GCTYPEBITS - 1,
-
     /* Number of bits in a Lisp fixnum value, not counting the tag.  */
     FIXNUM_BITS = VALBITS + 1
   };
 
+/* Number of bits in a Lisp fixnum tag; can be used in #if.  */
+DEFINE_GDB_SYMBOL_BEGIN (int, INTTYPEBITS)
+#define INTTYPEBITS (GCTYPEBITS - 1)
+DEFINE_GDB_SYMBOL_END (INTTYPEBITS)
+
 /* The maximum value that can be stored in a EMACS_INT, assuming all
    bits other than the type bits contribute to a nonnegative signed value.
    This can be used in #if, e.g., '#if USE_LSB_TAG' below expands to an
@@ -1034,7 +1036,7 @@ enum More_Lisp_Bits
    that cons.  */
 
 /* Largest and smallest representable fixnum values.  These are the C
-   values.  They are macros for use in static initializers.  */
+   values.  They are macros for use in #if and static initializers.  */
 #define MOST_POSITIVE_FIXNUM (EMACS_INT_MAX >> INTTYPEBITS)
 #define MOST_NEGATIVE_FIXNUM (-1 - MOST_POSITIVE_FIXNUM)
 
-- 
2.17.1

Subject: 27.0.50; Malfunctioning Cursor display
From: Mauro Aranda <[email-masked]>
To: bug-gnu-emacs <[email-masked]>
Date: Mon, 8 Oct 2018 15:45:59 -0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello.

This happens to me with the latest master :

Start emacs: emacs -Q
Since start I cannot see the cursor blinking.
If I type something: a or C-b, for example, then the cursor stops
being displayed
immediately and I can't see where point is anymore.
If I type: C-x b I can see the cursor as a hollow box, like expected,
but when I select the window (typing C-g, for example), cursor
disappears again.

There is no problem when running `emacs -nw'.

In GNU Emacs 27.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2018-10-08 built on the-blackbeard
Repository revision: a0605d96187bc4103a982cededcd12e2628aba66
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 16.04.5 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2 GMP

Important settings:
  value of $LANG: es_AR.UTF-8
  value of $XMODIFIERS:
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair 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 replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch 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 composite charscript charprop
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 threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 8 94463 8670)
 (symbols 24 20134 1)
 (strings 16 28346 2587)
 (string-bytes 1 750579)
 (vectors 8 14254)
 (vector-slots 4 510532 11266)
 (floats 8 47 70)
 (intervals 28 202 4)
 (buffers 528 11)
 (heap 1024 17240 873))