[Linux] Text from gmod causes other programs to freeze/crash
Details
I use Linux, Ubuntu, No proton, no betas, just main gmod branch. When I copy any text from gmod and paste it into my browser, vscode, discord, or almost anything else, it causes either a massive freeze for the program or a crash for the program I pasted the text into. I tried using some python code to figure it out and provide more details. I found that copy and pasting Redownloading all lightmaps from console turns into Redownloading all lightmaps\r\n, however, when I manually set my clipboard content to Redownloading all lightmaps\r\n to emulate the crashing behavior it doesn't work. So i'm sort of stumped on what is going on.
If you are going to post crash dumps (.mdmp or .dmp files), please either send them to [email protected] or create a permanent link.
Steps to reproduce
- Be on Linux (Perhaps Ubuntu specifically)
- No proton/beta
- Copy text from the console/in game chat
- Paste it into another program e.g Chrome
- Watch Chrome freeze and crash
That doesn't sound like an issue with GMod if other programs are having issues? Have you tried the bare minimum of trying to copy test from other programs? From other Source Engine games as a test?
That doesn't sound like an issue with GMod if other programs are having issues? Have you tried the bare minimum of trying to copy test from other programs? From other Source Engine games as a test?
Yeah, I've used linux daily for a few years now, copy and pasting in all types of programs (especially vscode :+1: ). This is the first time i've seen it happen. It is possible it has to do with the other program's text processing or even linuxs', however copying text from everywhere else i've never encountered this problem, and even when trying to reproduce it programmatically I couldn't reproduce it.
It's probably due to how other programs handle it but something is clearly being done wrong on gmod's side if this only happens through gmod
Edit I didn't try on other source games
It's all source games, not gmod's problem! Tried on TF2
I still don't see how that's possible. As far as I can tell, on Linux SDL is used to set the clipboard text. (GMod uses SDL2 I think)
Unless there's some fuckery with invisible symbols somehow, or clipboard types maybe?
I still don't see how that's possible. As far as I can tell, on Linux SDL is used to set the clipboard text. (GMod uses SDL2 I think)
Unless there's some fuckery with invisible symbols somehow, or clipboard types maybe?
I have no idea, I tried copying TextureBits from ##### CTexture::LoadTextureBitsFromFile couldn't find materials/maps/surf_utopia_v3_njv/c-14096_0_12872.vtf and it still crashes other programs after pasting into them. After copying this from the source console, I looked at my clipboard text via the python program I mentioned earlier and nothing odd appeared, not even the \r\n (which is right because i'm copying text from the middle of a line). There doesn't appear to be any invisible chars because I would've found them, via python's len() and ord() functions. I don't know much about clipboard types
Well, it appears to be specifically chromium stuff? E.g Discord, Chrome, VScode, so I can paste it into firefox, terminal, and another text editor and it works fine.
Does the chromium issue also happen from other copy sources than the source engine?
**Grocel ** commented Jan 26, 2024
No
Just wanted to add that my laptop that runs Ubuntu also has the same issue
Does it happen to crash if you copy/paste from one GMod instance to another? 😄
Does It it also happen if you copy the string into a text editor and recopy it from there? Maybe Linux is adding formatting metadata when copied from the game somehow.
Does it happen to crash if you copy/paste from one GMod instance to another? 😄
Does It it also happen if you copy the string into a text editor and recopy it from there? Maybe Linux is adding formatting metadata when copied from the game somehow.
Yeah, e.g I can paste into notepad++ and then copy from notepad++ and paste into vscode and it works fine