Bug 865053 - Free copied data from vdagent after copy&paste finishes successfully
Free copied data from vdagent after copy&paste finishes successfully
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: spice-vdagent-win (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Arnon Gilboa
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 13:10 EDT by Marian Krcmarik
Modified: 2012-10-11 12:13 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-11 12:13:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marian Krcmarik 2012-10-10 13:10:28 EDT
Description of problem:
Free copied data from vdagent after copy&paste finishes successfully, It seems like vdagent process keeps copied data from client to guest in memory and does not free it after copy&paste is done, It is visible mainly when doing huge copy&paste - like dozens of megabytes. This is not observed with the linux vdagent.

Version-Release number of selected component (if applicable):
vdagent-win 0.1-12

How reproducible:
Always

Steps to Reproduce:
1. Connect to a windows guest with installed and running vdagent
2. Place huge text into clipboard on the client machine.
3. Paste it on the guest.
4. Check memory usage of vdagent process.
  
Actual results:
The memory usage seems to be increased by amount of copied text.

Expected results:
The memory should be freed after the copy&paste is done.

Additional info:
Comment 1 Arnon Gilboa 2012-10-11 11:39:53 EDT
Seems like it's not a bug. That's the way clipboard works in Windows. Each time an application sets the clipboard, it cannot free the data. This happens automatically by the system when another appliaction sets the clipboard, or when it's cleaned.

"If SetClipboardData succeeds, the system owns the object identified by the hMem parameter. The application may not write to or free the data once ownership has been transferred to the system." (In our case the application is vdagent)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms649051%28v=vs.85%29.aspx
Comment 2 Marian Krcmarik 2012-10-11 12:13:46 EDT
(In reply to comment #1)
> Seems like it's not a bug. That's the way clipboard works in Windows. Each
> time an application sets the clipboard, it cannot free the data. This
> happens automatically by the system when another appliaction sets the
> clipboard, or when it's cleaned.
> 
> "If SetClipboardData succeeds, the system owns the object identified by the
> hMem parameter. The application may not write to or free the data once
> ownership has been transferred to the system." (In our case the application
> is vdagent)
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms649051%28v=vs.
> 85%29.aspx

Ok, Thanks for looking at that, I will close in that case.

Note You need to log in before you can comment on or make changes to this bug.