Bug 10649 - [gtk] Contents of clipboard get stuck
Summary: [gtk] Contents of clipboard get stuck
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-02-25 13:48 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-03-20 05:29 UTC (History)
6 users (show)

Tags: gtk
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Mikayla Hutchinson [MSFT] 2013-02-25 13:48:35 UTC
Sometimes on Windows the content of the clipboard get stuck. It seems to happen that after some copy/paste from XS to XS and from external app (e.g. chrome) to XS, then cut/copy will appear to stop affecting the clipboard - paste will only paste some older copied value.

Last night I saw it 4-5 times because I was doing a fair bit of copy/pasting from chrome to XS. It's also been reported in the forums: http://forums.xamarin.com/discussion/1426/copypaste-in-xamarin-studio/p1

Since it works fine on mac, I'm assuming it's a GTK bug?
Comment 1 Mike Krüger 2013-02-25 15:12:22 UTC
I think so the clipboard handling is one of the worse parts in GTK :/.
(Clipboard and dnd are very weak parts ...)
Comment 2 Aleksander Morgado 2013-02-28 11:02:20 UTC
So cut/copy gets stuck and doesn't affect the clipboard: only in XS or also in other apps? This is, when cut/copy no longer seems to really cut/copy because it doesn't paste the proper thing, where did you try to paste it, in XS itself or in another app, or in both?

And another thing; once you encounter the problem, what did you do to skip it? Did you have to restart XS? Was the problem still present after you copy something from another app and paste it within XS?

GTK+ in win32 handles very differently clipboard operations within the app itself and between apps, and need to understand the context of the issue a bit more, as I cannot seem to reproduce it...
Comment 3 Aleksander Morgado 2013-03-01 09:44:39 UTC
I wasn't able to reproduce this issue a single time :/ Looking at the code, there is no obvious reason why the problem could be happening, so I ended up building some gtk/gdk DLLs with traces enabled in the interesting points. Logs are dumped as 'message' level, but XS will end up treating them as errors and dumping a whole stacktrace in the log, so the size of the log may get quite big easily. If anyone can install these DLLs within GtkSharp/2.12/bin and try to reproduce the issue, it would be nice:
  http://www.lanedo.com/~aleksander/win32/clipboard-logs/

I also added an example of the logs we would get for the different operations, for reference if we ever get logs where copy/cut is broken:
  http://www.lanedo.com/~aleksander/win32/clipboard-logs/logs-XS-1.txt

Also, for anyone facing the issue, please try to answer these questions:
 * When copy/cut stops working, the effect is that you cannot paste the last copied value within XS, or also you cannot paste it out of XS, e.g. in NotePad?
 * When copy/cut stops working and it ends up pasting an older value, was that other value coming from XS itself, or from another application?
 * Please detail which kind of copy/paste operations were you doing when you just found the issue, which were the last ones?
 * Even if you didn't have my DLLs installed, please check the XS IDE log for gtk/gdk warnings/errors...
Comment 4 Mike Krüger 2013-03-01 10:16:04 UTC
I think I've found an issue today in our update commands.
Strange that it doesn't happen on os x - but I could produce this a bug there on linux today. 

marking it as fixed until it appears again with master.
Comment 5 Nischal 2013-03-20 05:29:51 UTC
Today, we have verified this issue with the latest builds:

XS 4.0.2.22
MFA 4.6.01073
MT 6.2.1.199
Mono 2.10.12

And now this issue is not appearing, as the content in the clipboard does not stuck and is getting updated correctly, everytime we copy a fresh content.

Hence, closing this issue.