lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.28k stars 161 forks source link

Tilda crashes when opened and switching desktop #348

Closed freekvh closed 3 years ago

freekvh commented 6 years ago

Running on: Solus Mate (fully updated, running on virtualbox) Tilda Version: Tilda 1.4.1

Step 1: Start tilda Step 2: hit f12 to open tilda Step 3: Switch desktop

Error output:

freek@freexv ~ $ tilda 
Tilda has started. Press F12 to pull down the window.

** (tilda:4552): ERROR **: 13:52:47.013: X Error: BadMatch (invalid parameter attributes)
Trace/breakpoint trap
freek@freexv ~ $ 
lanoxx commented 6 years ago

Hi, a backtrace or some additional information where exactly it is crashing would be very useful to debug this issue.

freekvh commented 6 years ago

So how does one go about doing such a thing? I thought I was already pretty 1337 by starting Tilda from a terminal to catch the error messages...

lanoxx commented 6 years ago

On second look, tilda is not actually crashing. It rather receives a BadWindow error from the XServer and it has an error handler registered which then terminates the application. It seems that tilda is trying to make a call to the XServer which is not valid when you are switching to another desktop. Without more information I will not be able to do anything about this.

You could try to disable the "Show tilda on all desktops" option to see if that helps.

Which version of tilda are you using and why desktop environment / window manager?

freekvh commented 6 years ago

Disabling "Show tilda on all desktops" indeed helps.

I also found that it happens when I do ctrl-alt-arrow to change desktop but not when scrolling over the desktop pages.

My desktop environment is Mate 1.20.1 on Solus (up-to-date), tilda version is Tilda 1.4.1. I'm running in VirtualBox 5.2.12.

If you want me to do more, let me know.

bodqhrohro commented 6 years ago

I experience the same error for several months, but without desktops switching. Probably on unwrapping Tilda, or while it's hidden. So I need to run it under gdb or there are some debugging options not presented in manual?

lanoxx commented 6 years ago

If you manually compile tilda you get additional debug output with the --enable-maintainer-flags configure option. Then you can also run it under gdb to see where exactly it is crashing.

bodqhrohro commented 6 years ago

Catched an strace:

poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 1 ([{fd=5, revents=POLLIN}])
read(5, "\1\0\0\0\0\0\0\0", 16)         = 8
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="*\2\3\0\10\0\200\0,\274\254\32\24\0\6\0\7\0\200\0?\1\0\0\6\0\0\0\0\0\0\0"..., iov_len=36}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 36
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\10\20\361\10\0\200\0\0\0*\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 68
recvmsg(4, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="(\2\4\0\7\0\200\0\313\6\0\0\0\0\0\0", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\22\361\0\0\0\0\6\0\340\0\0\0\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(4, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 0 (Timeout)
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLIN}], 3, 0) = 1 ([{fd=5, revents=POLLIN}])
read(5, "\1\0\0\0\0\0\0\0", 16)         = 8
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="*\2\3\0\10\0\200\0008\274\254\32*\2\3\0\10\0\200\0;\274\254\32\24\1\6\0'\0\200\0"..., iov_len=48}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 48
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\10\23\361\10\0\200\0\0\0*\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 140
openat(AT_FDCWD, "/usr/share/X11/XErrorDB", O_RDONLY) = 37
fstat(37, {st_mode=S_IFREG|0644, st_size=42077, ...}) = 0
read(37, "!\n! Copyright 1993, 1995, 1998  "..., 42077) = 42077
close(37)                               = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
getpid()                                = 25372
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2097, ...}) = 0
write(2, "\n** (tilda:25372): \33[1;31mERROR\33"..., 112
** (tilda:25372): ERROR **: 22:18:56.071: X Error: BadMatch (invalid parameter attributes)
) = 112
--- SIGTRAP {si_signo=SIGTRAP, si_code=SI_KERNEL} ---
+++ killed by SIGTRAP +++

If it's too truncated, I'll try to build Tilda from source as you suggested.

bodqhrohro commented 6 years ago

Gotcha!

key_grabber.c: FUNCTION ENTERED: onKeybindingPull
key_grabber.c: FUNCTION ENTERED: pull
(tilda:19346): tilda-DEBUG: 00:40:06.392: pull_up(): MOVED UP
(tilda:19346): tilda-DEBUG: 00:40:06.393: Got KeyRelease!
tilda_window.c: FUNCTION ENTERED: focus_out_event_cb
tilda_window.c: FUNCTION ENTERED: mouse_leave
xerror.c: FUNCTION ENTERED: xerror_handler

(tilda:19346): tilda-ERROR **: 00:40:10.324: X Error: BadMatch (invalid parameter attributes)

Thread 1 "tilda" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff6a57c41 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt
#0  0x00007ffff6a57c41 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ffff6a5a571 in g_log_writer_default () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff6a587de in g_log_structured_array () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff6a5922e in g_log_structured_standard () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x000055555557242c in xerror_handler (d=0x5555555d49b0, e=0x7fffffffdcf0) at src/xerror.c:38
#5  0x00007ffff66980fa in _XError () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#6  0x00007ffff6695067 in  () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#7  0x00007ffff669510d in  () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#8  0x00007ffff6695a25 in _XEventsQueued () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#9  0x00007ffff66877a7 in XPending () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#10 0x00007ffff73e6011 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#11 0x00007ffff6a51e51 in g_main_context_check () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff6a523e0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff6a527d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff78a2e85 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x00005555555626dd in main (argc=1, argv=0x7fffffffe288) at src/tilda.c:863
(gdb)
PatrickPIGNOL commented 4 years ago

same issue 2020-09-02 (september) after last update on manjaro... Launch tilda, type [ F12] key => show tilda window, type again [ F12] key => crash : * ~$ tilda (tilda:9697): dbind-WARNING **: 16:56:27.383: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.a11y.Bus': timed out (service_start_timeout=120000ms) Tilda has started. Press F12 to pull down the window.

(tilda:9697): tilda-ERROR *: 16:56:31.517: X Error: BadMatch (invalid parameter attributes) Trappe pour point d'arrêt et de trace (core dumped) ~$

lanoxx commented 3 years ago

See pull request #434 for additional background.

This issue should be fixed in version 1.5.3 through commit f7d5ffd0381cb3815873efcf15d53ae0c7e16a98.