Steps to reproduce:
- grab the KoS book from https://drive.google.com/drive/folders/ ... MjGkoRkOAg
- try to import it in game
Result:
- nothing happens at all
Breaking down the string into smaller chunks allows me to paste the chunks one by one in the import window in game, but import still fails in the end with error saying "decompression failed".
[raiguard][2.0.7] Importing large strings is broken on Linux
Re: [2.0.7] Importing large strings is broken on Linux
Please try switching to Wayland in the graphics settings.
Don't forget, you're here forever.
Re: [2.0.7] Importing large strings is broken on Linux
A bit of background on this:
This is a known issue. In the past, we worked around this by implementing custom X11 clipboard code. However, for 2.0, I have removed our dependency on X11 and switched to using SDL's clipboard functions. SDL2 does not support the mechanism required to transfer large clipboard contents on X11, but this has been fixed for SDL3.
In other words, the only way to fix it is to switch to Wayland, or wait for us to update to SDL3 at some unknown point in the future.
I'm sorry!
This is a known issue. In the past, we worked around this by implementing custom X11 clipboard code. However, for 2.0, I have removed our dependency on X11 and switched to using SDL's clipboard functions. SDL2 does not support the mechanism required to transfer large clipboard contents on X11, but this has been fixed for SDL3.
In other words, the only way to fix it is to switch to Wayland, or wait for us to update to SDL3 at some unknown point in the future.
I'm sorry!
Don't forget, you're here forever.
Re: [2.0.7] Importing large strings is broken on Linux
I can't switch to wayland :/ To be frank I'm quite sad you are using SDL, it sucks enormously
Re: [2.0.7] Importing large strings is broken on Linux
SDL is far better than what we were using before.
In any case, I just ran into this when I was copying a not-even-that-large blueprint for a different bug report (I run the game under xwayland while debugging for a few reasons) so I'll look into seeing how difficult it would be to backport the fix from SDL3 into SDL2.
In any case, I just ran into this when I was copying a not-even-that-large blueprint for a different bug report (I run the game under xwayland while debugging for a few reasons) so I'll look into seeing how difficult it would be to backport the fix from SDL3 into SDL2.
Don't forget, you're here forever.
Re: [2.0.7] Importing large strings is broken on Linux
Same. Wayland is still a pain to use when you just want everything to work. I'm super excited for the changes that frog-protocols has already kicked up in wayland so hopefully that will start changing in the next couple years. That and Nvidia quit being difficult too.
I remember reading the FFF that talked about X11/wayland where this breakage was mentioned. Reasoning being to massively reduce dependencies (a good thing!) but I was hopeful something would have been put in place to resolve that by release.
Would it be possible to have the ability to open a file dialog window to open a txt file with the blueprint string in it instead? Just make the factorio client process the file like it was actually a normal clipboard import so it doesn't break the lock-step/syncronization in multiplayer? Probably not, since SDL2 doesn't have native file dialogs....but SDL3 does. lol. Hopefully a port to SDL3 isn't prohibitively difficult and will happen at some point.
Would it at least be possible to detect the BP string was incomplete/corrupt and that you are on Linux running X11 then provide feedback of some sort instead of silently failing?
I remember reading the FFF that talked about X11/wayland where this breakage was mentioned. Reasoning being to massively reduce dependencies (a good thing!) but I was hopeful something would have been put in place to resolve that by release.
Would it be possible to have the ability to open a file dialog window to open a txt file with the blueprint string in it instead? Just make the factorio client process the file like it was actually a normal clipboard import so it doesn't break the lock-step/syncronization in multiplayer? Probably not, since SDL2 doesn't have native file dialogs....but SDL3 does. lol. Hopefully a port to SDL3 isn't prohibitively difficult and will happen at some point.
Would it at least be possible to detect the BP string was incomplete/corrupt and that you are on Linux running X11 then provide feedback of some sort instead of silently failing?
Re: [2.0.7] Importing large strings is broken on Linux
I've been running wayland for years, but I have an AMD GPU. Sometimes I forget that wayland is still a PITA for those with NVIDIA cards.credomane wrote: ↑Tue Oct 22, 2024 8:11 pmSame. Wayland is still a pain to use when you just want everything to work. I'm super excited for the changes that frog-protocols has already kicked up in wayland so hopefully that will start changing in the next couple years. That and Nvidia quit being difficult too.
I had intended on adding the capability to SDL2, but the changes were too invasive so it was put into SDL3. SDL2 is in "maintenance mode".
Yeah, SDL3 will have convenient open-file dialogs, but that is SDL3, not SDL2. And upgrading to SDL3 will be a pretty involved process.,credomane wrote: ↑Tue Oct 22, 2024 8:11 pmWould it be possible to have the ability to open a file dialog window to open a txt file with the blueprint string in it instead? Just make the factorio client process the file like it was actually a normal clipboard import so it doesn't break the lock-step/syncronization in multiplayer? Probably not, since SDL2 doesn't have native file dialogs....but SDL3 does. lol. Hopefully a port to SDL3 isn't prohibitively difficult and will happen at some point.
Unfortunately not. When you try to paste a large blueprint, the game receives nothing because X11 tries to send it over INCR, but the game doesn't support it so it doesn't see anything.
There are two paths forward: either I try to backport the SDL3 fix into SDL2, or I re-introduce our custom clipboard code and try to figure out how to link against X11 at runtime (to avoid requiring X11 to be installed for the game to run at all). Both solutions sound like royal pains. I promise I will look into it, but it may take a little while.
Don't forget, you're here forever.
Re: [raiguard][2.0.7] Importing large strings is broken on Linux
If it isn't possible then it isn't possible. Just sucks is all.
Yeah my next GPU is definitely gonna be team AMD just because of the headaches with nvidia and linux.
Yeah my next GPU is definitely gonna be team AMD just because of the headaches with nvidia and linux.