unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
@ 2024-02-20 14:59 David Ponce
  2024-02-20 16:22 ` David Ponce
  2024-02-21  1:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 8+ messages in thread
From: David Ponce @ 2024-02-20 14:59 UTC (permalink / raw)
  To: 69287

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

Hello,

While working in Emacs, I often paste text from the 'KDE clipboard popup
menu at mouse position' into the *scratch* buffer, and sometimes this
crashes Emacs, but not systematically.

Since a few days I run Emacs under GDB, and I managed to get the
attached backtrace.

Please, eventually let me know how I can help to get more useful details
when another crash will happen.

Thanks.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
  3.24.41, cairo version 1.18.0) of 2024-02-20
Repository revision: a1cbc4d810bc1b525fa46b23249b414c1ad6b031
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 39 (KDE Plasma)

Configured using:
  'configure --with-x-toolkit=gtk3 --with-cairo-xcb
  --with-native-compilation=no
  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
   value of $LC_TIME: fr_FR.utf8
   value of $LANG: fr_FR.UTF-8
   locale-coding-system: utf-8-unix

[-- Attachment #2: emacs-crash-bt.txt --]
[-- Type: text/plain, Size: 4323 bytes --]

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
mark_interval_tree (i=0x60) at alloc.c:1537
1537      if (i && !interval_marked_p (i))
(gdb) bt
#0  mark_interval_tree (i=0x60) at alloc.c:1537
#1  0x00000000005b2589 in process_mark_stack (base_sp=0) at alloc.c:7246
#2  0x00000000005b2c4b in mark_object (obj=<optimized out>) at alloc.c:7476
#3  0x0000000000560dc8 in mark_kboards () at keyboard.c:14003
#4  0x00000000005b3490 in garbage_collect () at alloc.c:6594
#5  0x00000000005b4091 in maybe_garbage_collect () at alloc.c:6497
#6  0x00000000005d4f65 in maybe_gc () at ~/installs/emacs/src/lisp.h:5723
#7  Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7fffffff7170) at eval.c:3017
#8  0x000000000044689a in funcall_with_backtraces (nargs=nargs@entry=3, args=args@entry=0x7fffffff7170) at xdisp.c:3081
#9  0x00000000005d3879 in internal_condition_case_n
    (bfun=bfun@entry=0x446870 <funcall_with_backtraces>, nargs=nargs@entry=3, args=args@entry=0x7fffffff7170, handlers=handlers@entry=XIL(0x30), hfun=hfun@entry=0x45a090 <dsafe_eval_handler>) at eval.c:1617
#10 0x0000000000447c53 in dsafe__call
    (inhibit_quit=inhibit_quit@entry=true, f=0x446870 <funcall_with_backtraces>, nargs=nargs@entry=3, args=args@entry=0x7fffffff7170)
    at xdisp.c:3067
#11 0x0000000000475650 in dsafe__call (args=0x7fffffff7170, nargs=3, f=<optimized out>, inhibit_quit=true) at xdisp.c:3056
#12 dsafe_eval (sexpr=<optimized out>) at xdisp.c:3103
#13 display_mode_element (it=it@entry=0x7fffffff7300, depth=2,
    depth@entry=1, field_width=0, precision=precision@entry=-10, elt=<optimized out>, props=props@entry=XIL(0), risky=false)
    at xdisp.c:27875
#14 0x0000000000475735 in display_mode_element (it=it@entry=0x7fffffff7300, depth=1,
    depth@entry=0, field_width=field_width@entry=-1, precision=precision@entry=-1, elt=<optimized out>,
    elt@entry=XIL(0x7ffff4ec06b3), props=props@entry=XIL(0), risky=false) at xdisp.c:27961
#15 0x0000000000476522 in gui_consider_frame_title (frame=XIL(0xfaabf5)) at xdisp.c:13826
#16 0x000000000048ddf3 in redisplay_window (window=<optimized out>, just_this_one_p=just_this_one_p@entry=false) at xdisp.c:21015
#17 0x000000000049165b in redisplay_window_0 (window=window@entry=XIL(0xedc1f5)) at xdisp.c:18011
#18 0x00000000005d3734 in internal_condition_case_1
    (bfun=bfun@entry=0x491630 <redisplay_window_0>, arg=arg@entry=XIL(0xedc1f5), handlers=<optimized out>, hfun=hfun@entry=0x44aec0 <redisplay_window_error>) at eval.c:1561
--Type <RET> for more, q to quit, c to continue without paging--
#19 0x0000000000447a15 in redisplay_windows (window=XIL(0xedc1f5)) at xdisp.c:17980
#20 0x000000000047a276 in redisplay_internal () at xdisp.c:17380
#21 0x000000000047b6a5 in redisplay () at xdisp.c:16561
#22 0x00000000005597db in read_char
    (commandflag=1, map=map@entry=XIL(0x1fa9803), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x7fffffffdbfb, end_time=end_time@entry=0x0) at keyboard.c:2685
#23 0x000000000055c028 in read_key_sequence
    (keybuf=keybuf@entry=0x7fffffffdd30, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, disable_text_conversion_p=false) at keyboard.c:10706
#24 0x000000000055e196 in command_loop_1 () at keyboard.c:1427
#25 0x00000000005d36a7 in internal_condition_case
    (bfun=bfun@entry=0x55dfe0 <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x551700 <cmd_error>)
    at eval.c:1537
#26 0x0000000000549d7a in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1166
#27 0x00000000005d3601 in internal_catch
    (tag=tag@entry=XIL(0x10830), func=func@entry=0x549d60 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1217
#28 0x0000000000549d1f in command_loop () at keyboard.c:1144
#29 0x00000000005512c3 in recursive_edit_1 () at keyboard.c:753
#30 0x000000000055162e in Frecursive_edit () at keyboard.c:836
#31 0x000000000042c70b in main (argc=<optimized out>, argv=<optimized out>) at emacs.c:2624

Lisp Backtrace:
"Automatic GC" (0x0)
"eval" (0xffff7178)
"redisplay_internal (C function)" (0x0)
(gdb) xbacktrace
"Automatic GC" (0x0)
"eval" (0xffff7178)
"redisplay_internal (C function)" (0x0)
(gdb)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-20 14:59 bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs David Ponce
@ 2024-02-20 16:22 ` David Ponce
  2024-02-21  1:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 8+ messages in thread
From: David Ponce @ 2024-02-20 16:22 UTC (permalink / raw)
  To: 69287

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Another backtrace I just got, which looks different, but still involves GC.

[-- Attachment #2: emacs-crash-bt2.txt --]
[-- Type: text/plain, Size: 4572 bytes --]

Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:442
442       signal (sig, SIG_DFL);
(gdb) bt
#0  terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:442
#1  0x0000000000424507 in emacs_abort () at sysdep.c:2390
#2  0x00000000004258f3 in process_mark_stack (base_sp=0) at alloc.c:7348
#3  0x00000000005b2c4b in mark_object (obj=<optimized out>) at alloc.c:7476
#4  0x0000000000560dad in mark_kboards () at keyboard.c:14000
#5  0x00000000005b3490 in garbage_collect () at alloc.c:6594
#6  0x00000000005b4091 in maybe_garbage_collect () at alloc.c:6497
#7  0x000000000061b15a in maybe_gc () at ~/installs/emacs/src/lisp.h:5723
#8  exec_byte_code (fun=<optimized out>, args_template=<optimized out>, nargs=<optimized out>, args=<optimized out>)
    at bytecode.c:789
#9  0x00000000005d4ec6 in Ffuncall (nargs=nargs@entry=3, args=0x7fffffffd140) at eval.c:3022
#10 0x00000000005d5230 in Fapply (nargs=nargs@entry=2, args=args@entry=0x7fffffffd1e0) at eval.c:2693
#11 0x00000000005d57fa in apply1 (arg=XIL(0x1f96d23), fn=<optimized out>) at eval.c:2909
#12 call_debugger (arg=XIL(0x1f96d23)) at eval.c:310
#13 0x00000000005d5f8f in maybe_call_debugger (error=XIL(0x1f96d43), conditions=XIL(0x7ffff47b0c5b)) at eval.c:2051
#14 signal_or_quit (error_symbol=<optimized out>, data=<optimized out>, continuable=continuable@entry=false) at eval.c:1876
#15 0x0000000000426912 in Fsignal (error_symbol=<optimized out>, error_symbol@entry=XIL(0x11e80), data=<optimized out>)
    at eval.c:1746
#16 0x000000000042693c in xsignal (data=<optimized out>, error_symbol=XIL(0x11e80)) at ~/installs/emacs/src/lisp.h:4641
#17 xsignal1 (error_symbol=error_symbol@entry=XIL(0x11e80), arg=arg@entry=XIL(0)) at eval.c:1906
#18 0x0000000000426d9d in funcall_general (fun=<optimized out>, numargs=1, args=0x7fffe6400100) at eval.c:2976
#19 0x000000000061afcc in exec_byte_code
    (fun=<optimized out>, args_template=<optimized out>, nargs=<optimized out>, args=<optimized out>) at bytecode.c:816
#20 0x00000000005d4ec6 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffffd428) at eval.c:3022
#21 0x00000000005d0c3e in Ffuncall_interactively (nargs=2, args=0x7fffffffd428) at callint.c:250
#22 0x00000000005d4ec6 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7fffffffd420) at eval.c:3022
#23 0x00000000005d162e in Fcall_interactively (function=<optimized out>, record_flag=<optimized out>, keys=<optimized out>)
    at callint.c:789
#24 0x000000000061afac in exec_byte_code
--Type <RET> for more, q to quit, c to continue without paging--
    (fun=<optimized out>, args_template=<optimized out>, nargs=<optimized out>, args=<optimized out>)
    at ~/installs/emacs/src/lisp.h:2208
#25 0x00000000005d4ec6 in Ffuncall (nargs=nargs@entry=5, args=args@entry=0x7fffffffd850) at eval.c:3022
#26 0x000000000055a830 in read_char
    (commandflag=1, map=map@entry=XIL(0x1f97943), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x7fffffffdbfb, end_time=end_time@entry=0x0) at keyboard.c:3075
#27 0x000000000055c028 in read_key_sequence
    (keybuf=keybuf@entry=0x7fffffffdd30, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, disable_text_conversion_p=false) at keyboard.c:10706
#28 0x000000000055e196 in command_loop_1 () at keyboard.c:1427
#29 0x00000000005d36a7 in internal_condition_case
    (bfun=bfun@entry=0x55dfe0 <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x551700 <cmd_error>)
    at eval.c:1537
#30 0x0000000000549d7a in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1166
#31 0x00000000005d3601 in internal_catch
    (tag=tag@entry=XIL(0x10830), func=func@entry=0x549d60 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1217
#32 0x0000000000549d1f in command_loop () at keyboard.c:1144
#33 0x00000000005512c3 in recursive_edit_1 () at keyboard.c:753
#34 0x000000000055162e in Frecursive_edit () at keyboard.c:836
#35 0x000000000042c70b in main (argc=<optimized out>, argv=<optimized out>) at emacs.c:2624

Lisp Backtrace:
"Automatic GC" (0x0)
"record" (0xe6400188)
"debug" (0xffffd148)
"nil" (0xe6400100)
"file-notify-handle-event" (0xffffd430)
"funcall-interactively" (0xffffd428)
--Type <RET> for more, q to quit, c to continue without paging--
"call-interactively" (0xe6400070)
"command-execute" (0xffffd858)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-20 14:59 bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs David Ponce
  2024-02-20 16:22 ` David Ponce
@ 2024-02-21  1:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-21  9:58   ` David Ponce
  2024-02-21 12:34   ` Eli Zaretskii
  1 sibling, 2 replies; 8+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-21  1:56 UTC (permalink / raw)
  To: David Ponce; +Cc: 69287

David Ponce <da_vid@orange.fr> writes:

> Hello,
>
> While working in Emacs, I often paste text from the 'KDE clipboard popup
> menu at mouse position' into the *scratch* buffer, and sometimes this
> crashes Emacs, but not systematically.
>
> Since a few days I run Emacs under GDB, and I managed to get the
> attached backtrace.
>
> Please, eventually let me know how I can help to get more useful details
> when another crash will happen.
>
> Thanks.

I suspect invalid Lisp objects are being recorded into one of several
lists that hold temporary data during selection conversion.  Please
build Emacs with --enable-checking and post a backtrace from there.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-21  1:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-21  9:58   ` David Ponce
  2024-02-21 11:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-21 15:31     ` Eli Zaretskii
  2024-02-21 12:34   ` Eli Zaretskii
  1 sibling, 2 replies; 8+ messages in thread
From: David Ponce @ 2024-02-21  9:58 UTC (permalink / raw)
  To: Po Lu; +Cc: 69287

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

On 21/02/2024 02:56, Po Lu wrote:
> David Ponce <da_vid@orange.fr> writes:
> 
>> Hello,
>>
>> While working in Emacs, I often paste text from the 'KDE clipboard popup
>> menu at mouse position' into the *scratch* buffer, and sometimes this
>> crashes Emacs, but not systematically.
>>
>> Since a few days I run Emacs under GDB, and I managed to get the
>> attached backtrace.
>>
>> Please, eventually let me know how I can help to get more useful details
>> when another crash will happen.
>>
>> Thanks.
> 
> I suspect invalid Lisp objects are being recorded into one of several
> lists that hold temporary data during selection conversion.  Please
> build Emacs with --enable-checking and post a backtrace from there.

Please, find attached the requested backtrace got from Emacs rebuilt with
--enable-checking.
Now Emacs consistently crashes after I pasted some Elisp code in a buffer,
as soon as I start to modify the text.

[-- Attachment #2: emacs-crash-bt3.txt --]
[-- Type: text/plain, Size: 6603 bytes --]

Reading symbols from ./emacs...
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = :0
TERM = xterm-256color
Breakpoint 1 at 0x4307dd: file emacs.c, line 442.
Breakpoint 2 at 0x558f40: file xterm.c, line 26964.
(gdb) run
Starting program: ~/installs/emacs/src/emacs --no-site-lisp --no-site-file --no-splash
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe62006c0 (LWP 11466)]
[New Thread 0x7fffe58006c0 (LWP 11467)]
[New Thread 0x7fffe4e006c0 (LWP 11468)]
[New Thread 0x7fffdfe006c0 (LWP 11469)]
[New Thread 0x7fffdf4006c0 (LWP 11470)]
[New Thread 0x7fffdea006c0 (LWP 11471)]
[Thread 0x7fffdea006c0 (LWP 11471) exited]
[New Thread 0x7fffdea006c0 (LWP 11472)]
[New Thread 0x7fffde0006c0 (LWP 11473)]
[Thread 0x7fffdea006c0 (LWP 11472) exited]
[New Thread 0x7fffdea006c0 (LWP 11474)]
[New Thread 0x7fffdd6006c0 (LWP 11475)]
[Thread 0x7fffde0006c0 (LWP 11473) exited]
[Thread 0x7fffdea006c0 (LWP 11474) exited]
[Thread 0x7fffdd6006c0 (LWP 11475) exited]
[Detaching after vfork from child process 11476]
[Detaching after vfork from child process 11477]
[Detaching after vfork from child process 11478]
[Detaching after vfork from child process 11479]
[Detaching after vfork from child process 11480]
[Detaching after vfork from child process 11481]
[Detaching after vfork from child process 11482]
[Detaching after vfork from child process 11483]
[Detaching after vfork from child process 11484]
[Detaching after vfork from child process 11485]
[Detaching after vfork from child process 11486]
[Detaching after vfork from child process 11487]
[Detaching after vfork from child process 11488]
[Detaching after vfork from child process 11489]
[Detaching after vfork from child process 11490]
[Detaching after vfork from child process 11491]
[Detaching after vfork from child process 11492]
[Detaching after vfork from child process 11493]
[Detaching after vfork from child process 11494]
[Detaching after vfork from child process 11495]
[Detaching after vfork from child process 11506]
[Detaching after vfork from child process 11507]
[Detaching after vfork from child process 11508]
[Detaching after vfork from child process 11509]
[Detaching after vfork from child process 11520]
[Detaching after vfork from child process 11521]
[Detaching after vfork from child process 11522]
[Detaching after vfork from child process 11523]
[Detaching after vfork from child process 11524]
[Detaching after vfork from child process 11525]
[Detaching after vfork from child process 11526]
[Detaching after vfork from child process 11527]
[Detaching after vfork from child process 11528]
[Thread 0x7fffdf4006c0 (LWP 11470) exited]

xdisp.c:21778: Emacs fatal error: assertion failed: w->window_end_valid

Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647)
    at emacs.c:442
442       signal (sig, SIG_DFL);
(gdb) bt
#0  terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at emacs.c:442
#1  0x0000000000436698 in die
    (msg=msg@entry=0x717fce "w->window_end_valid", file=file@entry=0x717900 "xdisp.c", line=line@entry=21778) at alloc.c:8061
#2  0x0000000000427006 in find_first_unchanged_at_end_row (delta_bytes=<synthetic pointer>, delta=<synthetic pointer>, w=0x1065950)
    at xdisp.c:21778
#3  try_window_id (w=w@entry=0x1065950) at xdisp.c:22342
#4  0x00000000004c2dad in redisplay_window (window=<optimized out>, just_this_one_p=just_this_one_p@entry=true) at xdisp.c:20433
#5  0x00000000004c563e in redisplay_window_1 (window=window@entry=XIL(0x1065955)) at xdisp.c:18019
#6  0x000000000063ce94 in internal_condition_case_1
    (bfun=bfun@entry=0x4c5610 <redisplay_window_1>, arg=XIL(0x1065955), handlers=<optimized out>, hfun=hfun@entry=0x46c9c0 <redisplay_window_error>) at eval.c:1561
#7  0x00000000004ab203 in redisplay_internal () at xdisp.c:17508
#8  0x00000000004ad01d in redisplay_preserve_echo_area (from_where=from_where@entry=8) at xdisp.c:17743
#9  0x00000000005ad54e in detect_input_pending_run_timers (do_display=do_display@entry=true) at keyboard.c:11553
#10 0x000000000069aba5 in wait_reading_process_output
    (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:5839
#11 0x0000000000456f71 in sit_for (timeout=<optimized out>, reading=reading@entry=true, display_option=display_option@entry=1)
    at dispnew.c:6317
#12 0x00000000005b0ce8 in read_char
    (commandflag=1, map=map@entry=XIL(0x1dde483), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x7fffffffdbeb, end_time=end_time@entry=0x0) at keyboard.c:2930
#13 0x00000000005b11ec in read_key_sequence
    (keybuf=keybuf@entry=0x7fffffffdd30, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, disable_text_conversion_p=false) at keyboard.c:10706
#14 0x00000000005b3639 in command_loop_1 () at keyboard.c:1427
#15 0x000000000063cde7 in internal_condition_case
    (bfun=bfun@entry=0x5b33f0 <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5a6d50 <cmd_error>)
--Type <RET> for more, q to quit, c to continue without paging--
    at eval.c:1537
#16 0x000000000059d2da in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1166
#17 0x000000000063cc81 in internal_catch
    (tag=tag@entry=XIL(0x10830), func=func@entry=0x59d2c0 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1217
#18 0x000000000059d27f in command_loop () at keyboard.c:1144
#19 0x00000000005a6873 in recursive_edit_1 () at keyboard.c:753
#20 0x00000000005a6bdb in Frecursive_edit () at keyboard.c:836
#21 0x00000000004305f0 in main (argc=<optimized out>, argv=<optimized out>) at emacs.c:2624

Lisp Backtrace:

eval.c:116: Emacs fatal error: assertion failed: pdl->kind == SPECPDL_BACKTRACE

Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647)
    at emacs.c:442
442       signal (sig, SIG_DFL);
The program being debugged stopped while in a function called from GDB.
Evaluation of the expression containing the function
(backtrace_function) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-21  9:58   ` David Ponce
@ 2024-02-21 11:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-21 15:31     ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-21 11:34 UTC (permalink / raw)
  To: David Ponce; +Cc: 69287

David Ponce <da_vid@orange.fr> writes:

> Please, find attached the requested backtrace got from Emacs rebuilt with
> --enable-checking.
> Now Emacs consistently crashes after I pasted some Elisp code in a buffer,
> as soon as I start to modify the text.

This is an unrelated bug, I think.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-21  1:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-21  9:58   ` David Ponce
@ 2024-02-21 12:34   ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2024-02-21 12:34 UTC (permalink / raw)
  To: Po Lu; +Cc: da_vid, 69287

> Cc: 69287@debbugs.gnu.org
> Date: Wed, 21 Feb 2024 09:56:39 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> David Ponce <da_vid@orange.fr> writes:
> 
> > Hello,
> >
> > While working in Emacs, I often paste text from the 'KDE clipboard popup
> > menu at mouse position' into the *scratch* buffer, and sometimes this
> > crashes Emacs, but not systematically.
> >
> > Since a few days I run Emacs under GDB, and I managed to get the
> > attached backtrace.
> >
> > Please, eventually let me know how I can help to get more useful details
> > when another crash will happen.
> >
> > Thanks.
> 
> I suspect invalid Lisp objects are being recorded into one of several
> lists that hold temporary data during selection conversion.  Please
> build Emacs with --enable-checking and post a backtrace from there.

But the second backtrace posted by David is unrelated to selections.
It is still in GC, but that GC was invoked from funcall, not from
selection-related code.

So it sounds like some invalid object is indeed created, but not
necessarily during selection conversion.  Unfortunately, debugging GC
crashes is not easy; see etc/DEBUG for some guidance.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-21  9:58   ` David Ponce
  2024-02-21 11:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-21 15:31     ` Eli Zaretskii
  2024-02-22  9:14       ` David Ponce
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-02-21 15:31 UTC (permalink / raw)
  To: David Ponce; +Cc: luangruo, 69287

> Cc: 69287@debbugs.gnu.org
> Date: Wed, 21 Feb 2024 10:58:47 +0100
> From: David Ponce <da_vid@orange.fr>
> 
> xdisp.c:21778: Emacs fatal error: assertion failed: w->window_end_valid
> 
> Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647)
>     at emacs.c:442
> 442       signal (sig, SIG_DFL);
> (gdb) bt
> #0  terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at emacs.c:442
> #1  0x0000000000436698 in die
>     (msg=msg@entry=0x717fce "w->window_end_valid", file=file@entry=0x717900 "xdisp.c", line=line@entry=21778) at alloc.c:8061
> #2  0x0000000000427006 in find_first_unchanged_at_end_row (delta_bytes=<synthetic pointer>, delta=<synthetic pointer>, w=0x1065950)
>     at xdisp.c:21778
> #3  try_window_id (w=w@entry=0x1065950) at xdisp.c:22342
> #4  0x00000000004c2dad in redisplay_window (window=<optimized out>, just_this_one_p=just_this_one_p@entry=true) at xdisp.c:20433
> #5  0x00000000004c563e in redisplay_window_1 (window=window@entry=XIL(0x1065955)) at xdisp.c:18019

Do you have some optional feature enabled that resizes the mini-window
at random points in time?  Like some optional completion package that
sinerts a lot of stuff into the mini-window and thus causes it to
resize?

IOW, we need a reproducible recipe for debugging this assertion
violation.  If you can trigger this from "emacs -Q", it would be even
better.

However, please note that this is assertion violation has nothing
apparent to do with the previous crashes, which were inside GC.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
  2024-02-21 15:31     ` Eli Zaretskii
@ 2024-02-22  9:14       ` David Ponce
  0 siblings, 0 replies; 8+ messages in thread
From: David Ponce @ 2024-02-22  9:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, 69287

On 21/02/2024 16:31, Eli Zaretskii wrote:
>> Cc: 69287@debbugs.gnu.org
>> Date: Wed, 21 Feb 2024 10:58:47 +0100
>> From: David Ponce <da_vid@orange.fr>
>>
>> xdisp.c:21778: Emacs fatal error: assertion failed: w->window_end_valid
>>
>> Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647)
>>      at emacs.c:442
>> 442       signal (sig, SIG_DFL);
>> (gdb) bt
>> #0  terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at emacs.c:442
>> #1  0x0000000000436698 in die
>>      (msg=msg@entry=0x717fce "w->window_end_valid", file=file@entry=0x717900 "xdisp.c", line=line@entry=21778) at alloc.c:8061
>> #2  0x0000000000427006 in find_first_unchanged_at_end_row (delta_bytes=<synthetic pointer>, delta=<synthetic pointer>, w=0x1065950)
>>      at xdisp.c:21778
>> #3  try_window_id (w=w@entry=0x1065950) at xdisp.c:22342
>> #4  0x00000000004c2dad in redisplay_window (window=<optimized out>, just_this_one_p=just_this_one_p@entry=true) at xdisp.c:20433
>> #5  0x00000000004c563e in redisplay_window_1 (window=window@entry=XIL(0x1065955)) at xdisp.c:18019
> 
> Do you have some optional feature enabled that resizes the mini-window
> at random points in time?  Like some optional completion package that
> sinerts a lot of stuff into the mini-window and thus causes it to
> resize?

No.  However I use my own library that provides tabs in the tab-line
(kind of alternative implementation of tab-line.el), and I noticed that
the "assertion failed: w->window_end_valid" only occurs when the tab-line
is used (globally set).  My tab-line extensively uses text properties:
display (images, space), help-echo and keymap, plus some other specific
properties.

> 
> IOW, we need a reproducible recipe for debugging this assertion
> violation.  If you can trigger this from "emacs -Q", it would be even
> better.

I am trying to get a reproducible recipe as simple as possible from
"emacs -Q".  I will post news here, if I manage to get something
interesting.
  
> 
> However, please note that this is assertion violation has nothing
> apparent to do with the previous crashes, which were inside GC.

I agree.  Unfortunately this display issue prevent me to go further
with the previous crash in GC.

Thanks






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-22  9:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20 14:59 bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs David Ponce
2024-02-20 16:22 ` David Ponce
2024-02-21  1:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-21  9:58   ` David Ponce
2024-02-21 11:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-21 15:31     ` Eli Zaretskii
2024-02-22  9:14       ` David Ponce
2024-02-21 12:34   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).