From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#43589: 27.1.50; Crash in Org mode buffer when moving point after using outline-hide-other when visual-line-mode and visual line numbers are enabled Date: Thu, 24 Sep 2020 23:43:57 +0100 Message-ID: <86blhueqxe.fsf@gmail.com> References: <878scz2v85.fsf@polaris64.net> <83r1qrtdwz.fsf@gnu.org> <87d02bmbmi.fsf@polaris64.net> <83k0wjtan5.fsf@gnu.org> <87y2kzx73e.fsf@polaris64.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4737"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) To: 43589@debbugs.gnu.org Cancel-Lock: sha1:H2svRInR7cMhyDb19MSEGn5eqtg= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 25 00:45:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLZzE-00015Z-T4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Sep 2020 00:45:13 +0200 Original-Received: from localhost ([::1]:53100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLZzD-00028t-Ue for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 18:45:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLZz4-00025U-AP for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLZz4-0004xN-0R for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLZz3-00082b-Ut for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:45:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <878scz2v85.fsf@polaris64.net> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Sep 2020 22:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43589 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160098745430840 (code B ref -1); Thu, 24 Sep 2020 22:45:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2020 22:44:14 +0000 Original-Received: from localhost ([127.0.0.1]:41983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLZyH-00081M-HR for submit@debbugs.gnu.org; Thu, 24 Sep 2020 18:44:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLZyE-00081D-Dn for submit@debbugs.gnu.org; Thu, 24 Sep 2020 18:44:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLZyE-0001NV-6I for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:44:10 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:56190 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLZyB-0004t4-Kj for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:44:09 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kLZy7-000AID-GE for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2020 00:44:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/24 18:10:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188918 Archived-At: On Thu 24 Sep 2020, Simon Pugnet wrote: > Daniel Martín writes: > >> Simon, if you can reproduce the problem consistently, could you describe >> in more detail the position of point at each step? Are you copying and >> pasting the sample Org document? Perhaps those implicit assumptions are >> making the problem harder to reproduce. Thanks. > > Hello Daniel and Eli, > > Here's a more detailed explanation of exactly what I'm dong to cause this > issue. > > 1. Execute: emacs -Q > 2. In the scratch buffer that opens by default, activate Org mode: M-x > org-mode > 3. Type the following directly into the buffer (3 lines): - > > * Heading 1 > ** Heading 1a > ** Heading 1b > > 4. The point should now be after the "b" in "Heading 1b" > 5. Evaluate (M-:) the following: (setq display-line-numbers-type 'visual) > 6. Activate display-line-numbers-mode: M-x display-line-numbers-mode > 7. Activate visual-line-mode: M-x visual-line-mode > 8. Hide other outline headings: M-x outline-hide-other > 9. Try to move the point to the previous line: C-p or previous-line > > If I perform these steps on Emacs 27.1 (GUI or text frame), and also the > packaged version of Emacs 26.3 on Android (via the Termux app), I always get a > segmentation fault. > > This happens in other Org mode buffers too, including those loaded directly > from the file system. > > I hope that helps! With this recipe, I can reliably reproduce this on 64bit mingw64 on Windows (built with -O2). Running this produces the message: Re-entering top level after C stack overflow ... which confirms Eli's hunch about the cause. Running the same recipe under gdb, I get the following backtrace: (gdb) bt #0 0x000000006f8d0f25 in ?? () from C:\msys64\mingw64\bin\libharfbuzz-0.dll #1 0x000000006f85a24b in ?? () from C:\msys64\mingw64\bin\libharfbuzz-0.dll #2 0x000000006f8526cb in ?? () from C:\msys64\mingw64\bin\libharfbuzz-0.dll #3 0x00000004001c0367 in w32hb_encode_char (font=0x5698a90, c=0x5c) at C:/emacs/git/emacs/master/src/w32uniscribe.c:1359 #4 0x000000040004ba06 in get_char_glyph_code (char2b=0x4041cc, font=0x5698a90, c=) at C:/emacs/git/emacs/master/src/xdisp.c:27746 #5 gui_produce_glyphs (it=0x404270) at C:/emacs/git/emacs/master/src/xdisp.c:30173 #6 0x000000040001e204 in produce_special_glyphs (it=it@entry=0x405750, what=what@entry=IT_CONTINUATION) at C:/emacs/git/emacs/master/src/xdisp.c:29779 #7 0x000000040002ca1d in init_iterator (it=it@entry=0x405750, w=w@entry=0x5698320, charpos=0xab, bytepos=, row=0x578bc00, base_face_id=, base_face_id@entry=DEFAULT_FACE_ID) at C:/emacs/git/emacs/master/src/xdisp.c:3286 #8 0x000000040002e321 in start_display (it=it@entry=0x405750, w=0x5698320, pos=...) at C:/emacs/git/emacs/master/src/xdisp.c:3459 #9 0x000000040002f02c in display_count_lines_visually (it=0x40dfe0) at C:/emacs/git/emacs/master/src/xdisp.c:22824 #10 maybe_produce_line_number (it=it@entry=0x40dfe0) at C:/emacs/git/emacs/master/src/xdisp.c:22868 #11 0x0000000400030580 in move_it_in_display_line_to (it=it@entry=0x40dfe0, to_charpos=to_charpos@entry=0xab, to_x=to_x@entry=0xffffffff, op=op@entry=MOVE_TO_POS) at C:/emacs/git/emacs/master/src/xdisp.c:9184 #12 0x00000004000344af in move_it_to (it=, it@entry=0x40dfe0, to_charpos=to_charpos@entry=0xab, to_x=, to_x@entry=0xffffffff, to_y=, to_y@entry=0xffffffff, to_vpos=, to_vpos@entry=0xffffffff, op=, op@entry=0x8) at C:/emacs/git/emacs/master/src/xdisp.c:10006 #13 0x000000040002e3da in start_display (it=it@entry=0x40dfe0, w=0x5698320, pos=...) at C:/emacs/git/emacs/master/src/xdisp.c:6968 #14 0x000000040002f02c in display_count_lines_visually (it=0x416870) at C:/emacs/git/emacs/master/src/xdisp.c:22824 #15 maybe_produce_line_number (it=it@entry=0x416870) at C:/emacs/git/emacs/master/src/xdisp.c:22868 #16 0x0000000400030580 in move_it_in_display_line_to (it=it@entry=0x416870, to_charpos=to_charpos@entry=0xab, to_x=to_x@entry=0xffffffff, op=op@entry=MOVE_TO_POS) at C:/emacs/git/emacs/master/src/xdisp.c:9184 #17 0x00000004000344af in move_it_to (it=, it@entry=0x416870, to_charpos=to_charpos@entry=0xab, to_x=, to_x@entry=0xffffffff, to_y=, to_y@entry=0xffffffff, to_vpos=, to_vpos@entry=0xffffffff, op=, op@entry=0x8) at C:/emacs/git/emacs/master/src/xdisp.c:10006 #18 0x000000040002e3da in start_display (it=it@entry=0x416870, w=0x5698320, pos=...) at C:/emacs/git/emacs/master/src/xdisp.c:6968 #19 0x000000040002f02c in display_count_lines_visually (it=0x41f100) at C:/emacs/git/emacs/master/src/xdisp.c:22824 ... (truncated for brevity) ... #1200 maybe_produce_line_number (it=it@entry=0xbfd550) at C:/emacs/git/emacs/master/src/xdisp.c:22868 #1201 0x0000000400030580 in move_it_in_display_line_to (it=it@entry=0xbfd550, to_charpos=to_charpos@entry=0xab, to_x=to_x@entry=0xffffffff, op=op@entry=MOVE_TO_POS) at C:/emacs/git/emacs/master/src/xdisp.c:9184 #1202 0x00000004000344af in move_it_to (it=, it@entry=0xbfd550, to_charpos=to_charpos@entry=0xab, to_x=, to_x@entry=0xffffffff, to_y=, to_y@entry=0xffffffff, to_vpos=, to_vpos@entry=0xffffffff, op=, op@entry=0x8) at C:/emacs/git/emacs/master/src/xdisp.c:10006 #1203 0x000000040002e3da in start_display (it=it@entry=0xbfd550, w=w@entry=0x5698320, pos=...) at C:/emacs/git/emacs/master/src/xdisp.c:6968 #1204 0x000000040003556d in Fline_pixel_height () at C:/emacs/git/emacs/master/src/xdisp.c:1494 #1205 0x0000000400130347 in Ffuncall (nargs=, args=args@entry=0xbfe960) at C:/emacs/git/emacs/master/src/lisp.h:2080 #1206 0x000000040016b6f0 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=args_template@entry=make_fixnum(1025), nargs=nargs@entry=0x4, args=, args@entry=0xbfec70) at C:/emacs/git/emacs/master/src/bytecode.c:632 #1207 0x000000040013345b in fetch_and_exec_byte_code (args=0xbfec70, nargs=0x4, syms_left=make_fixnum(1025), fun=XIL(0x3fecff5)) at C:/emacs/git/emacs/master/src/lisp.h:1835 #1208 funcall_lambda (fun=XIL(0x3fecff5), nargs=nargs@entry=0x4, arg_vector=arg_vector@entry=0xbfec70) at C:/emacs/git/emacs/master/src/eval.c:3007 #1209 0x000000040013027b in Ffuncall (nargs=0x5, args=args@entry=0xbfec68) at C:/emacs/git/emacs/master/src/eval.c:2818 #1210 0x000000040016b6f0 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=args_template@entry=make_fixnum(512), nargs=nargs@entry=0x2, args=, args@entry=0xbfefc0) at C:/emacs/git/emacs/master/src/bytecode.c:632 #1211 0x000000040013345b in fetch_and_exec_byte_code (args=0xbfefc0, nargs=0x2, syms_left=make_fixnum(512), fun=XIL(0x3fed59d)) at C:/emacs/git/emacs/master/src/lisp.h:1835 #1212 funcall_lambda (fun=XIL(0x3fed59d), nargs=nargs@entry=0x2, arg_vector=arg_vector@entry=0xbfefc0) at C:/emacs/git/emacs/master/src/eval.c:3007 #1213 0x000000040013027b in Ffuncall (nargs=nargs@entry=0x3, args=args@entry=0xbfefb8) at C:/emacs/git/emacs/master/src/eval.c:2818 #1214 0x000000040012c979 in Ffuncall_interactively (nargs=0x3, args=0xbfefb8) at C:/emacs/git/emacs/master/src/callint.c:253 #1215 0x0000000400130347 in Ffuncall (nargs=nargs@entry=0x875c815, args=0xbfefb0, args@entry=0xbff260) at C:/emacs/git/emacs/master/src/lisp.h:2080 #1216 0x000000040012dcaf in Fcall_interactively (function=, record_flag=, keys=) at C:/emacs/git/emacs/master/src/callint.c:779 #1217 0x0000000400130347 in Ffuncall (nargs=, args=args@entry=0xbff228) at C:/emacs/git/emacs/master/src/lisp.h:2080 #1218 0x000000040016b6f0 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=args_template@entry=make_fixnum(1025), nargs=nargs@entry=0x1, args=, args@entry=0xbff4f8) at C:/emacs/git/emacs/master/src/bytecode.c:632 #1219 0x000000040013345b in fetch_and_exec_byte_code (args=0xbff4f8, nargs=0x1, syms_left=make_fixnum(1025), fun=XIL(0x40b4645)) at C:/emacs/git/emacs/master/src/lisp.h:1835 #1220 funcall_lambda (fun=XIL(0x40b4645), nargs=nargs@entry=0x1, arg_vector=arg_vector@entry=0xbff4f8) at C:/emacs/git/emacs/master/src/eval.c:3007 #1221 0x000000040013027b in Ffuncall (nargs=nargs@entry=0x2, args=args@entry=0xbff4f0) at C:/emacs/git/emacs/master/src/eval.c:2818 #1222 0x00000004001303fd in call1 (fn=fn@entry=XIL(0x3f30), arg1=) at C:/emacs/git/emacs/master/src/eval.c:2664 #1223 0x00000004000c339d in command_loop_1 () at C:/emacs/git/emacs/master/src/lisp.h:1007 #1224 0x000000040012f3fd in internal_condition_case (bfun=bfun@entry=0x4000c2fa0 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x4000ba310 ) at C:/emacs/git/emacs/master/src/eval.c:1356 #1225 0x00000004000b3db8 in command_loop_2 (ignore=) at C:/emacs/git/emacs/master/src/lisp.h:1007 #1226 0x000000040012f36b in internal_catch (tag=tag@entry=XIL(0xe070), func=func@entry=0x4000b3d90 , arg=arg@entry=XIL(0)) at C:/emacs/git/emacs/master/src/eval.c:1117 #1227 0x00000004000b3d39 in command_loop () at C:/emacs/git/emacs/master/src/lisp.h:1007 #1228 0x0000000000000000 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) Lisp Backtrace: "line-pixel-height" (0xbfe968) "line-move" (0xbfec70) "previous-line" (0xbfefc0) "funcall-interactively" (0xbfefb8) "call-interactively" (0xbff230) "command-execute" (0xbff4f8) Eli, shout if you need help in digging in to this further (and if a -O0 build would be more useful). AndyM