Subject: Re: 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

From: Simon Pugnet <[email-masked]>
Date: Thu, 24 Sep 2020 16:35:01 +0100

Eli Zaretskii <[email-masked]> writes:

>
> This sounds like infinite recursion that causes stack overflow. 
> Not
> sure why it happens in your case but not in mine.  Are you 
> trying this
> on a GUI frame or a TTY frame?  (I tried both, but couldn't 
> reproduce
> on either.)

Hello Eli,

Thanks for your reply.

I tried it originally in a GUI frame but I just tried the same 
procedure again using ~emacs -Q -nw~ and I got the same results. 
Here's the partial GDB back-trace: -

  #0  0x00005555555d1b39 in move_it_in_display_line_to 
  (it=it@entry=0x7fffff6734f0, to_charpos=to_charpos@entry=171, 
  to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:9009
  #1  0x00005555555d6bbd in move_it_to (it=0x7fffff6734f0, 
  to_charpos=171, to_x=<optimised out>, to_y=<optimised out>, 
  to_vpos=<optimised out>, op=8) at xdisp.c:9889
  #2  0x00005555555d0e92 in start_display 
  (it=it@entry=0x7fffff6734f0, w=0x555555c366a0, pos=...) at 
  xdisp.c:6866
  #3  0x00005555555d1a50 in display_count_lines_visually 
  (it=0x7fffff67bc80) at xdisp.c:22685
  #4  maybe_produce_line_number (it=it@entry=0x7fffff67bc80) at 
  xdisp.c:22729
  (...repeats...)
  #1438 0x00005555555d1a50 in display_count_lines_visually 
  (it=0x7fffffffb6b0) at xdisp.c:22685
  #1439 maybe_produce_line_number (it=it@entry=0x7fffffffb6b0) at 
  xdisp.c:22729
  #1440 0x00005555555d2e11 in move_it_in_display_line_to 
  (it=it@entry=0x7fffffffb6b0, to_charpos=to_charpos@entry=171, 
  to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:9079
  #1441 0x00005555555d6bbd in move_it_to (it=0x7fffffffb6b0, 
  to_charpos=171, to_x=<optimised out>, to_y=<optimised out>, 
  to_vpos=<optimised out>, op=8) at xdisp.c:9889
  #1442 0x00005555555d0e92 in start_display 
  (it=it@entry=0x7fffffffb6b0, w=w@entry=0x555555c366a0, pos=...) 
  at xdisp.c:6866
  #1443 0x00005555555d7af4 in Fline_pixel_height () at 
  xdisp.c:1422
  #1444 0x00005555556fdae3 in Ffuncall (nargs=1, 
  args=args@entry=0x7fffffffca80) at lisp.h:2110
  #1445 0x00005555557342cc in exec_byte_code (bytestr=<optimised 
  out>, vector=<optimised out>, maxdepth=<optimised out>, 
  args_template=<optimised out>, nargs=<optimised out>, 
  args=<optimised out>) at bytecode.c:633
  #1446 0x00005555556fda47 in Ffuncall (nargs=5, 
  args=args@entry=0x7fffffffce58) at eval.c:2809
  #1447 0x00005555557342cc in exec_byte_code (bytestr=<optimised 
  out>, vector=<optimised out>, maxdepth=<optimised out>, 
  args_template=<optimised out>, nargs=<optimised out>, 
  args=<optimised out>) at bytecode.c:633
  #1448 0x00005555556fda47 in Ffuncall (nargs=nargs@entry=3, 
  args=args@entry=0x7fffffffd218) at eval.c:2809
  #1449 0x00005555556fa295 in Ffuncall_interactively (nargs=3, 
  args=0x7fffffffd218) at callint.c:254
  #1450 0x00005555556fdae3 in Ffuncall (nargs=nargs@entry=4, 
  args=args@entry=0x7fffffffd210) at lisp.h:2110
  #1451 0x00005555556fb676 in Fcall_interactively 
  (function=<optimised out>, record_flag=<optimised out>, 
  keys=<optimised out>) at callint.c:783
  #1452 0x00005555556fdae3 in Ffuncall (nargs=4, 
  args=args@entry=0x7fffffffd448) at lisp.h:2110
  #1453 0x00005555557342cc in exec_byte_code (bytestr=<optimised 
  out>, vector=<optimised out>, maxdepth=<optimised out>, 
  args_template=<optimised out>, nargs=<optimised out>, 
  args=<optimised out>) at bytecode.c:633
  #1454 0x00005555556fda47 in Ffuncall (nargs=2, 
  args=0x7fffffffd7f0) at eval.c:2809
  #1455 0x00005555556fdbce in call1 (fn=fn@entry=0x4380, 
  arg1=<optimised out>) at eval.c:2655
  #1456 0x00005555556937e8 in command_loop_1 () at lisp.h:1033
  #1457 0x00005555556fcd17 in internal_condition_case 
  (bfun=bfun@entry=0x5555556933f0 <command_loop_1>, 
  handlers=handlers@entry=0x90, hfun=hfun@entry=0x55555568a0f0 
  <cmd_error>) at eval.c:1356
  #1458 0x0000555555684bb4 in command_loop_2 
  (ignore=ignore@entry=0x0) at lisp.h:1033
  #1459 0x00005555556fcc59 in internal_catch 
  (tag=tag@entry=0xd5c0, func=func@entry=0x555555684b90 
  <command_loop_2>, arg=arg@entry=0x0) at eval.c:1117
  #1460 0x0000555555684b53 in command_loop () at lisp.h:1033
  #1461 0x0000555555689cfa in recursive_edit_1 () at 
  keyboard.c:714
  #1462 0x000055555568a036 in Frecursive_edit () at keyboard.c:786
  #1463 0x00005555555a69b7 in main (argc=3, argv=<optimised out>) 
  at emacs.c:2066