GNOME Bugzilla – Bug 749001
Port to webkit2
Last modified: 2017-08-25 04:24:55 UTC
Empathy's webkit usage should be ported to use WebKit2. The coolest thing about this would be free hidpi support. This might turn into a GNOME Goal too: https://wiki.gnome.org/Initiatives/GnomeGoals/Webkit2Porting
Created attachment 302964 [details] [review] super super early patch I've actually already kind of worked on this. I wanted to see how hard it would be. I got something working (https://jonnylamb.com/uploads/empathyhidpi.png) and then got distracted. Here's the super early patch which only just compiles and has loads of stuff missing so if anyone wants to get going on this, there's a start.
We should (finally) branch off gnome-3-12 before landing this.
(In reply to Debarshi Ray from comment #2) > We should (finally) branch off gnome-3-12 before landing this. Indeed. Jonny got this off to a great start, but looking this over, I estimate it will require another week of developer time, maybe more if it's an internship.
https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/thread/S3VHBCPMPVZ3NBKR7FQZQE6HBUHVEZ3D/ Looks like security issues with webkitgtk-3.0 are starting to accumulate.
dropping this bug. not gonna happen
Would be good to make it a 3.22 target. I fully intend to retire all GNOME modules stuck on WebKit1 by then, and I don't want Empathy to be one of them.
well, you have to find somebody willing to work on empathy then...
Created attachment 323195 [details] [review] WIP patch This is not finished yet. There are some parts of the code that I don't even know what they are for, and I haven't been able to figure it out, and some others that I haven't had time to look at yet. The main functionality works, though, but I'm not an empathy user so I don't really know if there are regressions I haven't noticed. I'll finish this if I find the time, it would help me if someone could look at the FIXMEs in the patch and explain what those parts of the code are for.
I tried the patch. Trying to open "Previous conversations" results in a crash: Gtk:ERROR:gtknotebook.c:1364:gtk_notebook_buildable_add_child: assertion failed: (page != NULL) Thread 1 "empathy" received signal SIGABRT, Aborted. 0x00007ffff4b9a2a8 in raise () from /usr/lib/libc.so.6 (gdb) bt
+ Trace 236030
Wow, thanks Carlos! (In reply to Hussam Al-Tayeb from comment #9) > I tried the patch. > Trying to open "Previous conversations" results in a crash: > Gtk:ERROR:gtknotebook.c:1364:gtk_notebook_buildable_add_child: assertion > failed: (page != NULL) > > Thread 1 "empathy" received signal SIGABRT, Aborted. > 0x00007ffff4b9a2a8 in raise () from /usr/lib/libc.so.6 > (gdb) bt I get this too. I was only able to test the main binary (the user list), though; at one point in the past I knew how to run jhbuild-versions of empathy-chat and empathy-call, but I couldn't immediately figure it out to day. I think I might have hacked the source code manually to get it to work in the past.
It was working for me, but I'm getting the same now, after a clean build and make install. I guess I messed up the ui file.
Created attachment 323239 [details] [review] WIP patch Yes, the changes I did in the ui file didn't have any effect here because I didn't run make install. I've undo the changes and now it works again. Someone who understands ui files should remove that scrolled window from the notebook, though.
To test the chat, ensure you run first the empathy-chat binary from your jhbuild or src dir and that you have killed any instance already running before, and then run empathy. Maybe this is obvious for people involved in empathy, but it took me a while to realize it.
previous conversations works now. I compiled, packaged, and installed to /usr. jabber chat and irc chat still work fine. I can't test voice/video calls. I will watch for regressions. There is an empathy issue that's always been there. Closing all chat windows/rooms does not close empathy-chat process.
I have been running this patch for over a month now. I occasionally get a crash once every few days. Today empathy-chat crashed when I was typing /join ... coredumpctl info 1149 PID: 1149 (empathy-chat) UID: 1000 (hussam) GID: 100 (users) Signal: 11 (SEGV) Timestamp: Fri 2016-04-15 14:53:49 EEST (1min 35s ago) Command Line: /usr/lib/empathy/empathy-chat Executable: /usr/lib/empathy/empathy-chat Control Group: /user.slice/user-1000.slice/user@1000.service/dbus.service Unit: user@1000.service User Unit: user@1000.service Slice: user-1000.slice Owner UID: 1000 (hussam) Boot ID: 8ac40384d07f4d5c9450762b85413b35 Machine ID: efb490e643e2436d9d1138df1745a008 Hostname: hades Message: Process 1149 (empathy-chat) of user 1000 dumped core. Stack trace of thread 1149: #0 0x00007f513a2b9300 g_source_callback_ref (libglib-2.0.so.0) #1 0x00007f513a2bcd58 g_main_dispatch (libglib-2.0.so.0) #2 0x00007f513a2bd160 g_main_context_iterate (libglib-2.0.so.0) #3 0x00007f513a2bd20c g_main_context_iteration (libglib-2.0.so.0) #4 0x00007f513ada5afd g_application_run (libgio-2.0.so.0) #5 0x000000000040a9a7 main (empathy-chat) #6 0x00007f5139ac3710 __libc_start_main (libc.so.6) #7 0x000000000040aaa9 _start (empathy-chat) Stack trace of thread 1150: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd20c g_main_context_iteration (libglib-2.0.so.0) #3 0x00007f512220743d n/a (libdconfsettings.so) #4 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1151: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd20c g_main_context_iteration (libglib-2.0.so.0) #3 0x00007f513a2bd249 glib_worker_main (libglib-2.0.so.0) #4 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1152: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f513addc6d6 gdbus_shared_thread_func (libgio-2.0.so.0) #4 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1154: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 23783: #0 0x00007f5139e5477d __nanosleep (libpthread.so.0) #1 0x00007f512e0a86cc _ZN7bmalloc4Heap8scavengeERSt11unique_lockINS_11StaticMutexEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE (libjavascriptcoregtk-4.0.so.18) #2 0x00007f512e0a875f _ZN7bmalloc4Heap18concurrentScavengeEv (libjavascriptcoregtk-4.0.so.18) #3 0x00007f512e0a9f6e _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE13threadRunLoopEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f5129f89c50 execute_native_thread_routine (libstdc++.so.6) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1340: #0 0x00007f5139e5103f pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0) #1 0x00007f5129f847fc __gthread_cond_wait (libstdc++.so.6) #2 0x00007f512e070430 _ZN3WTF10ParkingLot17parkConditionallyEPKvSt8functionIFbvEES3_IFvvEENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIlSt5ratioILl1 #3 0x00007f512e06f24b _ZN3WTF18ParallelHelperPool21waitForClientWithTaskERKNS_6LockerINS_8LockBaseEEE (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e06f337 _ZN3WTF18ParallelHelperPool16helperThreadBodyEv (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1165: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1171: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #2 0x00007f512e0a875f _ZN7bmalloc4Heap18concurrentScavengeEv (libjavascriptcoregtk-4.0.so.18) #3 0x00007f512e0a9f6e _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE13threadRunLoopEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f5129f89c50 execute_native_thread_routine (libstdc++.so.6) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1340: #0 0x00007f5139e5103f pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0) #1 0x00007f5129f847fc __gthread_cond_wait (libstdc++.so.6) #2 0x00007f512e070430 _ZN3WTF10ParkingLot17parkConditionallyEPKvSt8functionIFbvEES3_IFvvEENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIlSt5ratioILl1 #3 0x00007f512e06f24b _ZN3WTF18ParallelHelperPool21waitForClientWithTaskERKNS_6LockerINS_8LockBaseEEE (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e06f337 _ZN3WTF18ParallelHelperPool16helperThreadBodyEv (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1165: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1171: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1196: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f50c217f3d7 n/a (libedataserver-1.2.so.21) #4 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1199: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f50c0dda2a3 n/a (libebook-1.2.so.16) #4 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f5139e4b424 start_thread (libpthread.so.0) #6 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 23865: #0 0x00007f5139b7dcd7 access (libc.so.6) #1 0x00007f513a2a9067 g_file_test (libglib-2.0.so.0) #2 0x00007f513b27ef23 gtk_im_context_simple_init_compose_table (libgtk-3.so.0) #3 0x00007f513ad8012d g_task_thread_pool_thread (libgio-2.0.so.0) #4 0x00007f513a2e430e g_thread_pool_thread_proxy (libglib-2.0.so.0) #5 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #6 0x00007f5139e4b424 start_thread (libpthread.so.0) #7 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 23866: #0 0x00007f5139b7dcd7 access (libc.so.6) #1 0x00007f513a2a9067 g_file_test (libglib-2.0.so.0) #2 0x00007f513b27ef23 gtk_im_context_simple_init_compose_table (libgtk-3.so.0) #3 0x00007f513ad8012d g_task_thread_pool_thread (libgio-2.0.so.0) #4 0x00007f513a2e430e g_thread_pool_thread_proxy (libglib-2.0.so.0) #5 0x00007f513a2e3975 g_thread_proxy (libglib-2.0.so.0) #6 0x00007f5139e4b424 start_thread (libpthread.so.0) #7 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1156: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6) Stack trace of thread 1155: #0 0x00007f5139b81c6d poll (libc.so.6) #1 0x00007f513a2bd0fc g_main_context_poll (libglib-2.0.so.0) #2 0x00007f513a2bd482 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f512e0a2ed0 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18) #4 0x00007f512e0a339e n/a (libjavascriptcoregtk-4.0.so.18) #5 0x00007f512e0731e5 n/a (libjavascriptcoregtk-4.0.so.18) #6 0x00007f512e0a0a0a n/a (libjavascriptcoregtk-4.0.so.18) #7 0x00007f5139e4b424 start_thread (libpthread.so.0) #8 0x00007f5139b8aced __clone (libc.so.6)
(In reply to Hussam Al-Tayeb from comment #15) > I have been running this patch for over a month now. > I occasionally get a crash once every few days. Today empathy-chat crashed > when I was typing /join ... Good thing you're using coredumpctl, so you probably still have the core dump. There's not much to go on from that backtrace, so if you compiled with -g, then it would be helpful to post a full backtrace of the crashing thread: $ coredumpctl gdb 1149 (gdb) bt full
(In reply to Michael Catanzaro from comment #16) > (In reply to Hussam Al-Tayeb from comment #15) > > I have been running this patch for over a month now. > > I occasionally get a crash once every few days. Today empathy-chat crashed > > when I was typing /join ... > > Good thing you're using coredumpctl, so you probably still have the core > dump. There's not much to go on from that backtrace, so if you compiled with > -g, then it would be helpful to post a full backtrace of the crashing thread: > > $ coredumpctl gdb 1149 > (gdb) bt full I'll recompile with -g and wait till it crashes again :)
It just crashed again. Sorry for the delay. It was behaving till today :D (gdb) bt full
+ Trace 236201
Would it be possible if time permits to get an updated patch that works with empathy HEAD? Thank you :)
It says: /home/hussam/cache/empathy/trunk/empathy/libempathy-gtk/.libs/libempathy-gtk.so: undefined reference to `webkit_web_view_execute_script'
I found an issue. Inactive tabs don't automatically scroll down when there are new messages.
Created attachment 344283 [details] [review] WIP patch v4 I rebased Carlos Garcia Campos's patch for the current git master.
I know Hussam has found an awful lot of problems with this patch, but if we don't commit it we're soon going to have no Empathy at all; I talked to the package maintainer this week and we're planning to remove WebKit1 from Fedora in March. So I'm going to push this now. Help welcome fixing the fallout.
(Also: thanks György ;) I'm not going to test this at all because Empathy doesn't work in JHBuild, and I don't want to spend any time fighting it. To fix that we have to land the changes on the wip/gbsneto/ui-refresh, which is the first step to fixing this multi-executable madness and will make the chat portion of the UI work in JHBuild.
Oh dear, just tried 3.25....absolutely unusable. If nobody can make it work, simply deprecate it. People will use something else. Anything better than using broken piece of software.
Would it make sense to try and get empathy to build in flatpak instead of JHBuild? Also is this actually "fixed?"
Yes, of course it's been fixed for a while now. It just hadn't been released until now. If you don't want the single-window UI, you could backport the WebKit commits to the gnome-3-12 branch and do another release there. I'm happy to tutor anyone who wants to look after Empathy. I'm not sure how easy it would be to make Empathy work as a Flatpak. The problem is Telepathy. The Flatpak is going to be broken if Telepathy is not present and working on the host, which defeats the purpose of using Flatpak. I don't think bundling Telepathy inside the Flatpak would work. At least it would require some effort.
Oh right dbus. I was just thinking about dealing with building empathy and dealing with library dependencies. Thank you for releasing the version with the fix. I'm trying to build it now. When do the deprecations need to be cleaned up? Empathy is still using GValueArray and g_simple_async
(In reply to Diane Trout from comment #28) > When do the deprecations need to be cleaned up? Never! But it'd be good to do. Or build with -Wno-deprecated-declarations to make it easier to see the real warnings.
:) ok Also I went and tested a bit: I was able to build empathy 3.25.90 (plus a few translation updates commit 24708b78) Is there a sort order for contacts? (I'm not sure I can see an intentional order) I was able to chat with a friend, browse my contact list, Connect to an XMPP room and have the room contact list rendered In the conference room the expand arrow (for when the room description is longer than the window) doesn't expand until the window loses focus. It does collapse when I hit the button though. When I was trying to run wayland I discovered the quick response box that pops up under the notification bar wouldn't let me enter text. I'll need to test that when I have a chance to reboot. I have a wish list, where should I go to see they're reasonable ideas and maybe try to implement a few of them. * Should there contact list have filters? (Recent conversations, online contacts, all contacts?) * Should there be a way to hide the contact list? * Should there be a contact search box? and if so where would it go? * Should there be a way to add a room to the contact list? * I also miss being able to shrink the contact list to a single line. * Occasionally a friend puts a URL into their status and it'd be helpful for the contact detail popup to stay in one place to actually hit the link. Also if you ever connect empathy to a room based service like IRC, XMPP MUCs or things like slack it might be nice to have a tree or list view of open chats instead of just the tab view.
(In reply to Diane Trout from comment #30) > I have a wish list, where should I go to see they're reasonable ideas and > maybe try to implement a few of them. New bug reports. ;) Be sure to CC me if you have patches as I'm not watching Empathy bugs.
(In reply to Michael Catanzaro from comment #27) > I'm not sure how easy it would be to make Empathy work as a Flatpak. The > problem is Telepathy. The Flatpak is going to be broken if Telepathy is not > present and working on the host, which defeats the purpose of using Flatpak. > I don't think bundling Telepathy inside the Flatpak would work. At least it > would require some effort. There is prior art. Florian managed to bundle the necessary Telepathy bits in the Polari Flatpak.
We had to blacklist the Polari Flatpak from Endless because it was broken, since we don't have Telepathy in the host OS. So unless Florian's changes are recent, I'm skeptical of that.
Also, will it work if another Flatpak app that has bundled Telepathy is running at the same time? All the bus names are going to need to be patched to be unique to each app, right?
(In reply to Michael Catanzaro from comment #33) > We had to blacklist the Polari Flatpak from Endless because it was broken, > since we don't have Telepathy in the host OS. So unless Florian's changes > are recent, I'm skeptical of that. I know. This is more recent. :)
More tests. The good news is the quick response box did work in wayland. However it seems like occasionally a chat window doesn't initialize with the received message / previous history.
I added a flatpak bug for Empathy as Bug #786783 if people interested in flatpak want to watch or comment over there.