From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#1179: marked as done (Emacs on Windows hangs displaying unibyte strings) Date: Thu, 11 Dec 2008 07:45:03 -0800 Message-ID: References: <494134D7.9000502@f2s.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1229010303-4296-2" X-Trace: ger.gmane.org 1229011588 27258 80.91.229.12 (11 Dec 2008 16:06:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 16:06:28 +0000 (UTC) To: Jason Rumney Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 11 17:07:31 2008 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 1LAo3b-0000XC-BW for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 17:06:45 +0100 Original-Received: from localhost ([127.0.0.1]:36726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAo2P-0004TM-Nd for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 11:05:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAo1i-0004B1-UQ for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:04:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAo1i-0004Af-Cp for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:04:34 -0500 Original-Received: from [199.232.76.173] (port=35112 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAo1h-0004AU-Gq for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:04:33 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33662) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAo1g-0006y7-6t for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 11:04:32 -0500 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 mBBG4I8O010823; Thu, 11 Dec 2008 08:04:19 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBBFj3RJ004404; Thu, 11 Dec 2008 07:45:03 -0800 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 1179 X-Emacs-PR-Package: emacs,w32 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:23179 Archived-At: This is a multi-part message in MIME format... ------------=_1229010303-4296-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Thu, 11 Dec 2008 23:42:15 +0800 with message-id <494134D7.9000502@f2s.com> and subject line Re: [Emacs-diffs] emacs/src ChangeLog has caused the Emacs bug report #872, regarding Emacs on Windows hangs displaying unibyte strings to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 872: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D872 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1229010303-4296-2 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,FOURLA, FVGT_m_MULTI_ODD,HAS_PACKAGE,IMPRONONCABLE_2,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Oct 2008 14:52:15 +0000 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 m9GEqBJb027739 for ; Thu, 16 Oct 2008 07:52:12 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqUCx-00057W-Bl for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2008 10:52:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqUCv-00057K-Mv for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2008 10:52:10 -0400 Received: from [199.232.76.173] (port=44272 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqUCv-00057H-Gs for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2008 10:52:09 -0400 Received: from mail-gx0-f10.google.com ([209.85.217.10]:56414) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KqUCu-0001fK-V8 for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2008 10:52:09 -0400 Received: by gxk3 with SMTP id 3so8436401gxk.18 for ; Thu, 16 Oct 2008 07:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=eqDIk+FyjTWCOp35ChINPJmEnnhIlGgsSTzu3L8ijAE=; b=IeV6XESsh1QfLH12T0cfDlIkTuMh9iu+KF1MOCLMw/2B/huZyaxWH95OaQR+/io3Ku 76XCyChXq1LLy+WFYmp20I+OpZ6vZNR49AU7Jka5PjW6xn7+sqw/Aoa71fVe7WWvK+JF 4UYlPTQmiJEfOq4y1noo0RgSWZooQABPzarJQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=LoUqOMxAAvFVrU2uv/b4W6Lqc21i2xKZWPBDXsV/rlwOIZ3ikrPq86UEcpdMGxJ7pl mD1FLc/3G3cdQpgLwhbv/4jjpLBxaFyfJ8MpFuOgpDJM1iWlJ0uvlSJxeE65UZ4XjGcA FF/Z+dUxGgtIWrW8rc+AGueUzqt7t8VPgm7ew= Received: by 10.100.142.4 with SMTP id p4mr3632822and.23.1224168727696; Thu, 16 Oct 2008 07:52:07 -0700 (PDT) Received: by 10.100.13.13 with HTTP; Thu, 16 Oct 2008 07:52:07 -0700 (PDT) Message-ID: Date: Thu, 16 Oct 2008 16:52:07 +0200 From: "Juanma Barranquero" To: Bug-Gnu-Emacs Subject: Emacs on Windows hangs displaying unibyte strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Debbugs-No-Ack: yes Package: emacs,w32 Version: 23.0.60 This bug is perhaps a variant of #872, as it involves several common elements: - Seems a Windows-specific thing - (setq unibyte-display-via-language-environment t) - (set-buffer-multibyte nil) - Optimized vs. non-optimized builds do behave diferently though the result is a bit different: Emacs hangs instead of crashing. The initial bug I was looking at is that w32-list-locales, when run on a Spanish edition of Windows XP, produces the following output: 1025 ARA \301rabe (Arabia Saud\355) 1026 BGR B\372lgaro 1027 CAT Catal\341n 1028 CHT Chino (Taiw\341n) 1029 CSY Checo 1030 DAN Dan\351s 1031 DEU Alem\341n (Alemania) etc., so obviously there's some kind of unibyte/multibyte problem: the output of w32-get-locale-info is a unibyte "Windows ANSI" string, while the resulting buffer is multibyte, iso-latin-1-dos. That led me to try the following .emacs: ;;; .emacs ;;; (setq unibyte-display-via-language-environment t) (defun my-list-locales-bug () ;; ;; this is w32-list-locales almost verbatim ;; (interactive) (if (null w32-valid-locales) (setq w32-valid-locales (w32-get-valid-locale-ids))) (switch-to-buffer-other-window (get-buffer-create "*Supported Locales*")) ;;;;;;;;;;;;;;;;;;;;;;;;;; (set-buffer-multibyte nil) ;;;;;;;;;;;;;;;;;;;;;;;;;; (erase-buffer) (insert "LCID\tAbbrev\tFull name\n\n") (insert (mapconcat '(lambda (x) (format "%d\t%s\t%s" x (w32-get-locale-info x) (w32-get-locale-info x t))) w32-valid-locales "\n")) (insert "\n") (goto-char (point-min))) ;;; .emacs ends here ;;; Then, after M-x my-list-locales-bug, Emacs hangs. - With the default Courier New font, it hangs once the cursor moves over a non-ASCII char or the buffer scrolls, prompting a redisplay. It uses around 50% CPU. The bug does not show on non-optimized builds. - With DejaVu Sans Mono, it hangs immediately, and does not use CPU. This happens with optimized and non-optimized builds. This is a backtrace after C-c in the Courier New case: Quit (expect signal SIGINT when the program is resumed) (gdb) thread 1 [Switching to thread 1 (thread 860.0x370)]#0 0x7c91e4f4 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll (gdb) bt #0 0x7c91e4f4 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x77ef597f in ?? () from C:\WINDOWS\system32\gdi32.dll #2 0x77efd880 in UnrealizeObject () from C:\WINDOWS\system32\gdi32.dll #3 0x011f765a in w32_fill_rect (f=0x2e42200, hdc=0x30010fd8, pix=33554435, lprect=0x82e7dc) at w32term.c:393 #4 0x011f8127 in w32_draw_relief_rect (f=0x2e42200, left_x=136, top_y=560, right_x=167, bottom_y=575, width=20810504, raised_p=0, top_p=1, bot_p=1, left_p=0, right_p=0, clip_rect=0x82e86c) at w32term.c:1634 #5 0x011f841e in x_draw_glyph_string_box (s=0x82eac0) at w32term.c:1758 #6 0x011ff527 in x_draw_glyph_string (s=0x82eac0) at w32term.c:2266 #7 0x01056ccd in draw_glyphs (w=0x313da00, x=176, row=0x331f428, area=TEXT_AREA, start=9, end=14, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:20504 #8 0x0105a309 in x_write_glyphs (start=0x3461120, len=5) at xdisp.c:21913 #9 0x0115f93a in update_window_line (w=0x313da00, vpos=7, mouse_face_overwritten_p=0x82ef7c) at dispnew.c:4594 #10 0x0115fedc in update_window (w=0x313da00, force_p=0) at dispnew.c:4310 #11 0x01162596 in update_window_tree (w=0x313da00, force_p=0) at dispnew.c:4003 #12 0x011624fc in update_window_tree (w=0x313d800, force_p=0) at dispnew.c:4001 #13 0x01163d7c in update_frame (f=0x2e42200, force_p=0, inhibit_hairy_id_p=0) at dispnew.c:3930 #14 0x01048abf in redisplay_internal (preserve_echo_area=) at xdisp.c:11906 #15 0x0108b8b9 in read_char (commandflag=1, nmaps=2, maps=0x82fb70, prev_event=47896577, used_mouse_menu=0x82fc34, end_time=0x0) at keyboard.c:2649 #16 0x0108ff0a in read_key_sequence (keybuf=0x82fcd4, bufsize=30, prompt=47896577, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9343 #17 0x01093061 in command_loop_1 () at keyboard.c:1621 #18 0x010191e6 in internal_condition_case (bfun=0x1092dd3 , handlers=47960329, hfun=0x108a056 ) at eval.c:1511 #19 0x010894fb in command_loop_2 () at keyboard.c:1338 #20 0x01019290 in internal_catch (tag=47956401, func=0x10894d8 , arg=47896577) at eval.c:1247 #21 0x01089e9b in command_loop () at keyboard.c:1317 #22 0x0108a1ef in recursive_edit_1 () at keyboard.c:942 #23 0x0108a35a in Frecursive_edit () at keyboard.c:1004 #24 0x01002cdc in main (argc=1, argv=0xa941c0) at emacs.c:1728 This is a backtrace after C-c in the DejaVu Sans Mono case: Quit (expect signal SIGINT when the program is resumed) (gdb) thread 1 [Switching to thread 1 (thread 2912.0x24c)]#0 0x7c91e4f4 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll (gdb) bt #0 0x7c91e4f4 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7c91df2c in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\system32\ntdll.dll #2 0x7c809574 in KERNEL32!CreateFileMappingA () from C:\WINDOWS\system32\kernel32.dll #3 0x7e3995f9 in USER32!GetLastInputInfo () from C:\WINDOWS\system32\user32.dll #4 0x7e3996a8 in USER32!MsgWaitForMultipleObjects () from C:\WINDOWS\system32\user32.dll #5 0x01099b18 in sys_select (nfds=1, rfds=0x82f970, wfds=0x0, efds=0x0, timeout=0x82f968) at w32proc.c:1270 #6 0x0106861c in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=47896577, wait_proc=0x0, just_wait_proc=0) at process.c:4816 #7 0x0115966f in sit_for (timeout=240, reading=1, do_display=1) at dispnew.c:6637 #8 0x0108c366 in read_char (commandflag=1, nmaps=2, maps=0x82fb70, prev_event=47896577, used_mouse_menu=0x82fc34, end_time=0x0) at keyboard.c:2892 #9 0x0108ff0a in read_key_sequence (keybuf=0x82fcd4, bufsize=30, prompt=47896577, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9343 #10 0x01093061 in command_loop_1 () at keyboard.c:1621 #11 0x010191e6 in internal_condition_case (bfun=0x1092dd3 , handlers=47960329, hfun=0x108a056 ) at eval.c:1511 #12 0x010894fb in command_loop_2 () at keyboard.c:1338 #13 0x01019290 in internal_catch (tag=47956401, func=0x10894d8 , arg=47896577) at eval.c:1247 #14 0x01089e9b in command_loop () at keyboard.c:1317 #15 0x0108a1ef in recursive_edit_1 () at keyboard.c:942 #16 0x0108a35a in Frecursive_edit () at keyboard.c:1004 #17 0x01002cdc in main (argc=1, argv=0xa941c0) at emacs.c:1728 ------------=_1229010303-4296-2 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 67; hammy, 101; neutral, 48; spammy, 3. spammytokens:0.987-1--populated, 0.862-+--here, 0.860-+--UD:com hammytokens:0.000-+--emacs, 0.000-+--HCC:D*com, 0.000-+--H*r:TLSv1, 0.000-+--HCC:D*donarmstrong.com, 0.000-+--HCC:D*emacsbugs.donarmstrong.com X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 872-done) by emacsbugs.donarmstrong.com; 11 Dec 2008 15:42:52 +0000 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.191]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBFgmOK004091 for <872-done@emacsbugs.donarmstrong.com>; Thu, 11 Dec 2008 07:42:50 -0800 Received: by ti-out-0910.google.com with SMTP id b6so769326tic.1 for <872-done@emacsbugs.donarmstrong.com>; Thu, 11 Dec 2008 07:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=6g0V7STZquVsbCK7yMSCSZxykesgWb45hCA6/4Xiv9M=; b=bZyeI6uhSrd0KpRBOnL7sQ6Js/4qiwKR6gVjRs5BApAtq6K10ky1RK+OTx6v37crEa LZFpe0XzLNsg+uItaALN4WXrZsFnPV/OfCVGJZ0zGCRl+x4P31m2EAkYjun8cY07ufZM MiNyBbvKlrTO7G64KFypP84M0NnnmJf58fgSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=fHi1dPgep6tGWRjCC3yY2ue6vbiYRVC3+2Y89IanDFJmt0xaTZgfywBHzR8dX0kFDg D9KmqTgaiPdOETin9uD6SahZa0GlZx1fm5HHM7rqY27tHkda2v0+2XAM1FojfGd9lKk9 o4QxRyoYr0bi9hCTb9JG3J1RoW1kc94RxmSMo= Received: by 10.110.33.15 with SMTP id g15mr3851628tig.57.1229010167667; Thu, 11 Dec 2008 07:42:47 -0800 (PST) Received: from ?192.168.1.3? ([124.13.223.53]) by mx.google.com with ESMTPS id w5sm1051487tib.14.2008.12.11.07.42.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Dec 2008 07:42:46 -0800 (PST) Sender: Jason Rumney Message-ID: <494134D7.9000502@f2s.com> Date: Thu, 11 Dec 2008 23:42:15 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Juanma Barranquero CC: 872-done@emacsbugs.donarmstrong.com Subject: Re: [Emacs-diffs] emacs/src ChangeLog References: <49412C13.1080600@f2s.com> <87tz9aiw58.fsf@cyd.mit.edu> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Juanma Barranquero wrote: > It is likely Jason has really fixed the problem, because it started > happening a few days after this change: > > 2008-07-30 Jason Rumney > > * w32font.h (struct w32font_info): Use unicode version of textmetrics. > > * w32font.c (w32font_encode_char): Leave as unicode if in range. > (w32font_open_internal): Get unicode version of textmetrics. > Don't enable or disable glyph indices here. > (w32font_open): Disable use of glyph indices. > > * w32uniscribe.c (uniscribe_open): Enable use of glyph indices. > > Juanma > More likely one of these earlier changes: 2008-07-30 Jason Rumney * w32uniscribe.c (uniscribe_encode_char): Fix glyph buffer size. 2008-07-29 Jason Rumney * w32uniscribe.c (uniscribe_shape): Avoid using context if cache is populated. (uniscribe_encode_char): Always use uniscribe. Avoid using context if cache is populated. ------------=_1229010303-4296-2--