From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Leach Newsgroups: gmane.emacs.bugs Subject: bug#23259: 25.1.50; Xerror: "BadLength" on extreme zoom causing emacs to segfault Date: Sun, 10 Apr 2016 16:33:17 +0100 Message-ID: <87twj9mqbm.fsf@mattleach.net> References: <87zit120yf.fsf@mattleach.net> <83vb3ph5i3.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1460302463 5235 80.91.229.3 (10 Apr 2016 15:34:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Apr 2016 15:34:23 +0000 (UTC) Cc: 23259@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 10 17:34:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1apHNR-0000tG-Q2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 17:34:18 +0200 Original-Received: from localhost ([::1]:35381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHNN-0004XS-Ul for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 11:34:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHNG-0004R1-8b for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apHND-0003p8-0l for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHNC-0003p4-Tf for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1apHNC-0004PN-Pb for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthew Leach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Apr 2016 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23259 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23259-submit@debbugs.gnu.org id=B23259.146030240416887 (code B ref 23259); Sun, 10 Apr 2016 15:34:02 +0000 Original-Received: (at 23259) by debbugs.gnu.org; 10 Apr 2016 15:33:24 +0000 Original-Received: from localhost ([127.0.0.1]:57382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apHMZ-0004OH-FW for submit@debbugs.gnu.org; Sun, 10 Apr 2016 11:33:23 -0400 Original-Received: from mx0.mattleach.net ([176.58.118.143]:37596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apHMW-0004O9-Ox for 23259@debbugs.gnu.org; Sun, 10 Apr 2016 11:33:21 -0400 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id B8CEC6222F; Sun, 10 Apr 2016 16:33:19 +0100 (BST) Original-Received: from spline.mattleach.net (host86-170-66-130.range86-170.btcentralplus.com [86.170.66.130]) by mx0.mattleach.net (Postfix) with ESMTPSA id 64E3762229; Sun, 10 Apr 2016 16:33:15 +0100 (BST) In-Reply-To: <83vb3ph5i3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Apr 2016 18:01:56 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116321 Archived-At: --=-=-= Content-Type: text/plain Hi Eli, Eli Zaretskii writes: >> From: Matthew Leach >> Date: Sun, 10 Apr 2016 11:49:12 +0100 >> >> emacs -Q >> open a file, emacs/src/process.c, say. >> C-x C-= >> and keep pressing >> C-= >> >> Emacs will grind to a halt a little but will eventually segfault when >> the zoom is extreme enough. >> >> Attached is the backtrace. It looks as though X has thrown an error, >> maybe we need to limit the amount of zoom that Emacs allows? > > Probably. However, the interesting question is: what values to use as > limits? Maybe limit the zoom before X would crash? Presumably X has an upper bound on how large it can render things since it can yield a BadLength error. However, I've never studied X before. > Also, this backtrace is not useful, since the X errors are by default > asynchronous. Could you please run Emacs in synchronous X mode (see > etc/DEBUG for how), and present the backtrace then? Sure, please see attached. > Also, please tell: > > . what is the maximum value of the scale factor you see on the mode > line before Emacs crashes I can get to about +34 before it crashes. > . what is the value returned by display-pixel-width (display-pixel-width) => 1366 > . what is the values returned by frame-char-width and > frame-char-height (frame-char-width) => 9 (frame-char-height) => 18 Hope this helps. -- Matt --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=gdb.txt Content-Transfer-Encoding: quoted-printable Breakpoint 3 at 0x51dec7: file xterm.c, line 9544. Starting program: /home/matthew/Development/emacs/src/emacs -xrm "emacs.syn= chronous: true" [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe8938700 (LWP 25309)] [New Thread 0x7fffe3b8f700 (LWP 25310)] [New Thread 0x7fffe3181700 (LWP 25311)] Thread 1 "emacs" hit Breakpoint 3, x_error_quitter (display=3D0x1579d40, ev= ent=3D0x7fffffff9aa0) at xterm.c:9544 9544 if (event->error_code =3D=3D BadName) #0 x_error_quitter (display=3D0x1579d40, event=3D0x7fffffff9aa0) at xterm.= c:9544 buf =3D "\200\231\377\377\377\177", '\000' , "\22= 0\257W\001", '\000' , "$\031\002\361\377\177\000\000\220\= 333n\002", '\000' , " \000\000\000\000\000\000\000o\341J\= 364\377\177\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\00= 0\000X\300W\001\000\000\000\000\000\000\000\000\001\000\000\000 \300W\001\0= 00\000\000\000\000\212\"\274\235\207Q\364\004\260W\001\000\000\000\000\220\= 257W\001", '\000' , "\250\257W\001", '\000' , "\001\000\000\000\000\000\000\000 \232\377\377\377\177\000\000Q\275J= \364\377\177\000\000\006\000\000\000\001\000\001\000"... buf1 =3D "\314\n\000\000\000\000\000\000S\000\000\000\000\000\000\0= 00[\231\000\000\377\177\000\000\020\230\377\377\377\177\000\000\315\n\000\0= 00\000\000\000\000\255\000\000\000\000\000\000\000\020\066\000\000\000\000\= 000\000=D0=80\377\377\377\177\000\000\315\n\000\000\000\000\000\000\000\001= \000\000\000\000\000\000\000\030\001\000\000\000\000\000\003\000\000\000\37= 7\177\000\000\020\000\000\000\000\000\000\000P", '\000' ,= "\003\000\000\000\060", '\000' , "[\000\000\000n\000\000= \000O\332J\364\377\177\000\000\300\333n\002\000\000\000\000w\000\000\000|",= '\000' , "K4\361\377\177\000\000\020\000\000\000\000\000= \000\000\001\001"... #1 0x000000000051dea7 in x_error_handler (display=3D0x1579d40, event=3D0x7= fffffff9aa0) at xterm.c:9523 No locals. #2 0x00007ffff490a87d in _XError () from /usr/lib/libX11.so.6 No symbol table info available. #3 0x00007ffff49077c7 in ?? () from /usr/lib/libX11.so.6 No symbol table info available. #4 0x00007ffff4907885 in ?? () from /usr/lib/libX11.so.6 No symbol table info available. #5 0x00007ffff4908830 in _XReply () from /usr/lib/libX11.so.6 No symbol table info available. #6 0x00007ffff490411d in XSync () from /usr/lib/libX11.so.6 No symbol table info available. #7 0x00007ffff49041bb in ?? () from /usr/lib/libX11.so.6 No symbol table info available. #8 0x00007ffff429a151 in XRenderAddGlyphs () from /usr/lib/libXrender.so.1 No symbol table info available. #9 0x00007ffff408e9e2 in XftFontLoadGlyphs () from /usr/lib/libXft.so.2 No symbol table info available. #10 0x00007ffff4090bb3 in XftGlyphRender () from /usr/lib/libXft.so.2 No symbol table info available. #11 0x00007ffff408a1cc in XftDrawGlyphs () from /usr/lib/libXft.so.2 No symbol table info available. #12 0x000000000066df26 in xftfont_draw (s=3D0x7fffffffc5a0, from=3D0, to=3D= 1, x=3D8, y=3D6865, with_background=3Dtrue) at xftfont.c:636 f =3D 0x12d8680 face =3D 0x26cab00 xftfont_info =3D 0x26db8b8 xftface_info =3D 0x26caad0 xft_draw =3D 0x1e1df80 code =3D 0x7fffffffc370 fg =3D { pixel =3D 11674146,=20 color =3D { red =3D 45746,=20 green =3D 8738,=20 blue =3D 8738,=20 alpha =3D 65535 } } bg =3D { pixel =3D 16777215,=20 color =3D { red =3D 65535,=20 green =3D 65535,=20 blue =3D 65535,=20 alpha =3D 65535 } } len =3D 1 i =3D 1 #13 0x000000000051044b in x_draw_glyph_string_foreground (s=3D0x7fffffffc5a= 0) at xterm.c:1775 font =3D 0x26db8b8 boff =3D 0 y =3D 6865 i =3D 0 x =3D 8 #14 0x000000000051473f in x_draw_glyph_string (s=3D0x7fffffffc5a0) at xterm= .c:3528 relief_drawn_p =3D false #15 0x00000000004806c9 in draw_glyphs (w=3D0x12d9690, x=3D4461, row=3D0x228= bdf0, area=3DTEXT_AREA, start=3D0, end=3D1, hl=3DDRAW_NORMAL_TEXT, overlaps= =3D0) at xdisp.c:25706 head =3D 0x7fffffffc5a0 tail =3D 0x7fffffffc5a0 s =3D 0x7fffffffc5a0 clip_head =3D 0x0 clip_tail =3D 0x0 i =3D 1 j =3D 0 x_reached =3D 4461 last_x =3D 1358 area_left =3D 8 f =3D 0x12d8680 sa_avail =3D 16382 sa_count =3D 5 sa_must_free =3D false #16 0x00000000004871ff in x_write_glyphs (w=3D0x12d9690, updated_row=3D0x22= 8bdf0, start=3D0x2291000, updated_area=3DTEXT_AREA, len=3D1) at xdisp.c:276= 75 x =3D 0 hpos =3D 0 chpos =3D 0 #17 0x000000000041d635 in update_text_area (w=3D0x12d9690, updated_row=3D0x= 228bdf0, vpos=3D0) at dispnew.c:3612 current_row =3D 0x2378570 desired_row =3D 0x228bdf0 rif =3D 0x9010c0 changed_p =3D false #18 0x000000000041dfff in update_window_line (w=3D0x12d9690, vpos=3D0, mous= e_face_overwritten_p=3D0x7fffffffcb2f) at dispnew.c:3855 current_row =3D 0x2378570 desired_row =3D 0x228bdf0 rif =3D 0x9010c0 changed_p =3D false #19 0x000000000041d197 in update_window (w=3D0x12d9690, force_p=3Dtrue) at = dispnew.c:3477 vpos =3D 0 i =3D 4 end =3D 0x228f5f0 mode_line_row =3D 0x228f5f0 header_line_row =3D 0x0 changed_p =3D false mouse_face_overwritten_p =3D false row =3D 0x228bdf0 yb =3D 732 n_updated =3D 0 desired_matrix =3D 0x168a7b0 paused_p =3D false preempt_count =3D 9 rif =3D 0x9010c0 #20 0x000000000041c88a in update_window_tree (w=3D0x12d9690, force_p=3Dtrue= ) at dispnew.c:3219 paused_p =3D false #21 0x000000000041c4b5 in update_frame (f=3D0x12d8680, force_p=3Dtrue, inhi= bit_hairy_id_p=3Dfalse) at dispnew.c:3108 paused_p =3D false root_window =3D 0x12d9690 #22 0x0000000000458ad2 in redisplay_internal () at xdisp.c:14010 gcscrollbars =3D true f_redisplay_flag =3D false f =3D 0x12d8680 w =3D 0x12d9690 sw =3D 0x12d9690 fr =3D 0x12d8680 pending =3D false must_finish =3D true match_p =3D true tlbufpos =3D { charpos =3D 0,=20 bytepos =3D 1 } tlendpos =3D { charpos =3D 237464,=20 bytepos =3D 237464 } number_of_visible_frames =3D 1 count =3D 2 sf =3D 0x12d8680 polling_stopped_here =3D true tail =3D 17498227 frame =3D 19760773 consider_all_windows_p =3D true update_miniwindow_p =3D true #23 0x0000000000456b34 in redisplay () at xdisp.c:13204 No locals. #24 0x0000000000556e38 in read_char (commandflag=3D1, map=3D40660771, prev_= event=3D0, used_mouse_menu=3D0x7fffffffe36f, end_time=3D0x0) at keyboard.c:= 2469 echo_current =3D false c =3D 0 jmpcount =3D 13028656 local_getcjmp =3D {{ __jmpbuf =3D {5552513, 15899701, 140737488347520, 6101750, 1784= 3168, 18673408, 0, 140737488347520},=20 __mask_was_saved =3D 5552513,=20 __saved_mask =3D { __val =3D {17843168, 13028656, 6102329, 0, 140737488347568, 5= 552513, 18673408, 13028656, 5685754, 0, 140737488347616, 5552513, 40660755,= 140737488347712, 6227505, 0} } }} save_jump =3D {{ __jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 25769803776},=20 __mask_was_saved =3D 15899696,=20 __saved_mask =3D { __val =3D {140737488347352, 5556855, 25769803776, 15899701, 0= , 15899696, 15899696, 5557072, 29712, 140737488347536, 6647043, 0, 0, 13028= 656, 6, 0} } }} tem =3D 40660771 save =3D 0 previous_echo_area_message =3D 0 also_record =3D 0 reread =3D false recorded =3D false polling_stopped_here =3D false orig_kboard =3D 0x167bf10 #25 0x00000000005640a6 in read_key_sequence (keybuf=3D0x7fffffffe520, bufsi= ze=3D30, prompt=3D0, dont_downcase_last=3Dfalse, can_return_switch_frame=3D= true, fix_current_buffer=3Dtrue, prevent_redisplay=3Dfalse) at keyboard.c:9= 054 interrupted_kboard =3D 0x167bf10 interrupted_frame =3D 0x12d8680 key =3D 27648 used_mouse_menu =3D false echo_local_start =3D 0 last_real_key_start =3D 0 keys_local_start =3D 0 new_binding =3D 140737488348384 count =3D 2 t =3D 0 echo_start =3D 0 keys_start =3D 0 current_binding =3D 40660771 first_event =3D 0 first_unbound =3D 31 mock_input =3D 0 fkey =3D { parent =3D 17484467,=20 map =3D 17484467,=20 start =3D 0,=20 end =3D 0 } keytran =3D { parent =3D 13295171,=20 map =3D 13295171,=20 start =3D 0,=20 end =3D 0 } indec =3D { parent =3D 17484483,=20 map =3D 17484483,=20 start =3D 0,=20 end =3D 0 } shift_translated =3D false delayed_switch_frame =3D 0 original_uppercase =3D 5552513 original_uppercase_position =3D -1 dummyflag =3D false starting_buffer =3D 0xf29c30 fake_prefixed_keys =3D 0 #26 0x000000000055455d in command_loop_1 () at keyboard.c:1357 cmd =3D 40651341 keybuf =3D {268435702, 268435702, 140737488348512, 6102489, 1286657= 6, 0, 5556720, 0, 140737488348608, 6104765, 0, 28656, 0, 28656, 13028656, 6= 099123, 0, 140737488348608, 5552513, 0, 140737488348704, 6227505, 13504947,= =20 2, 13028656, 6226506, 0, 140737488348688, 5552513, 0} i =3D 1 prev_modiff =3D 1424 prev_buffer =3D 0xf29c30 already_adjusted =3D false #27 0x00000000005ebd00 in internal_condition_case (bfun=3D0x554153 , handlers=3D19296, hfun=3D0x55393d ) at eval.c:1310 val =3D 5552513 c =3D 0x155d810 #28 0x0000000000553e5a in command_loop_2 (ignore=3D0) at keyboard.c:1099 val =3D 0 #29 0x00000000005eb620 in internal_catch (tag=3D46128, func=3D0x553e31 , arg=3D0) at eval.c:1075 val =3D 5552513 c =3D 0x155d6e0 #30 0x0000000000553dfc in command_loop () at keyboard.c:1078 No locals. #31 0x0000000000553505 in recursive_edit_1 () at keyboard.c:684 count =3D 1 val =3D 140737488349088 #32 0x0000000000553699 in Frecursive_edit () at keyboard.c:755 count =3D 0 buffer =3D 0 #33 0x000000000055153f in main (argc=3D3, argv=3D0x7fffffffe9b8) at emacs.c= :1617 dummy =3D 0 stack_bottom_variable =3D 0 '\000' do_initial_setlocale =3D true dumping =3D false skip_args =3D 0 rlim =3D { rlim_cur =3D 8720000,=20 rlim_max =3D 18446744073709551615 } no_loadup =3D false junk =3D 0x0 dname_arg =3D 0x0 ch_to_dir =3D 0x0 original_pwd =3D 0x0 Lisp Backtrace: "redisplay_internal (C function)" (0x0) --=-=-=--