Subject: Re: bug#54629: 29.0.50; Emacs crashes when I try to move scroll bar by grabbing it with mouse

From: Eric Spero <[email-masked]>
Date: Tue, 29 Mar 2022 22:25:21 -0400

Ok, here are the steps I took.

1. gdb /usr/bin/emacs
2. run -Q
3. [try to pull scroll bar down]
4. bt

gdb produced a bit output after I tried to pull the scroll bar down, starting at "Fatal error 6: Aborted".

Please let me know if I've done anything wrong, or if there is anything else I can provide.

Eric

++++++

es@gentoo ~ $ gdb /usr/bin/emacs
GNU gdb (Gentoo 11.2 vanilla) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/emacs...
(No debugging symbols found in /usr/bin/emacs)
(gdb) run -Q
Starting program: /usr/bin/emacs -Q
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffeb7d7640 (LWP 16506)]
[New Thread 0x7fffeafa3640 (LWP 16507)]
[New Thread 0x7fffea792640 (LWP 16508)]
[New Thread 0x7fffe9f7f640 (LWP 16509)]
[New Thread 0x7fffe916c640 (LWP 16521)]
[Thread 0x7fffe916c640 (LWP 16521) exited]
[New Thread 0x7fffe916c640 (LWP 16524)]
[New Thread 0x7fffe896b640 (LWP 16525)]
[Thread 0x7fffe916c640 (LWP 16524) exited]
[New Thread 0x7fffe916c640 (LWP 16555)]
[New Thread 0x7fffd3fff640 (LWP 16558)]
[Thread 0x7fffe896b640 (LWP 16525) exited]
[Thread 0x7fffe916c640 (LWP 16555) exited]
[Thread 0x7fffd3fff640 (LWP 16558) exited]
Fatal error 6: Aborted
Backtrace:
/usr/bin/emacs(emacs_backtrace+0x51)[0x5555556da651]
/usr/bin/emacs(terminate_due_to_signal+0x88)[0x5555555cd72a]
/usr/bin/emacs(+0x79c82)[0x5555555cdc82]
/usr/bin/emacs(+0x169cab)[0x5555556bdcab]
/usr/bin/emacs(+0x16def8)[0x5555556c1ef8]
/usr/bin/emacs(read_char+0x12bb)[0x5555556c890b]
/usr/bin/emacs(+0x176a11)[0x5555556caa11]
/usr/bin/emacs(+0x178713)[0x5555556cc713]
/usr/bin/emacs(internal_condition_case+0x67)[0x555555746317]
/usr/bin/emacs(command_loop_2+0x2e)[0x5555556b80be]
/usr/bin/emacs(internal_catch+0x41)[0x555555746271]
/usr/bin/emacs(+0x164049)[0x5555556b8049]
/usr/bin/emacs(recursive_edit_1+0x7f)[0x5555556bf5ff]
/usr/bin/emacs(Frecursive_edit+0xcb)[0x5555556bf97b]
/usr/bin/emacs(main+0x1b59)[0x5555555d5529]
/lib64/libc.so.6(+0x292fa)[0x7ffff08a72fa]
/lib64/libc.so.6(__libc_start_main+0x78)[0x7ffff08a73a8]
/usr/bin/emacs(_start+0x21)[0x5555555d5a91]

Thread 1 "emacs" received signal SIGABRT, Aborted.
0x00007ffff0908d0c in ?? () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff0908d0c in  () at /lib64/libc.so.6
#1  0x00007ffff08bba62 in raise () at /lib64/libc.so.6
#2  0x00005555555cd757 in terminate_due_to_signal ()
#3  0x00005555555cdc82 in  ()
#4  0x00005555556bdcab in  ()
#5  0x00005555556c1ef8 in  ()
#6  0x00005555556c890b in read_char ()
#7  0x00005555556caa11 in  ()
#8  0x00005555556cc713 in  ()
#9  0x0000555555746317 in internal_condition_case ()
#10 0x00005555556b80be in command_loop_2 ()
#11 0x0000555555746271 in internal_catch ()
#12 0x00005555556b8049 in  ()
#13 0x00005555556bf5ff in recursive_edit_1 ()
#14 0x00005555556bf97b in Frecursive_edit ()
#15 0x00005555555d5529 in main ()
(gdb)

On Wed 30 Mar 2022 at 10:12 AM, Po Lu <[email-masked]> wrote:

> Eric Spero <[email-masked]> writes:
>
>> Hello,
>>
>> No, I use OpenRC unfortunately.
>>
>> And I actually just managed to fix it with the "toolkit-tool-bar" use
>> flag:
>>
>>  + + toolkit-scroll-bars : Use the selected toolkit's scrollbars in
>>  preference to Emacs' own scrollbars
>>
>> I probably should have looked for this before filing the bug report,
>> but perhaps it's a bug nonetheless?
>>
>> Eric
>
> That's odd, since PGTK doesn't support non-toolkit scroll bars at all.
> IOW, that flag should not do anything there.
>
> So please run Emacs under GDB, reproduce the bug, and send the resulting
> backtrace here, like this:
>
>   $ gdb path/to/emacs
>   (gdb) run -Q
>   (gdb) bt