Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy and paste on CLion running in wslg crashes the ap completely #589

Open
rcosnita opened this issue Nov 28, 2021 · 21 comments
Open

Copy and paste on CLion running in wslg crashes the ap completely #589

rcosnita opened this issue Nov 28, 2021 · 21 comments
Labels
bug Something isn't working clipboard-integration Windows clipboard integration

Comments

@rcosnita
Copy link

Environment

Windows build number: Version 10.0.22000.348
Your Distribution version: Ubuntu-20.04
Your WSLg version: 1.0.26

Steps to reproduce

This issue reproduces after a period of time running the Jetbrains CLion app (or any other Java based UI app for that matter). Mainly, once I try to copy and paste things the app crashes immediately.

stderr.log

WSL logs:

pulseaudio.log
weston.log

Versions.txt contains the following content:

WSLg ( x86_64 ): 1.0.26+Branch.main.Sha.26ce2c09b86442f3c7f4f6462f770ed2afa76a25
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 46756d0e77e5c01b5995fbbee6f3ab0db9b30612
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

No crash should occur and copy / paste must work as expected.

Actual behavior

The application crashes and the following log entries appear in the error log:

Errors from xkbcomp are not fatal to the X server
weston: ../libweston/backend-rdp/rdpclip.c:1189: clipboard_data_source_request: Assertion `peerCtx->clipboard_data_request_event_source' failed.
<4>WSLGd: /usr/bin/weston terminated with signal 6.
(EE) failed to read Wayland events: Broken pipe
<4>WSLGd: /mnt/c/Windows/System32/mstsc.exe exited with status 0.
/usr/share/icons/hicolor/scalable/apps/ibus-setup.svg: unrecognized file header 0x3c 0x3f 0x78 0x6d
glamor: 'wl_drm' not supported
Missing Wayland requirements for glamor GBM backend
Failed to initialize glamor, falling back to sw
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error:   Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 569, clipping.
>                   X11 cannot support keycodes above 255.
> Internal error:   Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server
@rcosnita rcosnita added the bug Something isn't working label Nov 28, 2021
@rcosnita
Copy link
Author

FYI: I have just applied https://digitalfortress.tech/debug/what-should-you-do-when-ubuntu-freezes/. Maybe it fixes the issue.

@rcosnita
Copy link
Author

I have just tried to apply the fix mentioned in the above link but the problem still occurs.

@hideyukn88
Copy link
Member

@rcosnita, thanks for trying out WSLg. It looks you are on older WSLg build, would you please upgrade by installing WSL from Store app (from https://www.microsoft.com/en-us/p/windows-subsystem-for-linux-preview/9p9tqf7mrm4r) ? While there are some fixes aren't included in this release, but this release has several key fixes, so it might be worth to try out, thanks!

@hideyukn88 hideyukn88 added the clipboard-integration Windows clipboard integration label Jan 5, 2022
@rcosnita
Copy link
Author

rcosnita commented Jan 5, 2022

After opening the issue I migrated to the latest WSLg version from app store:

C:\Users\raduc>wsl --status
Default Distribution: Ubuntu-20.04
Default Version: 2
WSL version: 0.50.2.0
Kernel version: 5.10.74.3
WSLg version: 1.0.29
Windows version: 10.0.22000.376

The problem is still occuring but at a slower pace. Not sure if this is related to the Ubuntu version or is a more general problem.

@RFHold
Copy link

RFHold commented Feb 24, 2022

Issue also exists in other IDEA IDEs
Microsoft Windows NT 10.0.22000.0
Ubuntu 20.04
WSLg 1.0.26
Kernel 5.10.60.1

pulseaudio.log
stderr.log
weston.log

@rcosnita
Copy link
Author

With WSLg version 1.0.30 the issue still persist but it occurs rarely (maybe once per day). In the previous versions I was hitting this bug once every two - three hours.

@hideyukn88
Copy link
Member

@rcosnita, thanks for update. Do you see any core file created under /mnt/wslg/dumps? if so please share with us, thanks!

@rcosnita
Copy link
Author

rcosnita commented Mar 2, 2022

Not yet. As soon as I manage to reproduce the issue again I will attach the resulting core file.

@rcosnita
Copy link
Author

rcosnita commented Mar 4, 2022

Here is the core dump resulting from WebStorm crashing.

core.zip

Here is the result of wsl status:

C:\Users\raduc>wsl --status
Default Distribution: Ubuntu-20.04
Default Version: 2
WSL version: 0.51.3.0
Kernel version: 5.10.93.2
WSLg version: 1.0.30
Windows version: 10.0.22000.527

@rcosnita
Copy link
Author

rcosnita commented Mar 5, 2022

I managed to reproduce the issue again so I'm attaching the new core dump collected.
core.zip

@hideyukn88
Copy link
Member

@rcosnita, thanks for dump.

#0 0x00007fe197408115 in raise () from /lib/libc.so.6
#1 0x00007fe1973f2555 in abort () from /lib/libc.so.6
#2 0x00007fe1973f2429 in __assert_fail_base.cold () from /lib/libc.so.6
#3 0x00007fe197400806 in __assert_fail () from /lib/libc.so.6
#4 0x00007fe19663c929 in clipboard_client_format_list (context=, formatList=)
at ../libweston/backend-rdp/rdpclip.c:1581
#5 0x00007fe196462355 in cliprdr_server_receive_format_list (header=, header=,
s=0x55a8639d62e0, context=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:620
#6 cliprdr_server_receive_pdu (header=, s=0x55a8639d62e0, context=0x55a8639e5d90)
at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:858
#7 cliprdr_server_read (context=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:1082
#8 cliprdr_server_check_event_handle (context=0x55a8639e5d90)
at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:1349
#9 0x00007fe19645f65e in cliprdr_server_thread (arg=0x55a8639e5d90)
at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:1192
#10 0x00007fe19638ea1c in thread_launcher (arg=0x55a8639d07e0)
at /work/vendor/FreeRDP/winpr/libwinpr/thread/thread.c:316
#11 0x00007fe1972d209a in start_thread () from /lib/libpthread.so.0
#12 0x00007fe1974cb833 in clone () from /lib/libc.so.6

$1 = {base = {resource = 0x0, destroy_signal = {listener_list = {prev = 0x55a8639bfcc8, next = 0x55a863f3fb50}},
mime_types = {size = 24, alloc = 32, data = 0x7fe164000f10}, offer = 0x55a863f3fb40, seat = 0x0, accepted = false,
actions_set = false, set_selection = true, dnd_actions = 0,
current_dnd_action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE,
compositor_action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE,
accept = 0x7fe19663a4b0 <clipboard_data_source_accept>, send = 0x7fe19663cf90 <clipboard_data_source_send>,
cancel = 0x7fe19663ca60 <clipboard_data_source_cancel>}, transfer_event_source = 0x0, defer_event_source = 0x0,
data_contents = {size = 0, alloc = 0, data = 0x0}, context = 0x55a863690810, refcount = 2, data_source_fd = 106,
format_index = 4, state = RDP_CLIPBOARD_SOURCE_FAILED, data_response_fail_count = 0, inflight_write_count = 0,
inflight_data_to_write = 0x0, inflight_data_size = 0, is_data_processed = 0, is_canceled = 0,
client_format_id_table = {13, 1, 0, 0, 49379}}

@linghengqian
Copy link

@rusefillc
Copy link

does not work for me on IDEA (and Eclipse) WLS 2.0.4 wlsg 1.0.58
is this a java issue?

@Wielding
Copy link

I have the same problem running Clion (and other JetBrains IDEs) on Ubuntu. After a long coding session, it eventually crashes the entire window manager upon a copy/paste and kicks me back to the console. I have had to stop using it and move to using VSCode which is a bummer.

@hsuh
Copy link

hsuh commented Jun 10, 2024

I am also having the same issue. on WSL version: 2.1.5.0. Ubuntun. RubyMine 2024.1.2. When I use 'p/P' with ideaVim the IDE crashes

@jhare-rectangle
Copy link

Just for kicks. I use PyCharm in WSL2. I had a functional Ubuntu 20.04 that did not crash. I installed 24.04 and crashes when I use 'p'. So I tried Debian 12. Same problem. I had previously reported this issue to Jetbrains with Ubuntu 22.04 on a different machine.

@sbj0
Copy link

sbj0 commented Oct 28, 2024

Crashes observed when doing y/p (yank/paste) on IntelliJ/IdeaVim with

WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5011

WSL distro: Ubuntu 24.04.1 LTS

@cubimon
Copy link

cubimon commented Nov 12, 2024

I have the same issue

uname -a
Linux OPTCN7181 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

PS C:\Users\me> wsl --version
WSL-Version: 2.3.24.0
Kernelversion: 5.15.153.1-2
WSLg-Version: 1.0.65
MSRDC-Version: 1.2.5620
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.26100.1-240331-1435.ge-release
Windows-Version: 10.0.19045.5011
PS C:\Users\me>

@cubimon
Copy link

cubimon commented Nov 13, 2024

Setting set clipboard=+unnamed in ~/.ideavimrc would be a workaround

@jhare-rectangle
Copy link

Throughout the experience of this bug, I had set clipboard+=unnamed in my .ideavimrc file. But I also had set clipboard+=ideaput. I don't have the setup any more to test if removing the second one resolves the issue.

@sbj0
Copy link

sbj0 commented Nov 13, 2024

Thank you both for sharing these suggestions.

It runs successfully (tested with 1'000+ put operations) on my system with any of

set clipboard=unnamed
set clipboard=unnamedplus
set clipboard+=unnamedplus

It crashes (after ~10 put operations or fewer) with any of

set clipboard+=unnamed
<< empty .ideavimrc >>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clipboard-integration Windows clipboard integration
Projects
None yet
Development

No branches or pull requests

10 participants