unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Ponce <da_vid@orange.fr>
To: Po Lu <luangruo@yahoo.com>
Cc: 69287@debbugs.gnu.org
Subject: bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs
Date: Wed, 21 Feb 2024 10:58:47 +0100	[thread overview]
Message-ID: <ff8f6827-34a6-4c25-ac46-7e6883b14bd0@orange.fr> (raw)
In-Reply-To: <87bk8a8trc.fsf@yahoo.com>

[-- 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)

  reply	other threads:[~2024-02-21  9:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff8f6827-34a6-4c25-ac46-7e6883b14bd0@orange.fr \
    --to=da_vid@orange.fr \
    --cc=69287@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).