From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#1179: Emacs on Windows hangs displaying unibyte strings Date: Fri, 17 Oct 2008 15:01:14 +0200 Message-ID: References: Reply-To: Eli Zaretskii , 1179@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1224250306 23615 80.91.229.12 (17 Oct 2008 13:31:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Oct 2008 13:31:46 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Juanma Barranquero , 1179@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 17 15:32:46 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KqpRc-00076A-MZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Oct 2008 15:32:45 +0200 Original-Received: from localhost ([127.0.0.1]:58848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqpQX-0006fz-Ly for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Oct 2008 09:31:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqpPY-0005y6-5Z for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:30:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqpPX-0005xh-Hk for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:30:35 -0400 Original-Received: from [199.232.76.173] (port=52811 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqpPX-0005xV-An for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:30:35 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58658) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KqpPW-0002yE-Qi for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:30:35 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9HDU0qT009086; Fri, 17 Oct 2008 06:30:01 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9HDA315004263; Fri, 17 Oct 2008 06:10:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Fri, 17 Oct 2008 13:10:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1179 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12242484852179 (code B ref -1); Fri, 17 Oct 2008 13:10:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 17 Oct 2008 13:01:25 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9HD1K8W002171 for ; Fri, 17 Oct 2008 06:01:21 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqoxE-0000S0-6E for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:01:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqoxC-0000QL-Em for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:01:19 -0400 Original-Received: from [199.232.76.173] (port=40795 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqoxB-0000Pw-EZ for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:01:18 -0400 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:60838) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KqoxA-0003k8-R4 for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 09:01:17 -0400 Original-Received: from HOME-C4E4A596F7 ([77.127.24.3]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K8V003EZW8FWO13@i_mtaout2.012.net.il> for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2008 15:02:39 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 17 Oct 2008 09:30:35 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21600 Archived-At: > Date: Fri, 17 Oct 2008 13:48:06 +0200 > From: "Juanma Barranquero" > Cc:=20 >=20 > emacs -q >=20 > and then, on *scratch*, evaluate the following: >=20 > (progn > (set-buffer-multibyte nil) > (setq unibyte-display-via-language-environment t) > (insert (encode-coding-string "=C3=A1" 'cp1252))) >=20 > When running under gdb, the result is: >=20 > - On non-optimized builds, it hangs. > - On optimized builds, it crashes with the attached backtrace. >=20 > Is anyone able to reproduce it, or am I the only one seeing it? It doesn't crash for me, with today's CVS. But the result is strange nonetheless, I think: the single =C3=A1 character in the last line ab= ove are replaced with _two_ empty boxes about which "C-u C-x =3D" says: =09 character: (195, #o303, #xc3) preferred charset: unicode (Unicode (ISO10646)) =09 code point: 0xC3 =09 syntax: w =09which means: word =09 category: j:Japanese l:Latin v:Vietnamese =09 buffer code: #xC3 #x83 =09 file code: #xC3 (encoded by coding system iso-latin-1-dos) =09 display: by this font (glyph code) =09uniscribe:-outline-Courier New-normal-normal-normal-mono-13-*-*-*-= c-*-iso10646-1 (#xAD) =09 character: (161, #o241, #xa1) preferred charset: unicode (Unicode (ISO10646)) =09 code point: 0xA1 =09 syntax: . =09which means: punctuation =09 category: h:Korean j:Japanese l:Latin =09 buffer code: #xC2 #xA1 =09 file code: #xA1 (encoded by coding system iso-latin-1-dos) =09 display: by this font (glyph code) =09uniscribe:-outline-Courier New-normal-normal-normal-mono-13-*-*-*-= c-*-iso10646-1 (#xA3) And the character that gets inserted (also displayed as an empty box) is reported as =09 character: (225, #o341, #xe1) preferred charset: unicode (Unicode (ISO10646)) =09 code point: 0xE1 =09 syntax: w =09which means: word =09 category: c:Chinese j:Japanese l:Latin v:Vietnamese =09 buffer code: #xC3 #xA1 =09 file code: #xE1 (encoded by coding system iso-latin-1-dos) =09 display: by this font (glyph code) =09uniscribe:-outline-Courier New-normal-normal-normal-mono-13-*-*-*-= c-*-iso10646-1 (#x69) > Program received signal SIGSEGV, Segmentation fault. > 0x011f804c in x_draw_glyph_string_background (s=3D0x82eae0, force_p= =3D1) > at w32term.c:1279 > 1279 if (FONT_HEIGHT (s->font) < s->height - 2 * box_lin= e_width So what's the reason of the crash? Is `s' an invalid pointer? Or maybe GDB is confused by optimizations, and shows in correct source line? In the latter case, perhaps disassemblying around the address of the crash (0x011f804c according to the above) would give an idea o= f what went wrong.