CristianHenzel / ClipIt

ClipIt clipboard manager for GTK+
https://github.com/CristianHenzel/ClipIt
GNU General Public License v3.0
652 stars 83 forks source link

Crash after upgrade to Fedora 34 #190

Open szpak opened 3 years ago

szpak commented 3 years ago

I upgraded Fedora from 33 and 34 (with Gnome Shell 40 using Xorg) and ClipIt stopped working. My shortcut to show clipboard entries history doesn't show the dialog and when I manually call "Preferences" and seems to "freeze" and crashes after while.

With gdb I was able to receive the following output (however, it freezes the whole Gnome Shell and eventually I had to also to kill gdb to bring it to life):

Thread 1 "clipit" received signal SIGSEGV, Segmentation fault. 0x00007ffff79b045e in gtk_label_set_attributes () from /lib64/libgtk-3.so.0

clipit-1.4.5-2.fc34.x86_64 from the Fedora repository.

szpak commented 3 years ago

I've been able to get more details about the crash:

systemd-coredump[21824]: [🡕] Process 21803 (clipit) of user 1000 dumped core.

       Stack trace of thread 21803:
       #0  0x00007f0a1da0845e gtk_label_set_attributes (libgtk-3.so.0 + 0x23645e)
       #1  0x000055b80ff99aa8 menu_key_pressed (clipit + 0xaaa8)
       #2  0x00007f0a1dbb9d17 _gtk_marshal_BOOLEAN__BOXED (libgtk-3.so.0 + 0x3e7d17)
       #3  0x00007f0a1d631c2f g_closure_invoke (libgobject-2.0.so.0 + 0x13c2f)
       #4  0x00007f0a1d64dea6 signal_emit_unlocked_R (libgobject-2.0.so.0 + 0x2fea6)
       #5  0x00007f0a1d64f2de g_signal_emit_valist (libgobject-2.0.so.0 + 0x312de)
       #6  0x00007f0a1d64f983 g_signal_emit (libgobject-2.0.so.0 + 0x31983)
       #7  0x00007f0a1db80904 gtk_widget_event_internal.part.0.lto_priv.0 (libgtk-3.so.0 + 0x3ae904)
       #8  0x00007f0a1da23d61 propagate_event.lto_priv.0 (libgtk-3.so.0 + 0x251d61)
       #9  0x00007f0a1da24b8a gtk_main_do_event (libgtk-3.so.0 + 0x252b8a)
       #10 0x00007f0a1d7067d3 _gdk_event_emit (libgdk-3.so.0 + 0x397d3)
       #11 0x00007f0a1d73dc16 gdk_event_source_dispatch.lto_priv.0.lto_priv.0 (libgdk-3.so.0 + 0x70c16)
       #12 0x00007f0a1d5394cf g_main_context_dispatch (libglib-2.0.so.0 + 0x554cf)
       #13 0x00007f0a1d58d4e8 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xa94e8)
       #14 0x00007f0a1d538a93 g_main_loop_run (libglib-2.0.so.0 + 0x54a93)
       #15 0x00007f0a1da1ae1d gtk_main (libgtk-3.so.0 + 0x248e1d)
       #16 0x000055b80ff97dc1 main (clipit + 0x8dc1)
       #17 0x00007f0a1d1f2b75 __libc_start_main (libc.so.6 + 0x27b75)
       #18 0x000055b80ff985ce _start (clipit + 0x95ce)

       Stack trace of thread 21804:
       #0  0x00007f0a1d2c05bf __poll (libc.so.6 + 0xf55bf)
       #1  0x00007f0a1d58d47c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xa947c)
       #2  0x00007f0a1d536c03 g_main_context_iteration (libglib-2.0.so.0 + 0x52c03)
       #3  0x00007f0a1d536c51 glib_worker_main (libglib-2.0.so.0 + 0x52c51)
       #4  0x00007f0a1d567c32 g_thread_proxy (libglib-2.0.so.0 + 0x83c32)
       #5  0x00007f0a1c92d299 start_thread (libpthread.so.0 + 0x9299)
       #6  0x00007f0a1d2cb353 __clone (libc.so.6 + 0x100353)

       Stack trace of thread 21805:
       #0  0x00007f0a1d2c05bf __poll (libc.so.6 + 0xf55bf)
       #1  0x00007f0a1d58d47c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xa947c)
       #2  0x00007f0a1d538a93 g_main_loop_run (libglib-2.0.so.0 + 0x54a93)
       #3  0x00007f0a1cd98d6a gdbus_shared_thread_func.lto_priv.0 (libgio-2.0.so.0 + 0x110d6a)
       #4  0x00007f0a1d567c32 g_thread_proxy (libglib-2.0.so.0 + 0x83c32)
       #5  0x00007f0a1c92d299 start_thread (libpthread.so.0 + 0x9299)
       #6  0x00007f0a1d2cb353 __clone (libc.so.6 + 0x100353)

(I could install debug packages if needed, but gtk_label_set_attributes seems to be a direct culprit).

It might be similar to #151.

szpak commented 3 years ago

I patched 1.4.5 available in Fedora with #170 and it is (somehow) better. The app doesn't crash, but I have to press the shortcut to show the clipboard history twice in quite short period of time to have that menu shown. In addition, if I try to open "Preferences" after that operation the menu "silhouette" is drawn in the top left window corner: image

and the preference dialog is not displayed at all (that works if I call Preferences before using the clipboard history shortcut).

@jgidi Does ClipIt work for you correctly? Maybe you have any idea what else could be wrong?

araujorm commented 3 years ago

Same here. Is this app dead?

mtasaka commented 3 years ago

So Fedora 33 clipit-1.4.4-8.fc33 seems to work for shortcut ctrl-Alt-H , which is compiled with gtk2, and clipit 1.4.4 does not compile with gtk3.
On the other hand, with Fedora 34 clipit-1.4.5-2.fc34 shortcut ctrl-Alt-H does not seem to work, perhaps as same as #191 , which is compiled with gtk3, and clipit 1.4.5 does not compile with gtk2.

I tried applying the very minimum modification for clipit 1.4.4 to compile with gtk3, and then clipit 1.4.4 + gtk3 sees the same issue (i.e. shortcut ctrl-Alt-H does not work and see the same issue:

if I try to open "Preferences" after that operation the menu "silhouette" is drawn in the top left window corner:

)

So basically at least from 1.4.4, shortcut ctrl-Alt-H does not work with gtk3.

jgidi commented 3 years ago

Hi @szpak, sorry for the late response.

I can confirm that clipit built from the git source with gtk 3.24.30-2 works with no problems in Arch since I use it in a daily basis, but the version on the Arch User Repos (clipit 1.4.5-3) is out-of-date and crashes.

Are you building clipit from this repo's source or patching the repo from Fedora?

szpak commented 3 years ago

Thanks for you response @jgidi !

Are you building clipit from this repo's source or patching the repo from Fedora?

I patched the previous tarball used in Fedora. As master works for your on Arch, I will try build it completely from source code version in Git.

szpak commented 3 years ago

I built a version from master and it works without any problems on my Fedora 34. Thanks @jgidi for your suggestion!

@afelinczak @CristianHenzel Maybe you could release 1.4.6 as is (to make it easier to make the ClipIt packages in various Linux distributions usable with Gnome Shell 40 without packaging them from Git)?

mtasaka commented 3 years ago

Well, for ctrl-Alt-H issue with 1.4.5, I've also noticed that increasing POPUP_DELAY value seems to workaround this issue, and it seems that on clipit git this change was introduced somehow "silently"? #145

(I don't know that "tested with ppa" means exactly)

However as I don't know exactly why this POPUP_DELAY value increment workarounds the issue, so I hesitated to bring this to Fedora package, but as clipit git head already did so...