After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758713 - Evolution cannot start on wayland if the clipboard contains data from terminated applications
Evolution cannot start on wayland if the clipboard contains data from termina...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 758660
Blocks:
 
 
Reported: 2015-11-26 17:20 UTC by Ting-Wei Lan
Modified: 2015-12-01 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
systemd-cat env WAYLAND_DEBUG=1 gnome-session --session gnome-wayland (170.67 KB, text/plain)
2015-12-01 09:55 UTC, Ting-Wei Lan
  Details
wayland: Store requested target on GdkWaylandSelection (2.62 KB, patch)
2015-12-01 14:49 UTC, Carlos Garnacho
committed Details | Review

Description Ting-Wei Lan 2015-11-26 17:20:07 UTC
Software versions:
evolution-3.18.2-1.fc23.x86_64
evolution-ews-3.18.2-1.fc23.x86_64
mutter-3.18.2-1.fc23.x86_64
gnome-shell-3.18.3-1.fc23.x86_64
gpaste-3.18.2-1.fc23.x86_64
gnome-shell-extension-gpaste-3.18.2-1.fc23.noarch

Steps to reproduce:
 1. Run Evolution on Wayland.
 2. Copy text in Evolution.
 3. Terminate Evolution by closing all its windows.
 4. Run Evolution on Wayland again.

Actual results:
Evolution cannot start. It crashes.

Expected results:
Evolution can start normally.

Outputs:
Unknown parameter encountered: "display charset"
Ignoring unknown parameter "display charset"
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
** (evolution:29635): WARNING **: Accelerated compositing is not supported under Wayland displays, disabling.

Backtraces:
Program received signal SIGSEGV, Segmentation fault.
gdk_wayland_selection_request_target (wayland_selection=wayland_selection@entry=0x5555557b5d70, window=window@entry=0x55555578be60 [GdkWaylandWindow], target=0x1f, 
    fd=fd@entry=54) at gdkselection-wayland.c:684
684	  offer->requested_target = target;
(gdb) p offer
$1 = (DataOfferData *) 0x0
(gdb) bt
  • #0 gdk_wayland_selection_request_target
    at gdkselection-wayland.c line 684
  • #1 data_source_send
    at gdkselection-wayland.c line 778
  • #2 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #3 ffi_call
    at ../src/x86/ffi64.c line 525
  • #4 wl_closure_invoke
    at src/connection.c line 945
  • #5 dispatch_event
    at src/wayland-client.c line 1173
  • #6 dispatch_queue
    at src/wayland-client.c line 1348
  • #7 wl_display_dispatch_queue
    at src/wayland-client.c line 1587
  • #8 wl_display_dispatch
    at src/wayland-client.c line 1657
  • #9 _gdk_wayland_display_queue_events
    at gdkeventsource.c line 165
  • #10 gdk_display_get_event
    at gdkdisplay.c line 340
  • #11 gdk_event_source_dispatch
    at gdkeventsource.c line 86
  • #12 g_main_context_dispatch
    at gmain.c line 3154
  • #13 g_main_context_dispatch
    at gmain.c line 3769
  • #14 g_main_context_iterate
    at gmain.c line 3840
  • #15 g_main_loop_run
    at gmain.c line 4034
  • #16 gtk_main
    at gtkmain.c line 1241
  • #17 main
    at main.c line 654

Comment 1 Milan Crha 2015-11-27 06:46:42 UTC
Thanks for a  bug report. I do not see anything directly related in the evolution itself in the crashing backtrace, except of the main(). It can be that the evolution requested content of the clipboard, but it might not be a reason for a crash. There are other issues with the clipboard itself under wayland, filled as bug #758660, thus I'd wait for its fix first.
Comment 2 Carlos Garnacho 2015-11-30 19:36:19 UTC
I've been unable to reproduce this one. I think it's quite weird that we get data_source_send() called early though. That can only mean something is explicitly requesting the clipboard contents that early.

Would it be possible to receive the WAYLAND_DEBUG=1 logs of mutter when evolution runs into this issue?
Comment 3 Ting-Wei Lan 2015-12-01 09:25:56 UTC
It seems it is related to gpaste clipboard manager.
https://github.com/Keruspe/GPaste

It is easy to see this problem when gpaste-daemon is running. I will try WAYLAND_DEBUG=1 later.
Comment 4 Ting-Wei Lan 2015-12-01 09:55:23 UTC
Created attachment 316580 [details]
systemd-cat env WAYLAND_DEBUG=1 gnome-session --session gnome-wayland

I don't know how can I remove messages that are unrelated to evolution, so I attach all gnome-shell messages here.

The command I use is 'journalctl -b _EXE=/usr/bin/gnome-shell _SYSTEMD_SESSION=15'.

Things I did in the session:
 1. Run gnome-wayland session from a virtual terminal.
 2. Type password of the login keyring.
 3. Ignore xdg-user-dir changes.
 4. Type Alt-F2 and xterm to start xterm.
 5. Type 'unset WAYLAND_DEBUG'.
 6. Type 'gedit' to start gedit. Copy text and close it.
 7. Type 'evolution' to start evolution. It didn't crash, so I copied text and closed it.
 8. Type 'evolution' to start evolution. It still didn't crash, so I copied text again and closed it.
 9. Type 'evolution' to start evolution. It crashed.
10. Logout and terminate this session.
Comment 5 Carlos Garnacho 2015-12-01 14:48:36 UTC
If there is clipboard managers on the X11 side, it makes some more sense to me. And I think the patch from bug #758660 should have fixed this crash as well, because the clipboard manager would react to the selection ownership being claimed by evolution on startup, which no longer happens with that patch.

That said, the place where we store the requested target doesn't make much sense, I'm shuffling it around, that should also fix the crash independently of the other patch.
Comment 6 Carlos Garnacho 2015-12-01 14:49:09 UTC
Created attachment 316604 [details] [review]
wayland: Store requested target on GdkWaylandSelection

It doesn't make a lot of sense to have this stored as data offer data,
rather together with the source_targets array, which is what we're
poking here in the end.
Comment 7 Carlos Garnacho 2015-12-01 14:51:32 UTC
Attachment 316604 [details] pushed as 0ad927a - wayland: Store requested target on GdkWaylandSelection
Comment 8 Carlos Garnacho 2015-12-01 14:52:47 UTC
It was GTK+ all along, moving the bug there.