eranif / codelite

A multi purpose IDE specialized in C/C++/Rust/Python/PHP and Node.js. Written in C++
https://codelite.org
GNU General Public License v2.0
2.09k stars 448 forks source link

[Bug]: In CodeLite, clipboard suddenly loses its contents #3272

Closed yunkot closed 8 months ago

yunkot commented 9 months ago

This appears to be a regression as my previous CodeLite build from revision 68d2333346c8120ff7c8dc2b8fdac420e358c6fb does not exhibit this.

In newest CodeLite revision 6246eac495fe34000d0b6494d9d4a2f58e19c495, every time I use Copy and Paste (Ctrl+C, Ctr+V shortcuts) by either selecting a portion of text with mouse, or double-clicking on some word, there is about 5-10% random chance that clipboard contents will become empty. That is, you select a particular word or a piece of text, copy it to clipboard, then try to paste it, only to realize that clipboard has become empty!

Unfortunately, with this regression, CodeLite has become unusable, so I have to roll back to my known working build 68d2333346c8120ff7c8dc2b8fdac420e358c6fb until this is fixed. Please let me know if there is anything I can do to help debug this.

Version

Self-compiled, revision 6246eac495fe34000d0b6494d9d4a2f58e19c495.

Operating system

Arch Linux / Xorg / wxWidgets 3.2.3

yunkot commented 9 months ago

Actually, when using latest CodeLite revision 6246eac495fe34000d0b6494d9d4a2f58e19c495 with wxWidgets 3.2.2.1 instead of wxWidgets 3.2.3, the problem no longer seems to occur.

eranif commented 9 months ago

So, a regression in wx?

yunkot commented 9 months ago

I don't have enough knowledge of how CodeLite internally uses clipboard functionality of wxWidgets, so can't really tell. But since wxWidgets 3.2.3 is becoming mainstream and unless wxWidgets developers would be wiling to address this on their side, shouldn't CodeLite at minimum have some sort of workaround when using latest wxWidgets 3.2.3? Because otherwise clipboard is unusable.

In either case, during next days I'll try to test this on Debian and/or Wayland to see if it is any different there.

UffeJakobsen commented 9 months ago

I have this problem - also on ArchLinux with wx-3.2.3-1 pkg

eranif commented 9 months ago

IIRC, the problem appeared between 3.2.2.1 -> 3.2.3 I will dig into wxWidgets commit in between these releases see if something looks suspicious

eranif commented 9 months ago

I see this bug presented in wx3.3.0: https://github.com/wxWidgets/wxWidgets/issues/23650

Does this seem like something you are facing?

eranif commented 9 months ago

Also: are you using Wayland?

yunkot commented 9 months ago

My bug report is specifically for CodeLite with wxWidgets 3.2.3 under Xorg, running inside GNOME. I haven't tried using it under Wayland yet.

I'm using wxWidgets downloaded from Releases page and built according to CodeLite wiki. This is how I downgraded to 3.2.2.1 for the time being, where this issue does not occur.

@eranif : I'm not sure, but that bug report might be unrelated. I have seen a similar issue to that bug report, but again, under Xorg (haven't tried under Wayland) where I can copy text from other editors like Geany or Gedit into VMWare virtual machine (my host is Arch, client is Windows 11), but not from CodeLite. The best workaround that works flawlessly for me is to copy text from CodeLite, paste it into browser, e.g. FireFox, then copy it from there and only then I can paste it to VMWare virtual machine; pasting text into CodeLite from VMWare does work as it should, however.

UffeJakobsen commented 9 months ago

I'm running with Xorg under LXQt (on ArchLinux) The problem described in the wxWidgets issue does not seem to be the problem we see here...

eranif commented 9 months ago

Can you please report this bug in the wxWidgets page? https://github.com/wxWidgets/wxWidgets/issues/new/choose

eranif commented 8 months ago

@yunkot @uffejakobsen - can you try the steps that I mentioned in the ticket I opened in wxWidgets?

yunkot commented 8 months ago

@eranif : Thanks, as I've mentioned in your post, I am able to reproduce the issue 100% of the time on my configuration.

P.S. I was also going to try posting this issue on wxWidgets site today, but you beat me to it, and your steps in reproducing it are infallible.

UffeJakobsen commented 8 months ago

@yunkot @uffejakobsen - can you try the steps that I mentioned in the ticket I opened in wxWidgets?

Sure will give it a try... I had a hard time trying to report the problem to the wx project. Before reporting I wanted to be able to reproduce the problem outside CL... So I compiled two editors also based on wx - and they did not show the problem :-/ I did not think of looking into the examples shiped with wx I'll give stctest a try

eranif commented 8 months ago

Yes, I am able to reproduce it as well now with wx3.3, consistently. I have a guess that it might be related to the secondary clipboard (seems like that de-selecting text clear the primary clipboard while it should only clear the secondary clipboard)

UffeJakobsen commented 8 months ago

I can confirm that stctest exhibits the exact same problem as I've seen with CL

eranif commented 8 months ago

for now, I reverted back my local build to wx3.2.1 until this is fixed

eranif commented 8 months ago

Closing this ticket as it was fixed in wxWidgets